Skip to content

feat(benchmarks): animate progress bars and add scroll-triggered counter - #470

Merged
ilteoood merged 4 commits into
fastify:mainfrom
Tony133:feat/benchmarks-animated-progress
Jul 26, 2026
Merged

feat(benchmarks): animate progress bars and add scroll-triggered counter#470
ilteoood merged 4 commits into
fastify:mainfrom
Tony133:feat/benchmarks-animated-progress

Conversation

@Tony133

@Tony133 Tony133 commented Jul 22, 2026

Copy link
Copy Markdown
Member

Proposal:

Refreshes the BenchmarkInfo card used on the /benchmarks page:

  • the req/sec number and the progress bar now animate together when the card scrolls into view, instead of appearing static
  • progress bars are now custom div elements instead of native <progress>, so the color renders consistently across browsers (native <progress> was falling back to the browser's default green in some cases)
  • bar color now matches the card title color
  • lighter, more intentional card shadow (replaced Infima's shadow--md with a custom resting/hover shadow)
  • animation respects prefers-reduced-motion

Screenshots:

before:

before

after:

after

ligtht-mode:

light-mode

cc @fastify/website

- replace native <progress> with a div-based track/fill for reliable
  cross-browser color rendering
- animate req/sec count-up and bar fill together, driven by a single
  eased timer so they stay perfectly in sync
- trigger the animation on scroll into view via IntersectionObserver
- respect prefers-reduced-motion
- restyle cards: custom resting/hover shadow (drop shadow--md), subtle
  border highlight for the Fastify card, rank badge
- match bar color to the heading color (var(--ifm-color-primary))
@Tony133

Tony133 commented Jul 22, 2026

Copy link
Copy Markdown
Member Author

@ilteoood one last improvement 😄

@ilteoood
ilteoood merged commit 36c688c into fastify:main Jul 26, 2026
1 check was waiting
@Tony133
Tony133 deleted the feat/benchmarks-animated-progress branch July 26, 2026 09:15
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.

2 participants