Skip to content

feat: floating popover editor for sites, links, and simulations (#804)#806

Merged
wilhel1812 merged 1 commit intostagingfrom
issue/804-map-popover-editor
Apr 28, 2026
Merged

feat: floating popover editor for sites, links, and simulations (#804)#806
wilhel1812 merged 1 commit intostagingfrom
issue/804-map-popover-editor

Conversation

@wilhel1812
Copy link
Copy Markdown
Owner

Summary

  • Replaces resourceDetailsPopup and linkModal ModalOverlay editors with MapEditorPanel — a floating popover anchored to the invoking sidebar button
  • Unifies edit + create into a single panel for sites, links, and simulation presets (including AccessSettingsEditor and all existing fields)
  • Dismissed by ESC, click outside, or × button; mobile renders as a bottom-sheet
  • Position is computed with right-of-trigger preference and full viewport collision clamping (16 px margin)
  • mapEditor slice added to appStore (openMapEditor / closeMapEditor); trigger buttons pass getBoundingClientRect() at click time — no ref threading required
  • useMapEditorFormState hook owns all draft state previously spread across Sidebar.tsx

Test plan

  • Click a site pencil → popover floats to the right of the pencil, fully visible in viewport
  • Click "Add Site" → same panel in create mode, lat/lon pre-filled from map center
  • Edit site name → Save → sidebar reflects change, popover closes
  • Press ESC → popover closes without saving
  • Click outside popover → closes without saving
  • Click × → closes without saving
  • Click link pencil → link editor anchored to that row's pencil
  • Click "Add Link" → link panel in create mode
  • Simulation "Edit" → simulation editor popover (name / description / access)
  • Mobile (<768 px): all three editors appear as bottom sheet with slide-up animation
  • Resize browser while popover is open → panel stays visible (recomputes position)
  • npm test — 461 tests pass; npm run build — clean

🤖 Generated with Claude Code

…nks, and simulations (#804)

Introduces MapEditorPanel — a floating popover anchored to its trigger button — that
unifies edit and create flows for site library entries, links, and simulation presets.
Dismissed by ESC, outside-click, or ×; renders as a bottom sheet on mobile.
Old ModalOverlay blocks for resourceDetailsPopup and linkModal are now dead code.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@wilhel1812 wilhel1812 merged commit 2ac227b into staging Apr 28, 2026
5 checks passed
@wilhel1812 wilhel1812 deleted the issue/804-map-popover-editor branch April 28, 2026 17:52
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.

1 participant