Skip to content

refactor(ui): phase 1 — fluidité (leçons de Skwir) - #15

Merged
tension-atoi merged 1 commit into
mainfrom
refactor/phase-1-fluidity
Oct 24, 2026
Merged

tension-atoi merged 1 commit into
mainfrom
refactor/phase-1-fluidity

Conversation

@tension-atoi

Copy link
Copy Markdown
Collaborator

Première des six phases du refactor front-end inspiré de Skwir (même toolkit GPUI).

Ce qui change

  • Plus aucune animation pilotée par cx.notify() depuis render : largeur de la sidebar, hauteur du tiroir et défilement « doux » redessinaient toute la fenêtre à chaque image. Les tailles changent d'un coup ; la liste défile nativement. AnimatedScalar supprimé.
  • L'aiguille du cadran est animée par son élément (with_animation), sans re-rendre la vue.
  • Plus de tailles calculées dans un render et poussées dans d'autres entités (set_assigned_height, set_budget, set_forced_collapsed) : station flex_1 avec plancher, tiroir en bande flex avec plafond relatif, plaque bornée par min_h/max_h(relative).
  • Suppression des hauteurs « mesurées au banc » (47.5, 29.5, 34.5, 131.5, 100.5) : nouvel élément elements::adaptive::AdaptiveStack qui mesure les variantes de la plaque dans prepaint et garde la plus riche qui tient.
  • Poignée de la plaque en vrai drag GPUI, bornes lues dans DragMoveEvent::bounds.
  • Toutes les durées d'animation ≤ 200 ms.
  • Règles ajoutées à AGENTS.md.

Vérification : cargo test → 259 tests OK (266 avant : 10 tests de l'ancien AnimatedScalar et du défilement doux retirés avec le code, 3 ajoutés). Non testé à la main sur un bureau Arch : à vérifier en lançant l'app (redimensionner, ouvrir le tiroir, tirer la plaque).


Generated by Claude Code

…yout

Lessons from Skwir, another GPUI app, applied to the workstation:

- Remove the three animation loops that re-notified from `render` and
  redrew the whole window every frame: the sidebar width, the drawer
  height (which also re-laid out the catalogue each frame) and the eased
  "smooth scroll". Widths and heights change at once; the list scrolls
  natively. AnimatedScalar is gone.
- The scope dial's needle is animated by its element (`with_animation`,
  keyed by a throw count) instead of a view that re-renders itself.
- Stop pushing sizes from one `render` into other entities
  (`set_assigned_height`, `set_budget`, `set_forced_collapsed`). The
  station is `flex_1` with a floor, the drawer a flex band with a
  relative ceiling, the nameplate asks for the user's height and shrinks
  first between its floor and its share. Views that need a pure decision
  from the window (overlay, forced collapse) read it themselves.
- Delete the bench-measured plate heights (47.5, 29.5, 34.5, 131.5) and
  the bank's 100.5: a new `elements::adaptive::AdaptiveStack` measures the
  plate's three variants in `prepaint` and keeps the richest that fits.
- The nameplate edge is a gpui drag that reads its band from
  `DragMoveEvent::bounds`, not from the window.
- Every motion duration stays under a 200 ms ceiling; long cascades
  tighten instead of making the user wait.
- AGENTS.md records the rules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012CfvJFUwgYwz6HYiWrec9T
@tension-atoi
tension-atoi merged commit ea0f086 into main Oct 24, 2026
2 checks passed
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