-
-
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
🔨 bake chart view map / TAS-829 #4479
base: master
Are you sure you want to change the base?
Conversation
d26b0f0
to
c9983d2
Compare
Quick links (staging server):
Login:
SVG tester:Number of differences (default views): 0 ✅ Edited: 2025-01-24 10:16:17 UTC |
da86b74
to
c856c45
Compare
c856c45
to
28aaa7c
Compare
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!
As for the timeliness of updates, it may just be fine to make a route like this publicly accessible without auth, i.e. put it in publicApiRouter
? Although, while testing this, I noticed that publicApiRouter
is not really public anymore - https://owid.cloud/api/health is behind CF Auth, too, and we would probably need to put up an exclude rule for CF Auth to make it properly work again 🤠
I didn't know we have an admin router that is meant to be publicly accessible (although it isn't really at the moment). If we could make that work, that would be best, but I know too little about this stuff. Let's chat about it tomorrow? |
sure! |
Bakes http://staging-site-bake-chart-views/grapher/_chartViews.json that maps chart view names to chart config IDs.
The Figma plugin uses this information for autocompletion and to fetch a chart view via UUID.
Ideally, we don't trigger a full rebuild when a chart view is created or deleted. I imagine authors creating a chart view going directly to Figma to try to import it, so there shouldn't be a too-long lag.
We wouldn't need to bake if we exposed the map on the Admin API instead, but Mojmir said auth is tricky. I wonder if we could add another auth method to our admin that would make that easier? But I don't think it's a good use of my time to think about admin auth at the beginning of the cycle, so I want to go with this for now. It would be easy to revert these changes if I reconsider during the cycle.
The map is baked to
/grapher/_chartViews.json
. I named it similarly to/grapher/_grapherRedirects.json
, but I'm happy to rename it if the name I chose is awkward.