Skip to content

Implement updates tracking OWID grapher#6

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

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

Conversation

@xrendan
Copy link
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 30 commits February 18, 2026 09:56
✨ allow single-time stacked bar/area charts
✨ improve discrete bar charts with projections
Unclear if it happens on Samsung phones also in other cases or only with
Algolia autocomplete.
Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.7 to 7.5.9.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](isaacs/node-tar@v7.5.7...v7.5.9)

---
updated-dependencies:
- dependency-name: tar
  dependency-version: 7.5.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
🐛 (explorer) update query params when choices unavailable
## Description

- Configure the `user-survey-role-v1` experiment with three arms
- Add a new `UserSurvey` site widget (long-list, short-list, free-form experiment arms) with a follow-up feedback step
- Render the widget on eligible page contexts, skipping iframes and archive pages
- Add eligibility logic based on analytics consent, visit count, and first-visit age
- Add analytics event types and `SiteAnalytics` logging for submitting/dismissing the survey steps
- Add `POST /api/user-survey` in Cloudflare Functions with zod payload validation, Sentry error capture, and R2 persistence
- Add `USER_SURVEYS_R2` bucket bindings
- Centralize experiment cookie setting in middleware response handling (GET-only), extend static-asset skip to include `webp`

## Context

- [Notion](https://www.notion.so/owid/2026-01-21-User-survey-to-self-identify-as-a-certain-kind-of-user-2ef74b71f92e80c6a391ff7868671cea)
- [Figma](https://www.figma.com/design/PLD1bWikKmeDKSkEzqbUKf/User-Surveys?node-id=90-673&m=dev)

## Screenshots / Videos / Diagrams

### Long list variant

<img width="2934" height="1968" alt="image" src="https://github.com/user-attachments/assets/b6ef9d3f-b2c2-441c-8d35-cc91c20d508a" />

### Short list variant

<img width="2934" height="1968" alt="image" src="https://github.com/user-attachments/assets/0492fda2-6b2a-4a0d-8682-26582675281c" />

### Free-form variant

<img width="2934" height="1968" alt="image" src="https://github.com/user-attachments/assets/379c351d-49e5-4a80-a880-30cf574601bc" />

### Success screen

Shared for all variants.

<img width="2934" height="1968" alt="image" src="https://github.com/user-attachments/assets/54ac2c36-a930-4143-82bb-2448ca46e354" />

## Testing guidance

Focus on code structure and logical soundness. I'll double-check behavior, business logic, and interactions in the UI on a call with Bobbie.

- [x] Does the staging experience have sign-off from product stakeholders?

## Checklist

### Before merging

- [x] Google Analytics events were adapted to fit the changes in this PR
- [x] Changes to HTML were checked for accessibility concerns
- [x] Change the `expires` date of the experiment to be a month after launch
Use unique React keys (`${filter.type}:${filter.name}`) for autocomplete
suggestion list items. Previously, an exact topic match and the query
suggestion shared the same key (both keyed by `filter.name`), causing
React reconciliation to leave a stale duplicate element in the DOM when
the query changed.

Fixes #5524
- Make admin bar the highest.
- Make cookie notice the second highest. This fixes autocomplete
  obscuring the cookie notice buttons.

Fixes #5993
A traditional fix is to abort the request or ignore it in the useEffect
when the dropdown changes, but we were not able to implement that
correctly. See the issue for details.

#5727
Fixes #5524

## Problem

When typing a tag name with exact case (e.g. `Energy`) in the search bar:

1. The autocomplete shows both an **Energy topic** suggestion and an **Energy query** suggestion
2. Selecting the plain text query suggestion commits the search
3. Deleting a character (e.g. `Energ`) causes the **Energy tag to appear twice** in the autocomplete dropdown

## Root cause

Both the topic filter and query filter for "Energy" were rendered as `<li>` elements with `key={filter.name}` — both resolving to `key="Energy"`. When the suggestions updated (from the debounced query change), React's VDOM reconciliation failed to properly remove the stale duplicate element due to the non-unique keys.

## Fix

Changed the list item key from `filter.name` to `` `${filter.type}:${filter.name}` `` so that a topic suggestion and a query suggestion with the same name get distinct keys (e.g. `topic:Energy` vs `query:Energy`).

## Testing

1. Go to `/search`
2. Type `Energy` (exact case)
3. Select the plain text autocomplete suggestion (not the tag)
4. Delete 1 character → autocomplete should show `Energy` tag **only once**
Adds a chart type dropdown to SVG tester reports
## Context

This PR renames several variables and types related to regions and data providers to improve clarity and consistency in the codebase. The main changes include:

- Renamed `AGGREGATE_SOURCES` to `REGION_DATA_PROVIDERS`
- Renamed `AggregateSource` to `RegionDataProvider`
- Renamed `CUSTOM_REGION_SOURCE_IDS` to `ADDITIONAL_REGION_DATA_PROVIDERS`
- Renamed `CustomAggregateSource` to `AdditionalRegionDataProvider`
- Renamed `EntityRegionTypeGroup` to `RegionGroup`
- Renamed `entityNamesByRegionType` to `entitiesByRegionType`
- Renamed `getAggregatesBySource` to `getAggregatesByProvider`
- Renamed `isAggregateSource` to `isRegionDataProvider`

These changes make the terminology more consistent and better reflect the purpose of these variables and types.
bnjmacdonald and others added 30 commits March 7, 2026 12:34
🧪 Experiment: all charts vs featured metrics block on modular topic pages
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…6162)

## Context

Following Feb 17 call with Joe (#6070). Tests enabling search on dataset producer names in the charts index.

`datasetProducers` was already configured as a faceting attribute (filtering only). Now also searchable, allowing queries like "WHO", "FAO", "World Bank" to surface relevant charts.

**Change:** Added `"unordered(datasetProducers)"` to `searchableAttributes` array in `baker/algolia/configureAlgolia.ts:109`

## Testing guidance

Deploy to test environment and verify:

- [ ] Searching for producer names (e.g., "WHO", "World Bank") returns charts using those datasets
- [ ] Existing search functionality remains unaffected
- [ ] Faceted filtering by producer still works as before
- [x] Does the staging experience have sign-off from product stakeholders?

## Checklist

N/A - Configuration change only, no UI/DB/Analytics modifications required.

---

_Replaces_ #6108 _(branch renamed to remove_ _`copilot/`_ _prefix)_

- Fixes #6107
Fixes issues I noticed in the markdown generated by Cloudflare across
our major content types.

- Changes several components to be HTML lists where appropriate
- Adds actual space between inline elements where CSS was used to add
  only visual space
- Changes links that contain block elements to be a block themselves -
  this might help with missing spaces in the markdown
- Render admin links only on the client - to exclude them from the
  markdown

https://developers.cloudflare.com/fundamentals/reference/markdown-for-agents/
don't need to always get the default style
Use ENV to pick archive directories: local `archive/` and
`wikipedia-archive/` in development, `/home/owid/live-data/` paths
on staging servers.
Add sed-based rewriting of detect-country.owid.io → ourworldindata.org/api/detect-country
in MJS bundles and source maps during Wikipedia archive backpopulation. Also adds BDD
feature tests to verify no requests leak to the old domain.
…opulate script (#6209)

## Context

The Wikipedia archive backpopulation script copies files from the main archive R2 bucket. Legacy archived `.mjs` bundles and source maps contain references to `https://detect-country.owid.io`, which has been replaced by `https://ourworldindata.org/api/detect-country` in newer builds. This PR adds a `sed`-based rewrite step to the backpopulate shell script to fix these URLs in the copied bundles.

## Changes

- **`devTools/backpopulateWikipediaArchive.sh`**: Added `rewrite_detect_country_urls_in_bundles()` step that uses `find`+`sed` to replace the legacy URL in `.mjs` and `.mjs.map` files. Updated the download and upload steps to also handle these file types.
- **`features/wikipedia-archive.feature`** + **`features/wikipedia-archive.steps.ts`**: Added BDD scenario verifying no requests go to `detect-country.owid.io` and that `/api/detect-country` is used instead. Refactored step definitions to use generic parameterized request-checking steps.

## Testing guidance

- `bash -n devTools/backpopulateWikipediaArchive.sh` — syntax check passes
- Unit tests pass: `yarn test run --reporter dot baker/archival/createWikipediaArchive.test.ts`
- Typecheck passes: `yarn typecheck`
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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