SmartTest

Motion design

Motion in SmartTest explains causality: a change propagates, the affected parts light up, and the protecting tests turn green. If an animation doesn't show cause and effect, or progress, we don't add it.

Hero animation: change ripples through the graph to the selected tests

Principles #

  1. Meaning over decoration. Every animated property maps to a state change in the product (changed → affected → selected → skipped).
  2. Follow the arrow. Motion travels in the direction of impact: from the change, along reverse dependencies, to the tests. Never backwards.
  3. The final frame tells the whole story. Assets are authored so that the static state is the complete, informative end state. Reduced-motion users and static renderers lose nothing.
  4. Calm loops. Loops hold the result for most of the cycle (≥ 45 %) and reset with a fade, never a jump cut.
  5. Fast in the product, narrative in marketing. UI transitions take 80–360 ms. Only README and docs illustrations use multi-second choreography.

Tokens #

TokenValueUse
--st-dur-instant80 msHover, press, focus ring
--st-dur-fast140 msToggles, chips, small reveals
--st-dur-base220 msPanels, list insertions, status changes
--st-dur-slow360 msRoute transitions, graph re-layout
--st-dur-narrative7–14 s loopREADME/docs illustrations only
--st-ease-out-expocubic-bezier(0.22, 1, 0.36, 1)Things arriving: edges drawing, cards entering
--st-ease-in-outcubic-bezier(0.65, 0, 0.35, 1)Things moving between two states
--st-ease-linearlinearProgress, travelling pulses, spinners
--st-stagger40 ms per item (max 8 items)Lists of results appearing

Choreography: the impact sequence #

Used in the hero and the impact map, and later in the Studio when an impact is recomputed.

Beat% of loopWhat movesMeaning
1. Pulse0 → 8Ripple rings on the changed node (amber)"This changed"
2. Level 18 → 22Edges draw from the change to direct dependents (stroke-dashoffset, ease-out-expo). Nodes turn violet on arrival"These depend on it"
3. Level 226 → 40Edges draw to tests. Tests turn green and a ✓ appears"These tests protect it"
4. Contrast40 → 46Unrelated tests dim to 45 % and get a "skipped" tag"These don't, so they're not run"
5. Explain46 → 52The explanation card slides in from 16 px"Here's why"
6. Hold→ 86–88Nothing movesTime to read
7. Reset→ 95–96Highlights fade outLoop

Asset catalogue #

AssetLoopStory told
hero.svg7 sChange → dependents → 3 selected tests; others skipped
pipeline.svg8 sA pulse travels through the 7 stages; each stage lights up as it's reached
terminal.svg14 sTyping npx smarttest run --affected, phases, selected results, honest summary
impact-map.svg9 sThe spec's AuthService example, with an explain card
logo.svgstaticThe check-mark graph

Technical rules for SVG assets #

Motion in the product #

SurfaceMotion
CLISpinner only while waiting > 300 ms. Results appear line by line (no artificial delay). No animation in non-TTY
HTML report (1.0)Section reveal on first paint (base, staggered). Reason accordions (fast). Status chips never animate after the first paint, so a status never "changes" on screen without a cause
Studio (0.9.0)Impact sequence on recompute (scaled to 600–900 ms total). Live Runner rows enter with stagger. Graph re-layout at slow duration with ease-in-out

Don'ts #

Edit this page on GitHub