Skip to content

Pins: Add sidebar for pinned map cards#683

Open
RutanshS wants to merge 1 commit into
masterfrom
pinned-cards
Open

Pins: Add sidebar for pinned map cards#683
RutanshS wants to merge 1 commit into
masterfrom
pinned-cards

Conversation

@RutanshS

Copy link
Copy Markdown

Fixes #669

Summary: Replaces the floating map cards with a sidebar panel. Pinned entities appear in a scrollable sidebar on the left side of the map. Hovering on the said cards highlights the corresponding map centroids or territories.

Changes

  • User experience
    • Clicking a map centroid or territory pins/unpins it. (Toggle)
    • Pinned entities appear in a sidebar panel instead of floating over the map.
    • Hovering a sidebar card highlights the corresponding centroid or territory on the map.
    • Clicking anywhere else on the map no longer closes all cards.
  • Logical changes
    • EntityMap: Replaced FloatingCard state and map positioning logic with the MapSidebar Component and uses the pinnedEntities derived from the URL.
    • MapCentroids / MapTerritories: Added hoveredId and pinnedIds for visual feedback on pinned entities. Fixed pinCard typing.
  • Refactors
    • Renamed openCard to pinCard and closeCard to unpinCard to match the actual behavior.
    • Removed the mapScale, updateMapScale and handleZoomIn function wrappers that existed only for positioning floating cards.

Out of scope/Future work: Unit Tests, Clear All Button in sidebar, Maximum Pin Limit (Maybe).

Screenshots

Pinned Single Card

Pinned Single Card

Pinned Multiple Cards

Pinned Multiple Cards

Pinned Card Hover

Pinned Card Hover

@RutanshS RutanshS requested a review from a team as a code owner June 23, 2026 14:31
@github-actions

Copy link
Copy Markdown
Contributor

Cloudflare Pages preview

@RutanshS RutanshS requested a review from conradarcturus June 23, 2026 14:35
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.

Pins: Reconsider Map Pins

1 participant