Skip to content

Commit ed0f9c7

Browse files
lukemeliaclaude
andcommitted
Make the card-chooser selection trigger a primary dropdown button
The "N selected" bulk-selection trigger was a flat teal pill that read as a regression from the previous dropdown. Keep BoxelDropdown + Menu (the right primitives for an action menu) and restyle the trigger as a proper primary dropdown button, modeled on the boxel-ui primary Button / highlight ContextButton: - highlight fill with --boxel-highlight-foreground text, deepening to --boxel-highlight-hover on hover and while the menu is open - roomier internal spacing and a taller min-height so the content is no longer squished - keyboard focus draws a ring outside the button and no longer darkens the fill (deepening is reserved for hover / open) - the caret flips to point up while the menu is open Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 88db2a4 commit ed0f9c7

1 file changed

Lines changed: 24 additions & 6 deletions

File tree

packages/host/app/components/card-search/search-result-header.gts

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,23 +141,35 @@ export default class SearchResultHeader extends Component<Signature> {
141141
gap: var(--boxel-sp-xs);
142142
}
143143
144+
/* Primary dropdown trigger (not a flat pill): the highlight fill
145+
with its readable foreground, deepening on hover and while the
146+
menu is open. Modeled on the boxel-ui primary button / highlight
147+
ContextButton so it reads as a standard dropdown control rather
148+
than a one-off chip. */
144149
.selection-dropdown-trigger {
145150
display: inline-flex;
146151
align-items: center;
147-
gap: var(--boxel-sp-5xs);
148-
min-height: 1.625rem;
149-
padding: 0 var(--boxel-sp-xs);
152+
gap: var(--boxel-sp-xxs);
153+
min-height: 2rem;
154+
padding-inline: var(--boxel-sp-xs);
150155
border: none;
151-
border-radius: 0.375rem;
156+
border-radius: var(--boxel-border-radius-sm);
152157
background-color: var(--boxel-highlight);
153-
color: var(--boxel-dark);
158+
color: var(--boxel-highlight-foreground);
154159
font: 700 var(--boxel-font-sm);
155160
cursor: pointer;
161+
transition: background-color var(--boxel-transition);
156162
}
157163
.selection-dropdown-trigger:hover,
158-
.selection-dropdown-trigger:focus-visible {
164+
.selection-dropdown-trigger[aria-expanded='true'] {
159165
background-color: var(--boxel-highlight-hover);
160166
}
167+
/* Keyboard focus shows a ring just outside the button; the fill is
168+
not darkened on focus (deepening is reserved for hover / open). */
169+
.selection-dropdown-trigger:focus-visible {
170+
outline: 2px solid var(--boxel-highlight);
171+
outline-offset: 2px;
172+
}
161173
.selection-trigger-icon {
162174
width: 0.875rem;
163175
height: 0.875rem;
@@ -169,6 +181,12 @@ export default class SearchResultHeader extends Component<Signature> {
169181
}
170182
.dropdown-arrow {
171183
flex-shrink: 0;
184+
transition: transform var(--boxel-transition);
185+
}
186+
/* Caret flips to point up while the menu is open, matching the
187+
standard dropdown affordance. */
188+
.selection-dropdown-trigger[aria-expanded='true'] .dropdown-arrow {
189+
transform: rotate(180deg);
172190
}
173191
.selection-menu {
174192
--boxel-menu-item-content-padding: var(--boxel-sp-xs) var(--boxel-sp-sm);

0 commit comments

Comments
 (0)