feat(plugins): dock Layer Swipe in the side panel and follow the dark theme #2845
All Vouch review confidence checks passed
Residual risk 0.24 = Change Risk (0.45) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 402 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.359
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #2845"
general
weight: 0.35
github-actions[bot]
Layer Swipe's settings used to float over the map as a MapLibre control with its own toolbar button and a position submenu. They now open in GeoLibre's dockable side panel, sharing the Style sidebar like Basemaps and GeoAgent. The slider and the clipped comparison map stay on the map.
How it docks
addMapControl) for the plugin's whole lifetime, and the dock only adopts its panel element while the dock shows it. Opening another docked panel (e.g. Basemaps) runs the swipe panel's render cleanup, and that must not stop the swipe, so the genericmountMapControlInPanelbridge (which ties the control to the panel) is not used here.maplibre-gl-swipebuilds its panel late when it has to fetch a basemap style first, so aMutationObserveron the map container catches it. Basemap rebuilds and project restores therefore land in the dock too, and the panel never flashes in its old floating spot.Upstream:
maplibre-gl-swipe0.14.0styledataevent that might not come, which made the Mapbox swipe E2E flaky (6/6 onmain, intermittent on this branch). With 0.14.0 the affected specs passed 21/21.themeoption andsetTheme(). GeoLibre passes the in-app theme (not the system one) and updates it when the theme is toggled; in dark mode the--swipe-variables map onto the app's design tokens. The select proxy, its menu and the checkboxes are GeoLibre's own and get dark rules inswipe-style.ts.maplibre-gl-swipe.Tests
e2e/mapbox-swipe.spec.tsande2e/plugin-deep-link.spec.tsupdated for the docked panel and the plain Layer Swipe menu item (no Activate submenu); both pass 3× in a row.<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
New Features
Layer Swipe settings now open in the right-side dock and remain available while switching basemaps.
Swipe controls and menus now use the app’s dark theme.
Updates
Layer Swipe’s toolbar button is hidden while its docked panel is in use.
* Map-control placement is no longer configurable through the swipe plugin.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->