Implement updates tracking OWID grapher#6
Open
xrendan wants to merge 1205 commits into
Open
Conversation
Simpler model: instead of accepting spaces, filtering through them, and normalizing on blur, just replace each space with "-" in onChange. The input never holds a space, the stored value never encodes as %20, and the filter/highlight/custom-URL-hint logic all collapse back to the original form. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Deduplicate GDoc slugs before triggering Buildkite lightning builds and before validating targeted bakes. Add a regression test for duplicate lightning deploy slugs.
✨ reverse order of entities in the No data section
✨ use specific chart label tabs
- Show fallback image only when JS is disabled - Otherwise, render Grapher, which has its own loading indicator This should improve the UX especially on data pages, where the image previously flashed for a brief moment before the Grapher started loading.
Keep inactive key insight slides measurable instead of hiding them with `display: none`, preventing cached interactive charts from briefly rendering titles at zero width when switching slides.
They run them too often, prolonging the feedback loop.
🔨 clarify split between interactive/static captioned chart
🐛 Admin origin URL autocomplete: treat spaces as dashes
Nested DoDs should still work. Fixes #5917
- Use react-query to fetch the multi-dim config - Defer loading the config until the embed scrolls near the viewport, similar to `GrapherWithFallback` - Show a fallback image when JS is disabled - Log multi-dim analytics event only when the multi-dim becomes visible, similar to `Grapher` - Introduce a single site-wide `QueryClient `and a `SiteQueryClientProvider` Fixes #6353
MultiEmbedder is no longer used for multi-dims.
- Remove unused ref - Derive currentSlide from currentIndex - Simplify JSX className syntax
Even if the user doesn't specify it manually, we hide the controls (dropdowns of explorers and multi-dims) since they compete with ChartStory's own controls (arrows).
- Use a shared article chart frame for Graphers, Explorers, and multi-dims. - Let multi-dims fill their parent while the frame owns embed sizing. This fixes a bug where multi-dims could have extreme height in a ChartStory. - Adjust public iframe snippets so visible multi-dim and Explorer controls still leave about 600px for the Grapher.
Addresses review feedback on #6330 — switches the LTP/article padding-top rule to the nested-class syntax used elsewhere in the codebase instead of the parent-selector `&`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
✨🤖 add dividers and spacing around AllCharts on LTPs and articles
Mirror the /search analytics pattern on /latest. Two new GA4 events are added to the registry: SiteLatest fires on filter state change, and SiteLatestResultClick fires when a card link is clicked. A new useLatestAnalytics hook debounces the filter event (skipping default state and consecutive duplicates), and a LatestContext exposes the SiteAnalytics instance to hit components. Announcement cards intentionally don't track clicks — they have no canonical link to their own slug, mirroring how links inside the rich excerpt of an article hit are also untracked. LatestState moves into @ourworldindata/types alongside SearchState. GTM registration of owid.site_latest, owid.site_latest_result_click, latestTopics, and latestType is required before GA4 will collect the new params.
Drop the redundant "Site" prefix to match the dominant naming pattern in SiteAnalytics (logSearch, logInstantSearchClick, logSearchAutocompleteClick, and the new logLatestResultClick). The EventCategory.SiteSearchResultClick GA4 event name is unchanged — the "Site" prefix there is a deliberate namespace.
Point the SiteResources "Latest" link at the data-insight feed and rename the SiteFooter "Insights" entry to "Data Insights" for consistency. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add `parseLatestExcerpt` next to `parseSimpleText` in rawToEnriched. Per block: `parseText` for raw text blocks; a synthetic EnrichedBlockText with a parseError for any non-text block. Surface those parseErrors in `GdocPost._validateSubclass`, mirroring the existing `parsedFaqs.parseErrors` walk. Errors show up in the admin via `gdoc.errors` → `getErrors()`, gating Publish on Error-severity entries.
Rename `getAndLoadPublishedDataInsightsPage` to `getAndLoadLastPublishedDataInsights` and hardcode the limit. The atom feed and `GdocDataInsight.getPublishedDataInsights` only ever needed the most recent insights, never a page offset. Removes the now-unused `LATEST_INDEX_PAGE_SIZE` constant and its export.
Drop a few comments that restate what the code already shows, and shorten the `isChronologicalGdocInstance` doc to a single sentence. Add a brief cross-reference from `checkIsChronologicalGdoc` to its class-narrowing counterpart.
The /atom.xml ?type= param now accepts LatestType slugs (article, data-insight, data-update, website-upgrade, announcement) and filters Algolia on the indexed latestType facet — matching the /latest UI and letting subscribers narrow to announcement subtypes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Match the ~-separated set encoding used by /search and /latest so the atom feed's ?topics= and ?type= params stay coherent across surfaces. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replace the hand-rolled content type dropdown with react-aria-components' Select / ListBox / Popover. The trigger's active styling is now driven by `data-pressed` (set while the popover is open) instead of by the current selection.
Use react-aria ToggleButtonGroup for topic pills (keyboard nav, focus
ring) and Select for the type dropdown. Give the "All" pill and "All"
type option specific aria-labels ("All topics" / "All types") while
keeping the visible "All" text. Reset the negative right offset on the
scroll arrow under sm-only since the type dropdown isn't a sibling on
mobile.
LatestTopicFacets isn't memoized and the handlers aren't used in any deps array, so useCallback was purely ceremony.
Bumps the newsletter email input to 16px at the sm breakpoint, matching the existing sm-only convention used on the not-found page form. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…-with-algolia-spa-search 🎉🤖 Revamp Latest page with Algolia-powered SPA search
…test-page-with-algolia-spa-search" This reverts commit 90752a5.
Records were carrying imageMetadata for every linked image on the gdoc (full body, FAQs, refs, linkedDocument thumbnails, author avatars), and topic-page records were getting imageMetadata too even though /latest filters them out. Five records exceeded Algolia's 20 KB hard limit. Now each variant ships only the images its /latest card actually renders. imageMetadata moves off the base record onto the renderable variant payloads (DataInsight, Article, Announcement) via a reusable ImageAttachmentShape — topic-page payloads can't carry it by construction. A new copyImageMetadataIfPresent helper mirrors copyAttachmentsIfPresent and gates assignment on non-empty. extractFilenamesFromBlocks added in gdocUtils to walk an array of enriched blocks and dedupe filenames. Result on the pages-chronological index (1086 records): max 33.97 KB → 8.82 KB, p99 16.37 KB → 7.26 KB, 5 over-limit records → 0. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Display formatted author names below the title on both the gdocs LatestDataInsights carousel cards and the /latest LatestDataInsightHit list items.
Reapply "Merge pull request #6259 from owid/auto-claude/001-revamp-latest-page-with-algolia-spa-search"
Bumps [qs](https://github.com/ljharb/qs) from 6.15.0 to 6.15.2. - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md) - [Commits](ljharb/qs@v6.15.0...v6.15.2) --- updated-dependencies: - dependency-name: qs dependency-version: 6.15.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…fore_last_image_using_css_order 🐛 Move announcement byline before last image using CSS order
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