-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
🔨 Switch grapher exports to use CF worker #4464
base: master
Are you sure you want to change the base?
Conversation
Quick links (staging server):
Login:
SVG tester:Number of differences (default views): 770 (7e5427) ❌ Edited: 2025-01-23 20:58:24 UTC |
This is blocked by #4450 |
3f6aeab
to
d38cba1
Compare
import path from "path" | ||
import sharp from "sharp" | ||
import svgo from "svgo" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still use svgo
in the flag updater dev tool
@@ -1,16 +0,0 @@ | |||
export const INTERACTIVE_ICON_SVG = `<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="hand-pointer" class="svg-inline--fa fa-hand-pointer fa-w-14" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 617"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleting InteractionNotice
because we weren't using it.
shouldProgressiveEmbed
has been hard-coded to true for the last year, so all mobile devices have been embedding charts normally.
Which means that the only time this would render is if JS was disabled, but we were hiding the notice when JS was disabled because it doesn't make sense to explain to the user that clicking on the thumbnail will load an interactive chart in that case 🙃
We could have rewritten shouldProgressiveEmbed
, but I think we can circle back to that if/once #4377 is done.
Some useful pages for testing: http://staging-site-remove-grapher-exports http://staging-site-remove-grapher-exports/a-history-of-global-living-conditions Data page: Data page with query params: Grapher page: Grapher page with query params: Modular topic page: Linear topic page: Country profile page: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
You went a bit over the top in MultiEmbedder though, effectively making all non-standalone charts static. Which is good for testing this, but... 😀
d2013dd
to
14a3108
Compare
Resolves #4093 and #3661
Supersedes #3746 and #4099
Changes
/exports/
to use our dynamic thumbnails instead/exports/
formatWordpressPost
isn't checking redirects. We could:InteractionNotice
Caveats