Skip to content

docs: the home page's hero shows hydration: all at once when sent whole, a part at a time when streamed - #108

Merged
ChristopherPHolder merged 1 commit into
mainfrom
feat/docs-hero-hydration
Nov 28, 2026
Merged

ChristopherPHolder merged 1 commit into
mainfrom
feat/docs-hero-hydration

Conversation

@ChristopherPHolder

Copy link
Copy Markdown
Collaborator

The hero drew when each part's HTML arrived, and stopped there. It now shows hydration too.

What changes

  • A part lands as server HTML and is hydrated half a second later, with a ring that fades at that moment.
  • Sent whole: the page arrives at 3 s and hydrates in one go at 3.5 s.
  • Streamed: the product hydrates at 0.6 s, the reviews at 1.5 s and the recommendations at 3.5 s.
  • The parts are in the race figure's order (Product, Recommendations, Reviews), so the streamed page fills and hydrates out of order: the first part, then the third, then the middle one.
  • Each part says its state in words, and the colour repeats it with the figures' colours (figures/mock.css): placeholder, server HTML, hydrated. Every part of both pages ends on the same one.
  • The clock runs to 4 s and the loop is 8 s, up from 3 s and 6 s.
  • Under prefers-reduced-motion it stands still at 1.25 s, where the streamed page shows all three states.
  • A paragraph under "A page is as slow as its slowest request" says that hydration follows the HTML, and the screen-reader description of the drawing covers it.

Both pages still finish at the same moment, so the text under the hero stays true.

Checked

On the built site, in headless Chrome:

  • Playback changes state in the order above, and every animation stays on one clock.
  • Pause and Play work.
  • No horizontal overflow and no axe violations (WCAG A/AA, best practice) at 320, 390, 820 and 1440px.
  • vp check passes.

"Recommendations" is still clipped in its box at 320px, as it was before.

…le, a part at a time when streamed

The hero drew when each part's HTML arrived, and stopped there. A part now
lands as server HTML and is hydrated half a second later, with a ring that
fades at that moment. Sent whole, the page hydrates in one go at 3.5 s.
Streamed, the product hydrates at 0.6 s, the reviews at 1.5 s and the
recommendations at 3.5 s.

The parts are in the race figure's order, with the slowest in the middle, so
the streamed page fills and hydrates out of order. Each part says its state
in words, and the colour repeats it with the figures' colours: placeholder,
server HTML, hydrated. Every part of both pages ends on the same one.

The clock runs to 4 s and the loop is 8 s. Under prefers-reduced-motion it
stands still at 1.25 s, where the streamed page shows all three states.
@ChristopherPHolder
ChristopherPHolder merged commit e8d5ac6 into main Nov 28, 2026
1 check 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