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
Closed
feat(events): "View on globe" — jump an In-the-news card to the event's place + time#247Hackshaven wants to merge 1 commit into
Hackshaven wants to merge 1 commit into
Conversation
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>
Contributor
🖼️ Visual report54 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.
Shots with problems
Full report → Advisory — this check never fails the build. Visual review only. |
Member
Author
|
GitHub auto-closed this when its base branch ( Generated by Claude Code |
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.
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.
How
Reuses the exact primitives Orbit's docent already drives (
main.tschat callbacks) — no new navigation machinery, no backend change:MapRenderer.flyTofor apoint(flies to a regional altitude),fitBoundsfor aboundingBoxor aregionName(resolved viaregions.ts). VR sessions rotate too (flyToOnGlobe).seekToDateon the loaded dataset.occurredStartfalls 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
onLoadDatasetpattern:displayDatasetInfogains an optionalonNavigateToEventcallback;main.tsimplements 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 invokesonNavigateToEventwith the event; the note reveals only onout-of-rangeand stays hidden onseeked. Full suite (4714) +type-checkgreen.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