Skip to content

Implement updates tracking OWID grapher#6

Open
xrendan wants to merge 924 commits intoBuildCanada:masterfrom
owid:master
Open

Implement updates tracking OWID grapher#6
xrendan wants to merge 924 commits intoBuildCanada:masterfrom
owid:master

Conversation

@xrendan
Copy link
Copy Markdown
Member

@xrendan xrendan commented Feb 26, 2026

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

  • Does the change work in the archive?
  • Does the staging experience have sign-off from product stakeholders?

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

  • Google Analytics events were adapted to fit the changes in this PR
  • Changes to CSS/HTML were checked on Desktop and Mobile Safari at all three breakpoints
  • Changes to HTML were checked for accessibility concerns

If DB migrations exists:

  • If columns have been added/deleted, all necessary views were recreated
  • The DB type definitions have been updated
  • The DB types in the ETL have been updated
  • If tables/views were added/removed, the Datasette export has been updated to take this into account
  • Update the documentation in db/docs

After merging

  • If a table was touched that is synced to R2, the sync script to update R2 has been run

sophiamersmann and others added 29 commits March 19, 2026 09:40
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
sophiamersmann and others added 30 commits April 13, 2026 12:19
🔨 (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.
🔨 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants