Repository navigation
Closed
Labels
Description
What
Redesign Phase 2 — consolidate components onto shared primitives and fix interaction/state polish. Depends on Phase 1 tokens (#SLICE3).
Why
Components reinvent buttons (.action defined twice across ConnectionSection/FileStreamingSection), the Add-Layer picker reads as raw content not a menu, icon hit-targets are under 24px, and state/motion is half-wired. Routing through existing primitives removes drift with little new code.
Where
fiberpath_gui/src/styles/buttons.css, forms.css; src/ui/*; src/components/machine/*, src/components/layers/LayerList.svelte, src/components/canvas/Viewport.svelte, src/shell/Toasts.svelte, src/ui/Dialog.svelte.
Changes
- Buttons: route all
.action/.cmd/.send/.icon-btnthrough.btn; add.btn--danger/--warn/--successonce inbuttons.css(E-Stop etc.); delete per-component.action*blocks. Start Stream and Generate preview →.btn .btn--primary(teal); green moves to the active "streaming" status only. - Icon button primitive: add shared
.icon-btn(square--input-height-sm, centered, transparent base, hover--color-bg-hover, full focus ring); apply to refresh/duplicate/delete/clear/dialog-close/layer-row handle; pad "+ Add Layer" to--input-height-sm. - Add-Layer picker → real popover:
position:absoluteunder the button,box-shadow: var(--shadow-lg),background: var(--color-bg-panel), single 1px border,z-index: var(--z-index-dropdown), close on outside-click/Escape. Replace off-scale2pxwith--spacing-xs;.layers__add → .btn .btn--ghost .btn--small. - Section header vs input surface:
.section__headerflat--color-bg-panel+ bottom hairline;--color-bg-panel-altreserved for input wells; wireheight: var(--panel-header-height). Section titles →--color-text(eyebrow); field labels →--color-text-labelat--font-size-sm(fixes inverted hierarchy). - Inputs: recessed
--color-bg-panel-altinside--color-bg-panelwith the new border; apply to Machine selects too. Conditional unit gutter: default symmetric padding, add.param-form__input--with-unittoggled byNumberFieldonly when a unit is present (kills the 48px dead gutter). - Empty states: one shared pattern (title + optional hint + optional action); error variant = error-colored title + Retry. Output Log empty copy centered, sans,
--font-size-sm. - Toasts/motion:
in:fly={{x:16,duration:150}} out:fade+animate:flip; wire the unused 6s error duration; pause dismiss on hover/focus. - Dialog a11y: focus into dialog on open, trap Tab, restore on close,
aria-labelledby→ visible<h2>. Input focus: addoutline:2px solid transparent; outline-offset:2pxfor forced-colors. Helpⓘ→ focusable button (not title-only).
Acceptance criteria
- No component defines its own button styles; one
.btnsystem +.icon-btnused everywhere; only teal primaries at rest. - Add-Layer is an elevated popover that closes on outside-click/Escape.
- Interactive hit targets ≥ 24×24; dialogs trap+restore focus; help is keyboard-accessible.
- Toasts animate in/out; error toasts persist ~6s and pause on hover.
-
npm test+npm run lint/lint:cssgreen; before/after screenshots attached.
Activity
feat(gui): redesign phase 2 — consolidate buttons & primitives
CameronBrooks11 commentedon Jun 27, 2026
Core landed in #242 (commit e061926): button/icon-btn consolidation, two-primaries fix, Add-Layer popover, header/label hierarchy, recessed inputs, conditional unit gutter, forced-colors outline, toast 6s + motion. Remaining a11y/refactor items split to #243.