fix: remove mirrored control buttons in double view#3546
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes split/dual view UI duplication where map control buttons (and opened menus) appeared on both maps by ensuring controls (and the legend panel) render only on the right-hand map (mapIndex === 1 / primary === true).
Changes:
- Conditionally renders
<MapControl />only for the primary/right map whenmapState.isSplitis enabled. - Simplifies
MapLegendPanelsplit-mode rendering to only mount onmapIndex === 1, aligning legend placement with the single controls instance.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/components/src/map/map-legend-panel.tsx | Removes split-mode branching and ensures the legend panel only renders on the right-side map in split mode. |
| src/components/src/map-container.tsx | Prevents duplicate map controls in split mode by rendering <MapControl /> only on the primary/right map. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
lixun910
approved these changes
Jul 23, 2026
Signed-off-by: Ihor Dykhta <ihordykhta@Ihors-MacBook-Pro.local>
Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Ihor Dykhta <ihordykhta@Ihors-MacBook-Pro.local>
igorDykhta
force-pushed
the
igr/dual-view-remove-redundant-buttons
branch
from
July 23, 2026 14:25
f9a17b4 to
5e8ce91
Compare
Signed-off-by: Ihor Dykhta <ihordykhta@Ihors-MacBook-Pro.local>
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.
In dual/split view the map control buttons were rendered on both maps, so any menu opened on one side was mirrored on the other. This keeps the controls (and the legend) only on the right-side map.
Before:
