-
-
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
feat: multi-dim data pages #3657
Conversation
Quick links (staging server):
Login:
SVG tester:Number of differences (default views): 0 ✅ Edited: 2024-07-25 17:23:31 UTC |
661ebdd
to
f47861a
Compare
6e96779
to
df0572f
Compare
This PR has had no activity within the last two weeks. It is considered stale and will be closed in 3 days if no further activity is detected. |
This PR has had no activity within the last two weeks. It is considered stale and will be closed in 3 days if no further activity is detected. |
df0572f
to
4fd99bb
Compare
8b77661
to
f28470d
Compare
b693073
to
c6cf2ca
Compare
8008a4f
to
9bef910
Compare
ac5aaf4
to
dd97a07
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.
Very nice work! I had a few comments about moving some code and whether we should bake the default view into HTML.
I reviewed the react hooks code as far as I could but I am not familiar enough to be able to suggest improvements here - e.g. maybe there is an elegant way of implementing useMobxStateToReactState that does not mandate correctly wrapping the state getter in a useCallback, but I don't know about these things. Maybe it would be good if Ike could have a look over the hooks code specifically in this PR?
}} | ||
/> | ||
<div id={OWID_DATAPAGE_CONTENT_ROOT_ID}> | ||
{/* <DebugProvider debug={isPreviewing}> |
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.
Hm, wouldn't it be good to bake the default view into the HTML?
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.
I agree that we should definitely bake something, yes.
I'm not sure about what will make for the best UX - if a load of things are displayed and then are switched out one second after, that's not great. Will have to think about this.
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.
I've now added this to #3874.
-> This is now ready to be merged tomorrow; in this case with a squash merge! |
Implements #3795.
Review notes
You can fully ignore the stuff in
public/multi-dim
. These are the 6 currently available MDD pages, with hardcoded slugs and configs. Go to/grapher/mdd-poverty
,/grapher/mdd-causes-of-death
etc. to access them. This folder makes up most of the 6000 lines of code added.To enable baking locally, add
FEATURE_FLAGS = MultiDimDataPage
to your.env
file.Most stuff is going on in
MultiDimDataPageContent
,MultiDimDataPageBaker
, andMultiDimDataPageSettingsPanel
.And, feel free to reach out if anything is unclear!
TODOs