-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump @cubing/icons
to v3.0.0
#10526
base: main
Are you sure you want to change the base?
Bump @cubing/icons
to v3.0.0
#10526
Conversation
2d4f0fa
to
67c363f
Compare
I also can't figure out what's going on here:
The string |
This should be a compatible replacement. I've done a basic check that the icons show up properly, and a full switch on the WCA website will help shake out potential issues.
SASS is now erroring in CI without printing an error (it's just printing warnings). No idea what's going on with that. 🤷 |
I'm getting something that looks very much like an error: This is related to the stylesheets for the "print competition information as PDF" feature, which unfortunately predates every active member on WST, myself included. @jonatanklosko might know more about this, or he might not. Otherwise, @viroulep is probably the person to talk to. |
No idea, but the package was already |
Ah, somehow I missed that? Anyhow, looks like |
You can find the file by looking at the repository in its state when I introduced the pdf export: https://github.com/thewca/worldcubeassociation.org/blob/c15867cfe662906f65fe7d90c74a636c04cbc470/WcaOnRails/vendor/assets/stylesheets/cubing-icons.css I have no idea what happened to this file though. |
Yeah, thins would make a lot more sense if this file still existed. Now that's no longer in the tree, I don't know how it's still load-bearing. 😳 |
Aha! Might be this: worldcubeassociation.org/config/initializers/assets.rb Lines 8 to 13 in c5237ca
That looks cursed, let me see if I can replace that with anything significantly less hacky. |
@jfly poked me about this, so let me describe my understanding of the situation. As far as I can tell, we have two problems stemming from the same line:
For the second point, I think the options are:
|
@cubing/icons
to v2.1.0-pre.2@cubing/icons
to v2.1.0-pre.3
Specifically: mkdir temp && cd temp
npm install esbuild @cubing/icons
npx esbuild --bundle "@cubing/icons/css" --loader:.woff2=base64 > cubing-icons-with-font-inlined.css Or in JS/TS: import { build } from "esbuild";
await build({
bundle: true,
entryPoints: ["@cubing/icons/css"],
loader: {".woff2": "base64"}
}) |
@cubing/icons
to v2.1.0-pre.3@cubing/icons
to v3.0.0
I strongly disagree with this linter error:
I think that satisfying the linter here makes the comments less readable. But I'll smash the comment parts together to make it happy for now. |
Okay, I tried to update this in a commit. Let's see if it passes CI.
It might be that relative path resolution of the font file actually works correctly here. Unfortunately, my codespace checkout seems to be broken for |
🥳 I was able to get local dev working by switching to an older commit. Currently trying to figure out how to get a PDF to display. |
So, with some difficulty I've been able to test how this affects PDF. It seems that the icons don't render even if the font is inlined. This is tricky to debug, as I can't actually load the relevant HTML for the PDF easily. @viroulep, is there a way for me to serve the HTML that is used to render the PDF, so I can access it in a browser? |
Okay, with a lot of pain I'm able to make slow progress debugging. My current assessment is that this is not working because:
To give an idea of how out of date that is: WebKit introduced WOFF2 support back in 2016, somewhere 8 or 9 years ago. However, the PDF does seem to work with WOFF and inlined fonts. I'm thinking of introducing a build in @gregorbg, how does that sound to you? |
Well as far as I can tell this "competition info PDF" is the only place where we ever rely on any server-side PDF generation library. And so it should be fairly easy ™️ to move away from What do cool kids use these days for PDF generation? Is there any library or backend that would make your life easier in terms of using the fonts? |
This should be a compatible replacement. I've done a basic check that the icons show up properly, and a full switch on the WCA website will help shake out potential issues.