Skip to content

Home AI section: layers on screen at load vanish until scrolled #329

Open

Description

@wab

Parent

#212 (PRD: website redesign v2, delivery steps J1 to J6)

Context

#327 adds a scroll scrub to the home AI section (app/hooks/use-scroll-steps.ts). The layers appear one by one as the section scrolls in, and hide again on scroll up, as in the mockup (#ia8).

The server render shows every layer. On hydration, the hook hides every layer whose threshold is not reached yet. When the page loads with the layer list already on screen, those layers vanish at once, then come back as the visitor scrolls. This happens when:

  • the list's top sits in the bottom 20% of the viewport (reload, scroll restore, anchor link);
  • the screen is tall: with the list's top at 50% of the viewport, layer 01 and the caption are hidden.

No fade is shown: the first measure skips the transition. The layers simply are not there.

useInView avoids this on purpose: an element already on screen at hydration never hides.

Decision needed

  • Keep it (recommended until someone notices): this is the mockup behaviour. Document it in the hook docblock.
  • Fix it: on the first measure, show every step that is already inside the viewport, and only scrub the steps below it.

Acceptance criteria (if fixed)

  • A layer on screen at hydration never disappears.
  • Scrolling down from the top of the page still reveals the layers one by one.
  • Unit tests cover the first-measure rule.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageMaintainer needs to evaluate

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions