Repository navigation
Conversation
Fixes #325 (items 1 and 5). A dropdown trigger could only hold a label and a leading icon, had no trailing chevron, and every menu took the style's width. - DropdownChain::children builds content inside the trigger, as ButtonChain::children does; with Face::Empty the trigger is the children alone, named by the face. - DropdownChain::chevron draws the select's down chevron after the content, at the select's size (select.chevron) and tone (select.chevron_opacity) and the trigger's own gap, so the two match across styles and sizes. No style field is added. - DropdownChain::menu_classes merges classes over that menu's box alone. - The menu example: Actions ends in a chevron; an Accent dropdown shows a swatch trigger, a chevron and a wider menu. Behaviour change: the menu example's top row has the chevron and the Accent trigger; six menu goldens change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LesfK54UWq1haPSEr9X22o
# Conflicts: # tests/it/menu.rs # tests/snapshots/menu_destructive_dark.png # tests/snapshots/menu_destructive_light.png # tests/snapshots/menu_open_dark.png # tests/snapshots/menu_open_light.png
This was referenced Nov 18, 2026
Owner
Author
|
Approved by the user (2026-11-18). Gate (my run with current main): |
samitbasu
added a commit
that referenced
this pull request
Nov 18, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWiKKe8zfqGfVMCSC5L3up
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.
Fixes #325: items 1 and 5 of the design note. Items 2, 3 and 4 are in #342, and item 6 is in #344.
What changes
DropdownChain::children(body): buildsbodyinside the trigger, after its icon and label, asButtonChain::childrendoes. WithFace::Empty(name)the trigger is the children alone (a swatch, say), named byname.DropdownChain::chevron(): a down chevron after the trigger's content (after the children, if any), the same one the select draws. It reads the select's own tokens, so the two always match across Vega, Lyra and the sizes, and it adds no style field:select.chevronselect.chevron_opacityover the trigger's text colourDropdownChain::menu_classes(tw): classes merged over this dropdown's menu box only, such asmin_w_pxormax_h. Submenus and other menus keep the style's.Face::Empty), a chevron, and a 200 px menu (menu_classes).Nothing breaks: all three are additions.
Decisions
Picked by the user:
menu_classes(tw)rather thanmin_width(..).Decided by default, for review:
.chevron()is the stock down chevron only, not a general trailing icon on every button.menu_classesyet.Changed goldens
Actions' chevron and the new Accent trigger appear in the top row:
tests/snapshots/menu_open_light.pngtests/snapshots/menu_open_dark.pngtests/snapshots/menu_destructive_light.pngtests/snapshots/menu_destructive_dark.pngtests/snapshots/menu_list_open_light.pngtests/snapshots/menu_list_open_dark.png(the list covers the top row; the new trigger shows beside it)Main, with #342 and #344 merged, is merged into this branch; the first four were regenerated over #342's, so they show Show grid's Ctrl+Alt+G too.
Tests
New in
tests/it/menu.rs,mod trigger, through the real path:a_chevron_trails_the_label_at_the_triggers_gap_and_is_as_big_as_a_selects: the gap after the label is the trigger's own gap, measured from an icon trigger, and the chevron is the select's size. The trigger is still named by its label.the_chevron_takes_the_selects_size_and_tone_from_the_style: withselect.chevronset to 20, both the dropdown's chevron and the select's are 20 px. At a quarterchevron_opacitythe chevron draws at under half the alpha of full opacity.a_trigger_has_no_chevron_unless_askedchildren_fill_a_trigger_whose_face_is_empty_and_it_is_named_by_the_face: the child is inside the trigger and before the chevron, and the trigger, named by the face, opens its menu.menu_classes_reach_that_menus_box_alone: 300 px for that menu, the style's width for its sibling.Reversion check: on main the suite does not compile (the API is new). Each mutation below fails its tests, and the unmutated branch passes all five:
TODO(prose)
DropdownChain::children,DropdownChain::chevron,DropdownChain::menu_classes.Manual trial
The menu example (
examples/menu.rs):🤖 Generated with Claude Code
https://claude.ai/code/session_01LesfK54UWq1haPSEr9X22o