Implement updates tracking OWID grapher#6
Open
xrendan wants to merge 924 commits intoBuildCanada:masterfrom
Open
Implement updates tracking OWID grapher#6xrendan wants to merge 924 commits intoBuildCanada:masterfrom
xrendan wants to merge 924 commits intoBuildCanada:masterfrom
Conversation
Small Grapher refactors I did as part of the Causes of Death Treemap - Rename GrapherTooltipAnchor options — renames enum values in GrapherTypes.ts (e.g. for clarity) - Make TooltipValue component more flexible — adjusts TooltipContents.tsx to be more reusable - Extract sparkline component — moves the sparkline out of DataTable.tsx into a new sparkline/Sparkline.tsx file - Extract SASS variables — pulls shared SCSS variables (colors, sizes, etc.) from grapher.scss into a new core/variables.scss - Split tooltip components into separate files — breaks the monolithic Tooltip.tsx into TooltipCard.tsx and TooltipContainer.tsx - Drop NO_DATA_LABEL import from ColorScale — removes an unused import - Move makeAxisLabel to AxisUtils — relocates the helper from ChartUtils.tsx to axis/AxisUtils.ts
Refactors TextWrap and MarkdownTextWrap. The main motivation is to refactor MobX away so that we can use these utilities in bespoke projects, but I went a bit further and also split state from rendering and introduced a common interface for TextWrap and MarkdownTextWrap. In summary, - Removed MobX from `TextWrap` and `MarkdownTextWrap`, either dropping `@computed` or replacing it with `@imemo` - Convert MarkdownTextWrap from a React component to a plain class, removing the JSX rendering pattern - Separate state from rendering by extracting render methods into standalone React components: TextWrapSvg, TextWrapHtml, MarkdownTextWrapSvg, MarkdownTextWrapHtml - Introduce a shared TextWrap interface
This PR renders Grapher’s Dropdown component in the example bespoke viz, since most bespoke viz projects will likely need it, but there is a bit of setup required to make React Aria work with the Shadow DOM. I initially thought we’d need to portal the popover into the shadow DOM. But while porting this code over from the Causes of Death project, where I first experimented with this, I realised the solution is much simpler: it’s actually fine to attach the popover to the body outside the shadow DOM. What’s then missing are the popover styles, because they don’t exist on the demo page. But they should exist on any OWID page, since they’re bundled into owid.css, right? So the simplest fix seems to be to just import those styles on the demo page. Of course, this is a bit brittle, because we’re relying on the embedder to provide those styles. But I think it should be fine in practice, since we’ll always be embedding these in GDoc articles that live on our site.
Adds a few shared components for bespoke projects and adds an example chart to the example project. In summary, - Adds reusable components for bespoke projects: ChartHeader, ChartFooter, Frame, TimeSlider, and BezierArrow - Adds a shared useDimensions hook for responsive chart sizing via ResizeObserver - Adds a new "chart" variant to the example bespoke project that demonstrates how to compose these shared components using `@visx` packages - Improve the layout of the demo page (the boxes looked nice for the small examples, but I found it distracting when working on the Causes of Death Treemap)
Explicitly pass ADMIN_SERVER_PORT, VITE_PORT, WRANGLER_PORT, and COMPOSE_PROJECT_NAME to tmux shell commands so user overrides are respected. Also use TMUX_SESSION_NAME in up.devcontainer instead of a hardcoded session name. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Forward env vars to tmux subshells in Makefile
🔨 (explorer) respect column description
✨ add focus state to bespoke time slider
🐛 (causes of death) fix baseline for Safari
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…e model (#6356) Co-authored-by: Claude <noreply@anthropic.com>
Remove margin-bottom from the last paragraph in the content wrapper so the block's own margin is the single source of trailing space. Rename the pull-chart-specific styles to .pull-chart__thumbnail (mixed with the shared .chart-thumbnail block) and introduce .pull-chart__content for scoping. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Bumps [axios](https://github.com/axios/axios) from 1.13.6 to 1.15.0. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](axios/axios@v1.13.6...v1.15.0) --- updated-dependencies: - dependency-name: axios dependency-version: 1.15.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This is mostly to make Google use a better image in the search results than the social media ones it often uses currently. Adding the licensing information should be beneficial too.
🔨 add datapages view
🎉 stacked bar chart switching
🔨 refactor onChartSwitching and add tests
🐛 avoid hard-coding years when switching between views
🐛 (regions updater) avoid empty strings written into members array
🐛 fix overlapping vertical comparison labels
🔨 remove empty comparisonLines from configs
✨ improve dataRange peer strategy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Links to issues, Figma, Slack, and a technical introduction to the work.
Screenshots / Videos / Diagrams
Add if relevant, i.e. might not be necessary when there are no UI changes.
Testing guidance
Step-by-step instructions on how to test this change
Reminder to annotate the PR diff with design notes, alternatives you considered, and any other helpful context.
Checklist
(delete all that do not apply)
Before merging
If DB migrations exists:
After merging