Skip to content

MS-201 · Scroll orchestrator ScrollStage + registry + transition helpers #536

Open

Description

@adityapat24

Steps

  1. scenes/registry.ts: an ordered array of { id, Component, animation?: SceneAnimation }, starting with 9 colored placeholders. Section tickets swap in their real component with a one-line change.
  2. scenes/ScrollStage.tsx (client):
    • Recommended approach: one master ScrollTrigger over a tall spacer, with every scene stacked in a fixed viewport stage. Each scene gets a [start, end] range from motionSpec.ts scrollLength, and its enter overlaps the previous scene's tail. Scenes outside their range are visibility: hidden.
    • The master GSAP timeline runs enter then build for each scene, in order.
    • The last scene (FAQ) is unpinned: after the stage, normal document flow continues.
    • useActiveScene() context (the Header gets wired to it in MS-301).
    • scrollToScene(id, { immediate }): scrolls to a scene's resting point via lenis.scrollTo. Deep links on load use immediate.
    • Rebuilds on breakpoint change and debounced resize; kills its triggers on unmount; doesn't initialize below 640px.
    • Uses svh units and ScrollTrigger.config({ ignoreMobileResize: true }) for tablets.
  3. scenes/transitions.ts: fogWipe, crossfade, zoomThrough, curtain, pan. Each takes (tl, prevRoot, root, opts) and starts from the previous scene's exitColor. Each has a harness demo (/dev/scenes?transition=fogWipe) and JSDoc explaining its options.
  4. (landing)/page.tsx renders ScrollStage behind ?stage=1 until MS-301 switches it on. S3 animation tickets verify there.
  5. (v3) Point the Header/Footer at lib/content/site.ts and delete MS-101's temporary lib/siteConfig.ts.

Acceptance criteria

  • 9 placeholder scenes play in order through all 5 transition types, forward and back
  • useActiveScene() is correct in both directions
  • scrollToScene and deep links land on the exact resting state
  • Rebuilds cleanly between 1512 and 1000; 60fps with placeholders

Activity

  1. self-assigned this
    on Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions