Skip to content

feat(gui): redesign phase 2 — consolidate buttons & primitives - #242

Merged
CameronBrooks11 merged 1 commit into
mainfrom
feat/gui-redesign-phase2-components
Jun 27, 2026
Merged

CameronBrooks11 merged 1 commit into
mainfrom
feat/gui-redesign-phase2-components

Conversation

@CameronBrooks11

@CameronBrooks11 CameronBrooks11 commented Jun 27, 2026 •

Copy link
Copy Markdown
Member

Part of the GUI redesign epic #238. Implements the core of Phase 2 (#236): consolidate every bespoke button onto the shared .btn system + a new .icon-btn primitive, fix the inverted header/label hierarchy, and tidy inputs/states.

Buttons & primitives

  • buttons.css: add .icon-btn (28px square, ≥24px hit target), .btn--danger, .btn--warn, .btn--block. No .btn--success — green stays status-only per the design direction.
  • Two-primaries fix: Connect and Start Stream are now the single teal primary (Start Stream was a competing green). E-Stop/Stop → .btn--danger, Pause → .btn--warn, Send/Home/etc → .btn--secondary, refresh/clear/autoscroll/zoom → .icon-btn. Deleted the per-component .action/.cmd/.send/.vp__btn/.log__btn blocks. The streaming progress bar now carries the green (accent-color) — green = active status, not a resting button.
  • Add-Layer popover: now a real elevated popover (--shadow-lg, panel surface, single border, z-index) that closes on outside-click / Escape; row controls → .icon-btn.

Hierarchy & inputs

  • Fix the inverted hierarchy: section titles → --color-text (dominant eyebrow), field labels → --color-text-label at --font-size-sm.
  • InspectorSection header is a clean hairline divider (no filled bar), reserving --color-bg-panel-alt for input wells; recessed the Manual Control input.
  • NumberField adds the unit gutter only when a unit is present — removes the dead 48px gutter on unitless fields.
  • Inputs gain a transparent focus outline for forced-colors / HCM.

States

  • Wire the previously-unused 6s error-toast duration; animate toast enter/exit (fly/fade + flip).

Deferred → #243

Dialog focus-trap/restore + aria-labelledby, help-glyph-as-button, shared empty-state component, and toast pause-on-hover are split into a follow-up (#243) to keep this PR reviewable.

Verification

  • tsc, check:svelte (0 errors), lint:css, lint:css:vars, 316/316 vitest green.
  • QA'd live in the browser: single teal primary across Connect/Start Stream, danger E-Stop, elevated Add-Layer popover (outside-click closes), dominant section headers with stepped-down labels, recessed inputs. (Net −33 lines from de-duplication.)

Refs #236

Route every bespoke button through the shared .btn system and a new .icon-btn
primitive, resolving the competing-primaries and drifting-control issues:

- buttons.css: add .icon-btn (28px square, ≥24px hit target), .btn--danger,
  .btn--warn, and .btn--block. (No .btn--success: green stays status-only.)
- Machine panes: Connect + Start Stream are now the single teal primary (Start
  Stream was a competing green); E-Stop/Stop -> .btn--danger, Pause -> .btn--warn;
  Send/Home/etc -> .btn--secondary; refresh/clear/autoscroll -> .icon-btn. Delete
  the per-component .action/.cmd/.send blocks. Streaming progress bar carries the
  green (accent-color) — green = active status, not a resting button.
- Viewport: toolbar glyphs -> .icon-btn; Generate preview/Retry -> .btn--primary.
- LayerList: Add-Layer picker is now a real elevated popover (--shadow-lg, panel
  surface, single border, z-index) that closes on outside-click/Escape; row
  controls -> .icon-btn; off-scale 2px -> --spacing-xs.

Hierarchy & inputs:
- Fix the inverted header/label hierarchy: section titles -> --color-text
  (dominant eyebrow), field labels -> --color-text-label at --font-size-sm.
- InspectorSection header is a clean hairline divider (no filled bar), reserving
  --color-bg-panel-alt for input wells; recess the Manual Control input too.
- NumberField adds the unit gutter only when a unit is present (.--with-unit),
  removing the dead 48px gutter on unitless fields.
- Inputs gain a transparent focus outline for forced-colors mode.

States:
- Wire the unused 6s error-toast duration; animate toast enter/exit (fly/fade +
  flip).

Deferred to a follow-up: dialog focus-trap/restore, help-glyph-as-button,
shared empty-state component, toast pause-on-hover.

Refs #236
@CameronBrooks11
CameronBrooks11 merged commit e061926 into main Jun 27, 2026
18 checks passed
@CameronBrooks11
CameronBrooks11 deleted the feat/gui-redesign-phase2-components branch June 27, 2026 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant