Skip to content

refactor(ui): phase 5 — barres de défilement et contrôles au clic - #19

Merged
tension-atoi merged 1 commit into
refactor/phase-4-keyboardfrom
refactor/phase-5-scroll-and-press
Oct 24, 2026
Merged

tension-atoi merged 1 commit into
refactor/phase-4-keyboardfrom
refactor/phase-5-scroll-and-press

Conversation

@tension-atoi

Copy link
Copy Markdown
Collaborator

Phase 5 du refactor front-end inspiré de Skwir. Empilée sur #18.

Ce qui change

  • Barres de défilement partout : port de la Scrollbar de Skwir (Apache-2.0) dans elements::scrollbar. Elle se pose sur le bord droit (sans décaler le contenu), son pouce est placé dans prepaint à partir de la poignée de défilement ; un clic dans la gouttière saute à l'endroit, un glissement suit le pointeur. Calix n'en avait aucune. Ajoutée au catalogue (tableau et cartes), à l'inspecteur, au journal, aux actualités, aux réglages et à la palette.
  • Activation des contrôles : la trentaine de boutons qui s'activaient sur on_key_down Entrée/Espace passent par on_click de GPUI (au relâchement, une seule fois, seulement si le focus n'a pas bougé). Une touche Entrée maintenue ne répète plus l'action.
  • Installer, Désinstaller, Enregistrer et Réinitialiser s'activent sur un clic complet : un appui qu'on fait glisser hors du bouton est annulé.
  • Texte posé sur une couleur pleine (Installer, Désinstaller, interrupteur actif, cartes de phase, état « copié ») : theme.on(fill), contraste garanti, au lieu de bg_app (oubli de la phase 2).
  • Règles ajoutées à AGENTS.md.

Vérification : cargo test → 272 OK, dont un test qui dessine une vraie liste, clique dans la gouttière (défile jusqu'au bout) puis glisse (revient en haut). À regarder à l'œil : la barre du catalogue au survol, dans les deux thèmes.


Generated by Claude Code

- Port Skwir's scrollbar (Apache-2.0) into `elements::scrollbar`: a bar
  over the right edge of what scrolls, its thumb placed in `prepaint`
  from the scroll handle, a press in the gutter jumping there, a drag
  following the pointer. Calix had none: nothing said how much of a
  catalogue of thousands lay below the fold.
- The catalogue (table and cards), the inspector, the operation log, the
  news, the settings and the palette each get theirs. The pages that
  scrolled both ways without a handle now scroll vertically through one.
- Every control activated by `on_key_down` on Enter/Space (about thirty)
  takes the keyboard through GPUI's `on_click` instead: on key-up, once,
  and only if the focus did not move. A held Enter no longer repeats the
  action.
- Install, Uninstall, Save and Reset act on a full click: a press dragged
  off the button cancels it.
- Text on full colours (Install, Uninstall, an enabled toggle, the
  phase cards, the copied state) uses `theme.on(fill)`, whose contrast is
  guarded, instead of `bg_app`.
- Tests: the thumb's geometry; a real window where a press in the gutter
  scrolls to the end and a drag brings the list back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012CfvJFUwgYwz6HYiWrec9T
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