Skip to content

fix: remove mirrored control buttons in double view#3546

Merged
igorDykhta merged 3 commits into
masterfrom
igr/dual-view-remove-redundant-buttons
Jul 23, 2026
Merged

fix: remove mirrored control buttons in double view#3546
igorDykhta merged 3 commits into
masterfrom
igr/dual-view-remove-redundant-buttons

Conversation

@igorDykhta

@igorDykhta igorDykhta commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

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:
Screenshot 2026-07-23 at 5 51 12 AM

Copilot AI review requested due to automatic review settings July 23, 2026 02:58
@igorDykhta
igorDykhta requested review from ilyabo and lixun910 July 23, 2026 02:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 when mapState.isSplit is enabled.
  • Simplifies MapLegendPanel split-mode rendering to only mount on mapIndex === 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.

Ihor Dykhta and others added 2 commits July 23, 2026 17:25
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
igorDykhta force-pushed the igr/dual-view-remove-redundant-buttons branch from f9a17b4 to 5e8ce91 Compare July 23, 2026 14:25
Signed-off-by: Ihor Dykhta <ihordykhta@Ihors-MacBook-Pro.local>
@igorDykhta
igorDykhta merged commit e177a47 into master Jul 23, 2026
8 checks passed
@igorDykhta
igorDykhta deleted the igr/dual-view-remove-redundant-buttons branch July 23, 2026 15:38
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.

3 participants