Map layers panel#4281
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a “Map layers” side panel in the Data Map view, letting users browse/select layer points (markers), sort them, and fly the map to a selected point, while keeping the Leaflet map mounted during layout changes.
Changes:
- Added
MapLayersPanel+ context/provider to register active layers and drive selection/sorting. - Implemented resizable split layout (panel + map) and a Leaflet resize handler to keep the map sized correctly when the panel changes width.
- Added a reusable
useHorizontalResizehook and new i18n strings for the panel controls.
Reviewed changes
Copilot reviewed 21 out of 23 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| webapp/views/App/views/Data/MapView/MapView.tsx | Wraps map view in panel provider; adds stable split layout + resize gutter. |
| webapp/views/App/views/Data/MapView/MapView.scss | Adds flex layout styles for panel/gutter/map. |
| webapp/views/App/views/Data/MapView/MapLayersPanel/MapLayersPanelContext.tsx | New context managing active layers, sort orders, selection, and visibility. |
| webapp/views/App/views/Data/MapView/MapLayersPanel/MapLayersPanel.tsx | New MUI-based panel UI with accordions, sorting, and virtualized point list. |
| webapp/views/App/views/Data/MapView/MapLayersPanel/MapLayersPanel.scss | Placeholder stylesheet comment for the panel. |
| webapp/views/App/views/Data/MapView/MapLayersPanel/index.ts | Exports panel and provider. |
| webapp/views/App/views/Data/MapView/GeoAttributeDataLayer/useGeoAttributeDataLayer.js | Clears query/points on layer removal; exposes layerInnerName. |
| webapp/views/App/views/Data/MapView/GeoAttributeDataLayer/GeoAttributeDataLayer.js | Registers/unregisters layer in panel context; syncs selected point on popup open/close; applies panel sort order for navigation. |
| webapp/views/App/views/Data/MapView/GeoAttributeDataLayer/CoordinateAttributeMarker.js | Emits popupopen events to sync selection with the panel. |
| webapp/components/MapContainer/MapContainer.js | Adds ResizeObserver-based handler to invalidate Leaflet size on container resize. |
| webapp/components/hooks/useHorizontalResize.ts | New hook for mouse/touch/keyboard horizontal resizing. |
| webapp/components/hooks/index.js | Exports the new resize hook. |
| core/i18n/resources/*/dataView.js | Adds translations for panel show/hide and sort controls. |
| package.json | Bumps Yarn packageManager to 4.17.0. |
| .yarnrc.yml | Updates yarnPath to 4.17.0. |
| .claude/settings.json | Adds Claude tool settings (npx tsc permission). |
Comments suppressed due to low confidence (2)
webapp/views/App/views/Data/MapView/MapView.tsx:193
GeoAttributeDataLayerno longer receiveseditingRecordUuid, butuseGeoAttributeDataLayerstill relies on it to refresh points after a record edit (seeuseGeoAttributeDataLayerdestructuringeditingRecordUuid). This likely breaks marker updates after editing a record from the map popup/modal.
webapp/views/App/views/Data/MapView/MapView.tsx:70- The resize gutter uses left/right arrow keys and changes width horizontally, but
aria-orientationis set tovertical. For a slider that adjusts via left/right, this should behorizontalso assistive tech announces it correctly.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
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.



resolves #3657