Repository navigation
Closed
Description
Summary
When a user hovers an individual event pin on the map, show a small popover with
just that event's timing line — the recurrence + start time (e.g. "Every
Thursday · 7:30 PM"), identical to the top calendar line of the event's
EventListItem card. Today hovering a pin only swaps the cursor to a pointer
(hoverOnFeature in Map.tsx:176-184),
so a user scanning the map can't tell when an event meets without clicking
through to open it. A hover popover gives at-a-glance triage on the map, reusing
the shared display layer so the line can never drift from the list card.
Proposed changes
- Popover on individual event pins only. Render on the
unclustered-point
layer, never onclusters(a cluster is many events — a single recurrence line
is meaningless). Both are already ininteractiveLayerIds
(Map.tsx:202); gate on
feature.layer?.id === unclusteredPointLayer.id. - Track the hovered pin. Extend the existing
onMouseMove={hoverOnFeature}
seam (Map.tsx:210) to also record
the top hovered feature'sidin local state (enter/leave by comparing to the
previous id), and add anonMouseLeaveon the map to clear it when the pointer
leaves the canvas. Keep the current cursor behavior intact. - Re-join to the full event by id — no title join needed. The Mapbox source is
deliberately trimmed to{ id, webPath }(toMapSource,
Map.tsx:64-71), so a hovered
feature carries noschedule. Look theidup in the['geojson']React Query
cache already read at Map.tsx:130-134
— those feed features carry the fullAgnosticFeedEvent(incl.schedule,
eventType,address). Because the popover shows no title, the feed feature
alone is enough — the['event-titles', locale]sliver is not required, so
the popover is fully self-contained from['geojson']. - Render with react-map-gl
<Popup>(v7 exports it; not used anywhere today),
anchored to the pin's coordinates and offset above the pin, with
closeButton={false},closeOnClick={false}, and non-interactive
(pointer-events: none/className) so it never steals the hover from the pin
beneath it or blocks tap-to-open. Style it as a small card with the widget's
tokens (matching the drawer/list surfaces), light + dark. - Content = the timing line only, from the shared formatter. Feed the resolved
feed event intouseEventDisplay(event)and render exactly the compact calendar
fact —[recurrenceLine, eventStartTime].filter(Boolean).join(' · '), with the
same one-off/terminal fallback towhenLinethatEventFactsuses
(EventFacts.tsx:125-137),
and the leadingCalendarIconglyph to match. Factor that calendar-line
composition so the popover andEventFactsshare it rather than re-deriving it —
the point of the single formatting layer (feat(event): redesign event display & registration surfaces #52). The popover component calls the
hook once for the one hovered event (hooks can't run per-feature in a loop). - Pointer-only enhancement. A tap on a pin still navigates directly via the
existingselectFeature/onClick— the popover is a desktop/hover affordance
and must not interfere with tap-to-open on touch.
Acceptance criteria
- Hovering an individual event pin shows a popover with that event's recurrence
+ start time, formatted identically to the top calendar line of its
EventListItemcard (e.g. "Every Thursday · 7:30 PM"), leading calendar glyph
included. - The popover appears only for individual event pins (
unclustered-point),
never for clusters. - The line is produced by the shared
useEventDisplay/EventFactsformatter
— not a re-implementation — so it matches the card across weekly / fortnightly
/ monthly / daily recurrences, one-off and course events, and online events
(event-local time). - The popover follows the correct pin, updates when moving between pins, and
disappears on mouse-leave (of the pin and of the map canvas). - The popover does not capture pointer events (hovering it never flickers or
steals hover from the pin) and does not block click/tap-to-open the event. - Works in light and dark map themes and respects the active locale (localized
weekday names + time format). - No regression to pin click-to-navigate, clustering, or the card→pin highlight
(feat(map): highlight an event's pin when hovering its card #44). - Lint + typecheck + build pass.
- Verified in the running widget across a weekly, a one-off/course, and an
online event.
Files affected
- src/components/organisms/Mapbox/Map.tsx
— hovered-id tracking +<Popup>render; re-join by id from the['geojson']
cache. - src/components/molecules/EventFacts/EventFacts.tsx
and/or src/hooks/use-event-display.ts — factor
out the shared timing-line composition. - New popover component (e.g.
src/components/molecules/EventPinPopover/or an
organisms/Mapbox/sub-component) with a Ladle story. - Possibly src/components/organisms/Mapbox/layers.ts
if a Mapbox hover feature-state is used to detect the hovered pin (optional).
References
- feat(map): highlight an event's pin when hovering its card #44 —
feat(map): highlight an event's pin when hovering its card: the reverse
(list→map) highlight. This ticket is the map-pin-hover complement (and reuses the
samehover-source / cursor machinery). - feat(event): redesign event display & registration surfaces #52 — event display & registration surfaces:
useEventDisplay+EventFactsare
the single source for this line. - Source of the "top line": EventListItem.tsx:96-107
→<EventFacts variant="compact">. - Conventions: .claude/rules/mapbox.md (layers/source),
.claude/rules/data-layer.md (the['geojson']
cache).
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Hold Until
None yet
Activity
feat(map): show recurrence + time popover on event pin hover (#73)
refactor: simplify per /simplify pass
docs: sync mapbox + design-system for popover inline, filter + renames
fix: UI bug sweep — colour system, time filter, event & registration …