Skip to content

Hide dropdown separator when no extra options#8763

Open
Copilot wants to merge 2 commits into
mainfrom
copilot/ui-merge-button-separator-fix
Open

Hide dropdown separator when no extra options#8763
Copilot wants to merge 2 commits into
mainfrom
copilot/ui-merge-button-separator-fix

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 1, 2026

The merge/action dropdown rendered its vertical separator unconditionally, leaving a stray divider on the right edge of the button when only a single option was available (the expand chevron is already hidden in this case).

Changes

  • webviews/components/dropdown.tsx: only render the split/separator element when options has more than one entry.
  • Extracted a hasMultipleOptions constant and reused it for the existing select-left class and expandButtonClass checks to keep the three branches consistent.

Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix separator visibility for merge button with no extra options Hide dropdown separator when no extra options Jun 1, 2026
Copilot AI requested a review from alexr00 June 1, 2026 10:59
@alexr00 alexr00 marked this pull request as ready for review June 3, 2026 13:03
Copilot AI review requested due to automatic review settings June 3, 2026 13:03
@alexr00 alexr00 enabled auto-merge (squash) June 3, 2026 13:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a small UI polish issue in the merge/action dropdown webview: when there is only a single option available (and the expand chevron is hidden), the vertical split/separator is now also hidden so the button no longer shows a stray divider.

Changes:

  • Introduced a hasMultipleOptions boolean to centralize the “more than one option” check.
  • Render the split/separator element only when multiple dropdown options exist.
  • Reused hasMultipleOptions for both the left-button styling (select-left) and expand-button visibility class to keep behavior consistent.
Show a summary per file
File Description
webviews/components/dropdown.tsx Conditionals updated so the split/separator only renders when multiple options exist, avoiding a stray divider in the single-option case.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

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.

UI: merge button should not show separator when no extra options

3 participants