Skip to content

feat(events): "View on globe" — jump an In-the-news card to the event's place + time#247

Closed
Hackshaven wants to merge 1 commit into
claude/events-in-the-newsfrom
claude/events-jump-to-place
Closed

feat(events): "View on globe" — jump an In-the-news card to the event's place + time#247
Hackshaven wants to merge 1 commit into
claude/events-in-the-newsfrom
claude/events-jump-to-place

Conversation

@Hackshaven

Copy link
Copy Markdown
Member

What & why

Follow-up to #244 ("In the news" panel). Today each "In the news" card is a passive citation (headline + external source link + date) — the reader still has to find the event on the globe themselves. This adds a "View on globe" action that flies the active globe to the related current event's location and seeks the loaded dataset to the event's time, so a reader lands on the exact moment and place the headline describes.

Base note: targets claude/events-in-the-news (#244) so the diff is only this feature. Retarget to main once #244 merges.

How

Reuses the exact primitives Orbit's docent already drives (main.ts chat callbacks) — no new navigation machinery, no backend change:

  • PlaceMapRenderer.flyTo for a point (flies to a regional altitude), fitBounds for a boundingBox or a regionName (resolved via regions.ts). VR sessions rotate too (flyToOnGlobe).
  • TimeseekToDate on the loaded dataset.
  • Out-of-range handling (the chosen behavior) — when the event's occurredStart falls outside the loaded dataset's [startTime, endTime] (common for rolling real-time windows), we still fly to the place and reveal a small "outside this dataset's time range" note on the card. Static-image datasets (no time axis) fly with nothing to note.

Wiring mirrors the existing onLoadDataset pattern: displayDatasetInfo gains an optional onNavigateToEvent callback; main.ts implements it against the primary renderer + hlsService. The button renders only when the event actually carries a place or a time.

Tests

src/services/datasetLoader.test.ts (+5): button renders when the event has a place/time; omitted when it has neither; click invokes onNavigateToEvent with the event; the note reveals only on out-of-range and stays hidden on seeked. Full suite (4714) + type-check green.

No new UI route/module (enhances the existing info-panel surface), so no new Scene — the "In the news" panel needs a loaded dataset, whose imagery is network-gated and out of scope for the offline capture (see openGlobe).

🤖 Generated with Claude Code


Generated by Claude Code

Each "In the news" card in the dataset info panel now offers a "View on
globe" action that flies the active globe to the related current event's
location and seeks the loaded dataset to the event's time — so a reader
lands on the moment and place the headline describes instead of hunting
for it.

Reuses the primitives Orbit's docent already drives: MapRenderer.flyTo
(point geometry → regional altitude) / fitBounds (bounding box, or a
named region resolved via regions.ts) for place, and seekToDate for
time. Per the chosen behavior, when the event's time falls outside the
loaded dataset's coverage — common for rolling real-time windows — we
still fly to the place and reveal a small "outside this dataset's time
range" note on the card. Static-image datasets (no time axis) simply
fly, with nothing to note.

Wiring: displayDatasetInfo takes an optional onNavigateToEvent callback
(mirrors onLoadDataset); main.ts implements it against the primary
renderer + hlsService. The card button is present only when the event
carries a place or a time. New i18n keys + info-panel CSS. Backend and
the /api/v1/datasets/:id/events shape are unchanged.

Signed-off-by: Claude <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🖼️ Visual report

54 shot(s) · 2 viewport(s) (desktop, mobile) · 15 with problems · 22 problem(s) total

Regression: 4 shot(s) changed, 0 new (baseline-less, soft pass), threshold 0.001.

Scene Viewport Change
browse-search-active desktop 0.17% (2162 px)
orbit-chat-open desktop 13.08% (169512 px)
publish-events desktop 0.41% (5337 px)
browse-search-active mobile 0.64% (2111 px)
Shots with problems
Scene Viewport Errors Failed req a11y
catalog-landing desktop 0 1 0
browse-filters-open desktop 0 2 0
browse-search-active desktop 0 1 0
orbit-chat-open desktop 0 1 0
help-panel desktop 0 1 0
browse-graph-view desktop 0 1 0
browse-timeline-view desktop 0 1 0
browse-map-view desktop 0 1 0
orbit-settings desktop 0 1 0
publish-tours desktop 1 1 0
publish-featured-hero desktop 1 1 0
publish-datasets-error desktop 1 1 0
+3 more

Full report → visual-report artifact

Advisory — this check never fails the build. Visual review only.

Copy link
Copy Markdown
Member Author

GitHub auto-closed this when its base branch (claude/events-in-the-news, #244) merged. The same commit, rebased onto main, continues in #248.


Generated by Claude Code

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.

2 participants