Repository navigation
Toolbar controls: the folded mode menu and the segmented controls share one box - #66
Merged
Merged
Conversation
…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>
There was a problem hiding this comment.
🟡 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
…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>
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.

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:
bg-background,dark:bg-input/30) with itsborder-inputedge, 32px height androunded-mdcorners.border-input, so their outer box matches the buttons'. Inside, the inactive segments stay on thebg-mutedtrack.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.