Skip to content

Toolbar controls: the folded mode menu and the segmented controls share one box - #66

Merged
agorischek merged 4 commits into
mainfrom
mode-menu-well
Nov 20, 2026
Merged

agorischek merged 4 commits into
mainfrom
mode-menu-well

Conversation

@agorischek

@agorischek agorischek commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

When the toolbar narrows, the mode switch folds into a menu. Beside the toolbar's other controls its trigger didn't read as the same family. The user, verbatim: "This view selector seems to lose its outline and background in its compact form… It should probably keep its background and border", and then "The projection selector control has a background color, but the view selector control does not".

What changed:

  • The mode menu's trigger takes the toolbar's outline button fill (bg-background, dark:bg-input/30) with its border-input edge, 32px height and rounded-md corners.
  • The segmented controls (mode, scope) now edge their track with the same border-input, so their outer box matches the buttons'. Inside, the inactive segments stay on the bg-muted track.

Test: toolbar-layout.spec.ts (the row/hysteresis test, where the menu shows on a narrow toolbar) asserts that the trigger's fill equals an outline button's, and that its height, corners and edge equal a segmented control's. Chromium desktop passes locally.

The same change goes into the utility-area stack (#58, #65). The Playground's Primer host gets its own version, on githubnext/projections.private#16 and #17.

…o a menu

On a narrow toolbar the mode switch folds into a menu whose trigger drew a white
outline button, not the segmented control's filled well, so it read as another
kind of control beside the scope switch. The trigger now keeps the switch's
box: its height, corners, fill and edge. The narrow-toolbar spec compares them.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The compact trigger loses its visible border and intended dark-mode hover fill because the ghost Button’s default styles are not overridden.

1 open issue
What changed in this PR

This PR updates the default host UI’s compact mode selector to preserve the segmented control’s appearance when a narrow toolbar folds it into a menu.

Changes:

  • Adjusts the trigger’s corners, muted background, shadow, and hover styling.
  • Adds a browser assertion comparing its height, radius, fill, and border with a segmented-control reference.
File Description
packages/​host/​core/​src/​ui/​view-controls.tsx Updates compact mode-menu trigger styling.
packages/​host/​core/​browser/​toolbar-layout.spec.ts Adds computed-style checks for the compact trigger.

Review effort: Balanced

@agorischek agorischek changed the title Mode menu: keep the segmented control's box when the switch folds into a menu Toolbar controls: the folded mode menu and the segmented controls share one box Nov 20, 2026
agorischek and others added 2 commits November 19, 2026 19:55
…trols

The person's follow-up: beside the outline buttons, the folded switch's track
fill read as missing a background. The trigger takes the toolbar's outline
button fill again, and the segmented controls' edge is the same input border, so
the trigger, the buttons and the switches share one height, corners and edge;
the segmented controls keep their track inside.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The ghost button's dark hover (muted at half) and open fill (muted)
outranked the trigger's accent: they are other variants, so the merge
kept them. The trigger now sets both. The spec measures its edge and
hover fill in light and dark.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@agorischek
agorischek merged commit 326926d into main Nov 20, 2026
95 of 96 checks passed
@agorischek
agorischek deleted the mode-menu-well branch November 20, 2026 06:31
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.

2 participants