Timeline plugin: shell and component placeholders - #239
Conversation
Base of the Timeline stack: the plugin entry point, config, MMGIS API adapter, shared types and time utilities, the FloatingPopover primitive, and the adapter that owns timeline state and wires the header, content and info popover together. The five UI pieces — timeline view, date selector, playback controls, playback speed and time mode — ship as placeholders that hold their prop contracts and layout slots. Each is implemented in its own follow-up PR in this stack. Also adds the horizon theme, exports the primary-lighter/lightest colour tokens, and points the layer manager hover tint at the new token. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AgqjkZhQvfoBgdJtt9SSKS
…reamline API access
The horizon brand's tokens and theme entry point, along with its option in the configure page's UI tab, live on feat/horizon-theme and land in their own PR. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AgqjkZhQvfoBgdJtt9SSKS
Core integration:
- Subscribe to 'time:changed' (the event TimeControl actually broadcasts) and
ignore this plugin's own committed echo, so external time changes reach the
timeline and a stale window is never pushed back to core.
- Gate 'tool:getVars' and the layer reads on useMMGISHandlerReady, matching the
sibling modern tools; these handlers are registered in Layers_.fina() after
the tool mounts, so the previous mount-time request always rejected.
- Read layer configs and visibility over the request/provide bus
('layers:getAllConfigs', 'layers:getVisible') instead of direct
window.mmgisAPI methods, and drop the Timeline-local type widening.
- Add a 'time:isEnabled' provider to TimeControl and render an explicit
unavailable state, replacing the fabricated now-30d/now-15d window that
rendered a fully interactive timeline core silently discarded.
Playback and stepping:
- Keep the setCurrentTime updater pure; the emit and the stop now run in the
interval body against refs, which also stops the interval re-arming per tick.
- Clamp step targets to the range instead of dropping the step, expose
canStepForward/canStepBackward, and restart from the start when play is
pressed at the end of the range.
Accessibility and styling:
- Restore a focus-visible ring for every control; core's global
`*:focus { outline: none }` removes the native one.
- Give FloatingPopover dialog semantics, Escape-to-close and focus restore, and
wire aria-expanded/aria-controls on the triggers.
- Scope `.ui-tool-card { width: 100% }` to vertical and tabbed regions so a
top/bottom panel holding more than one tool still lays them out in a row.
- Export --theme-color-primary-lightest for every brand, falling back to
primary-lighter, so the three LayerManager hover rules resolve per-brand
instead of inheriting the disasters teal literal.
- Set the info popover's font; it portals outside the .timeline subtree.
Also: keep generateTimeTicks inside its domain and terminate on degenerate
ranges, unmount a prior root before make() creates a new one, drop the eight
debug console.log calls and the never-populated _cleanups array, and add unit
tests for the tick and clamp helpers.
|
Review pass over the stack (#239–#243) surfaced 28 issues; 20 of them land in this PR, since the adapter, the tool shell and every out-of-plugin edit live here. Pushed as BlockersDead time subscription. The adapter listened on Config was always discarded. Also fixed here
Added
Not fixedThe collapse button still leaves the host panel at full height. The blank area is core's |
Base of the Timeline stack. Adds the plugin entry point, config, MMGIS API adapter, shared types and time utilities, the FloatingPopover primitive, and the adapter that owns timeline state and wires header, content and info popover together.
The five UI pieces ship as placeholders holding their prop contracts and layout slots — each is implemented in a follow-up PR in this stack.
Also adds the horizon theme, exports the primary-lighter/lightest colour tokens, and points the layer manager hover tint at the new token.
Stack — merge in order, starting from the base:
development