Lay the animation foundation and veil the switch between tabs (#86)
Follow the Windows « Show animations » setting at start and on its change, keep the strongest animation asked for while « Défi » is not visible until it shows again, and switch tabs under a veil of the page's background instead of fading or sliding the screen, which would draw the cached views again at every frame. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WYQB8paBcLk67XoAUYARBK
This commit is contained in:
1 parent
0f860fda15
commit
2ede37c521
5 files changed
+754
-18
No files matched your search
+3
-3
@@ -54,13 +54,13 @@ Cette section décrit l’identité « L’Anneau ». [La page de référence](p
|
||||
|
||||
**Illustration.** La bannière montre une fenêtre d’environ 80 % de la largeur du splash du champion, centrée sur lui (voir les décisions d’implémentation pour le cadrage). Elle passe d’une illustration à l’autre par un fondu.
|
||||
|
||||
**Animations.** Elles sont toujours déclenchées par un événement et ne dessinent rien au repos. Elles suivent le réglage Windows « Afficher les animations » ; l’appli n’a pas de réglage « Animations ».
|
||||
**Animations.** Elles sont toujours déclenchées par un événement et ne dessinent rien au repos. Elles suivent le réglage Windows « Afficher les animations », lu au démarrage et à chacun de ses changements : coupé, chaque animation laisse place à son état final. L’appli n’a pas de réglage « Animations ». « Défi » est visible quand la fenêtre est affichée et non réduite (Windows ne signale pas une fenêtre seulement recouverte), sans « Statistiques », « Paramètres » ni sélection devant lui.
|
||||
|
||||
- Fin d’une Partie suivie en direct. Un top 1 déclenche la comète, la bannière et « Validé ». Une nouvelle Marque fait monter la graduation d’un cran et remplit la coche. Sinon, la graduation clignote et la ligne « Dernière Partie » apparaît en fondu. L’animation est différée jusqu’à ce que « Défi » soit visible, elle ne joue que la plus forte des Parties terminées entre-temps, et elle est abandonnée si une sélection commence. Les Parties importées ou lues dans l’historique n’animent rien.
|
||||
- Entrée en sélection : balayage, titre, cartes distribuées. Sortie : les cartes se retirent.
|
||||
- Transitions entre « Défi » et « Statistiques » : un fondu avec un léger glissement.
|
||||
- Transitions entre « Défi » et « Statistiques » : l’écran sortant passe sous un voile de la couleur du fond (≈ 130 ms), puis l’entrant en sort (≈ 280 ms). La barre du haut ne bouge pas. Changer d’onglet pendant une transition repart de là où en est le voile. Pas de glissement : déplacer l’écran redessinerait à chaque image la grille, l’anneau et les graphiques, qui sont en cache.
|
||||
- Survol : le même sur toutes les cartes. Le voile sur les cartes voisines ne s’applique que dans la main de la sélection.
|
||||
- Limites de GPUI, sans le modifier (ADR-0004) : pas de rotation, pas d’espacement des lettres animé, une montée de la carte au lieu d’un grossissement, un voile au lieu d’un filtre.
|
||||
- Limites de GPUI, sans le modifier (ADR-0004) : pas de rotation, pas d’espacement des lettres animé, une montée de la carte au lieu d’un grossissement, un voile au lieu d’un filtre ou d’un fondu de l’écran entier.
|
||||
|
||||
### Page « Statistiques »
|
||||
|
||||
|
||||
@@ -46,6 +46,8 @@ GPUI and gpui-component are not modified to meet a budget: the app's own renderi
|
||||
The identity (ring, banner, animations; `docs/interface.md`) follows the same rule:
|
||||
|
||||
- **Animations are triggered by an event** (end of a followed Match, champ select entering or leaving, card hover, tab change) and **draw nothing at rest**. No timer or loop keeps a frame going once an animation is over, and none runs while the window is hidden or minimised. They follow the Windows « Show animations » setting.
|
||||
- **The foundation** (`crates/app/src/motion.rs`, #86) is the one place that decides whether the app animates, and when. The Windows setting reaches GPUI's `App::reduce_motion`: gpui-base reads it at start, and the window's own `WM_SETTINGCHANGE` for `SPI_SETCLIENTAREAANIMATION` reads it again, with no polling. When it is off, a tab switch shows its end state at once and an animation asked for is not played. An animation asked for while « Défi » is not visible (window minimised or hidden in the notification area, « Statistiques », « Paramètres » or a champ select in front) waits in `Deferred`: only the strongest is kept, it plays once when « Défi » shows again, and a champ select that starts abandons it.
|
||||
- **Tab transitions lay a veil, never move the screen.** A cached view's cache key holds its bounds and its opacity, so fading or sliding the screen itself would draw the grid, the ring and the charts again at every frame and build the cards again. The veil, of the page's background, covers the screen leaving (130 ms) then lifts off the one arriving (280 ms). Each frame is asked for by the transition itself (`on_next_frame`), and none once the veil is lifted. A window hidden during a transition ends it at once. Structural tests check that a transition draws neither the grid nor the ring again, builds no card, recomputes no statistics, and asks for no frame at rest. The charts arriving play gpui-kit's own short entry, as after any switch.
|
||||
- **Two splashes decoded at most**: the one shown and the one replacing it. All splashes are downloaded in the background, at low priority, after the card portraits, and kept on disk.
|
||||
- During champ select, the Anvil grid is cached at the height of its card rows. The capture replay checks that a splash fade builds no cards and that traversing the hand and « Autres champions » keeps at most two decoded splashes. The latest hovered card takes over when the current fade finishes.
|
||||
- **The ring is a cached view**, laid out from its style alone. A structural test guards it: hovering a card, scrolling the grid or an animation on another part does not render the ring; only a change of what it shows (the champions' state, their order, the selection) or its own animation does. Its gain is checked at the next release benchmark.
|
||||
Reference in new issue
Block a user