Medlar/Plans/03 Interface/S013-controls.md
2026-11-25 00:57:46 -06:00

1.7 KiB

S013 — Controls, dialogs and toasts

Category 03 Interface · Model: Opus · Effort: medium · Depends on: S003 · Size: L · Human: no Files touched: crates/app/src/ui/{widgets,dialog,menu,toast,field}, crates/app/tests/widgets

Goal

Every control in M3 Expressive form, so screens are only assembly. FEATURES 9.4 (controls), 9.7.

Read

  • app-taste and animate skills
  • crates/app/src/{motion,theme,tokens}*
  • ~/Projects/Damson/src/ui/widgets.rs
  • ~/Projects/Mulberry/src/ui/widgets.rs (buttons, menus)

Steps

  • Buttons (five kinds, sizes), icon buttons that morph on press, toggle buttons, connected button group whose neighbours give way, split button, FAB and FAB menu, floating toolbar
  • Text field, number with unit, search, combo, slider, range, switch, checkbox, radio, chips, segmented control with sliding selection, tabs
  • Menus and submenus that keep to the window, context menus, tooltips with shortcuts
  • Dialogs of fixed widths, side sheet, confirm; Enter, Escape, focus trap and focus return
  • Toasts with action and undo, stacked, pause on hover
  • Progress-free states for each: hover, press, focus ring, disabled, error, loading after 300 ms
  • Gallery screen behind --gallery, shots of every control in light, dark and hovered
  • docs/PROGRESS.md entry, tick Plans/INDEX.md, commit S013: …, push

End criteria

  • nice cargo test -j 2 -p medlar --test widgets green: hover, press, keyboard, focus return, popups inside the window
  • shots looked at

Pitfalls

Springs for space, critically damped for colour. Nested radii stay concentric. Nothing pushes its neighbours while animating, except the button group by design.

Handoff (→ PROGRESS.md)

Control names and arguments.