Feature request: border (and tone) on attached action buttons (SelectFieldAction) #
- Status: RESOLVED (2026-06-18) — added per-action
border?: boolean+tone?: IconButtonTonetoSelectFieldAction, forwarded onto the actionIconButtoninSelectControl. Flows throughSelectFieldautomatically (it re-exports the type + forwardsactions). Default off (no change to existing consumers). NOT touched:TextControl.actions/ search stepper — those use the separateInputActions(.stage-input-action) affordance, which is already bordered (seamed), so no shared-type change needed. Tested (border + tone class passthrough), playground SelectField section gained a bordered prev/next stepper, docs in controls.md. - Component:
controls/SelectControl.tsx(SelectFieldAction) + passthrough oncontrols/SelectField.tsx; likely the shared attached-action button path (TextControl.actions/ the search stepper use the same affordance — see8733362) - Pulled by: dsts-viewer (prev/next clip buttons attached to the Animation
SelectField) - Severity: low (cosmetic/consistency; no consumer workaround that isn't a hack)
- Date: 2026-06-18
Use case / what happens #
SelectField actions render icon buttons flush-right of the select — great for
a "dropdown + stepper" row (dsts-viewer attaches prev/next animation-clip buttons
this way). But SelectFieldAction is:
export interface SelectFieldAction {
readonly icon: () => JSX.Element;
readonly title: string;
readonly onClick: () => void;
readonly active?: (() => boolean) | undefined;
readonly disabled?: (() => boolean) | undefined;
}
— no border. The buttons render as borderless IconButtons. Every other
icon-button surface in the library exposes border: IconButton.border,
IconButtonField, ButtonGroupControl/ButtonGroupField (buttonBorder),
IconToggleField.border. So a consumer can border every icon button in a panel
except the ones attached to a select — they stay borderless and read
inconsistently next to bordered siblings (in dsts-viewer's Animation section, the
Expression toggles and the Frame stepper are bordered, but the clip prev/next
attached to the dropdown can't be).
There's no consumer-side fix that isn't a hack — the action buttons aren't
reachable except by overriding .stage-icon-button internals.
Recommended implementation #
Add an optional border?: boolean (and, for parity with IconButton,
tone?: IconButtonTone) to SelectFieldAction, forwarded to the IconButton
that renders each action:
export interface SelectFieldAction {
readonly icon: () => JSX.Element;
readonly title: string;
readonly onClick: () => void;
readonly active?: (() => boolean) | undefined;
readonly disabled?: (() => boolean) | undefined;
readonly border?: boolean | undefined; // ← new
readonly tone?: IconButtonTone | undefined; // ← optional, parity
}
Default false (no change to existing consumers). If the same attached-action
button type backs TextControl.actions / the search stepper, add it there too so
the affordance stays uniform across controls (a single shared *Action type with
border is ideal).
Per-action rather than a single field-level flag: a mixed row (one bordered
stepper + one borderless clear, say) stays expressible. A field-level
actionBorder convenience could come later if every-action-the-same is the
common case.
Validation in dsts-viewer (separate from the playground) #
Run from
/home/developers/Repos/dsts-viewer; validates in dsts-viewer's own UI, independent of the playground.
- Bump the dep, then in
src/components/editorModules/AnimationModule.tsxaddborder: trueto the two AnimationSelectFieldactions(Previous/Next animation). pnpm start; withnode scripts/cdp.mjsassert both attached buttons carry the bordered class:node scripts/cdp.mjs eval "Array.from(document.querySelectorAll('.stage-field-control')).find(f=>/^Animation$/.test(f.querySelector('.stage-field-name')?.textContent||'')).querySelectorAll('.stage-icon-button-bordered').length"→2.- Confirm the clip prev/next still step the selection and disable when there are no clips.
pnpm prebuildclean.
Scope #
Small, additive, opt-in. Closes a consistency gap — border is on every other
icon-button surface; attached select (and text) actions are the only ones missing
it.