Skip to content

[Grok bot] Share the page entrance wave and chrome helpers across routes - #484

Draft
uwiuga wants to merge 6 commits into
feat/events-page-entrancefrom
refactor/page-entrance-helper
Draft

uwiuga wants to merge 6 commits into
feat/events-page-entrancefrom
refactor/page-entrance-helper

Conversation

@uwiuga

@uwiuga uwiuga commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Rationale

Events already had an entrance wave, while the navbar, footer, and the rest of the site appeared abruptly on load. Instead of copying stagger math and session flags into every page, I extracted one shared module (PageEntrance.jsx, usePageEntrance.js, useEntranceColumns.js, pageEntrance.js, and _pageEntrance.scss) so pages opt in with PageRoot, EntranceHero, EntranceGrid, EntranceList, OverlayEntrance, and useChromeEntrance.

I also fixed two visual bugs surfaced while sharing the wave: items start at opacity: 0 before keyframes run so there is no first-frame flash, and the navbar and footer animate the individual translate property instead of transform so desktop .nav-primary-links keeps its centering translate(-50%, -50%) throughout the fade-in.

Desktop Before (About, 1440px):

about-before-1440.mp4

Desktop After (About, 1440px):

about-after-1440.mp4

Desktop Before (Shop, 1440px):

shop-before-1440.mp4

Desktop After (Shop, 1440px):

shop-after-1440.mp4

Mid-animation navbar centering on About and Shop (1440px) and sampled-opacity trace:

Mid-animation navbar centered on About

Settled navbar on About

Mid-animation navbar centered on Shop

Sampled opacity trace

Observable Behavior

  • On the first visit of a session, the navbar brand, centered links, account actions, and footer rise and fade in across three staggered beats using translate without shifting the centered links.
  • Reloading or navigating between pages does not replay the navbar or footer entrance in the same session.
  • Events keeps its existing behavior while reading from the shared timing constant (ENTRANCE_WAVE_MS = 1200), row cap (6), and hero stagger helpers.
  • Visitors with prefers-reduced-motion: reduce see everything at rest right away.

Verification

  • Netlify preview: https://pr-484--iuga.netlify.app — hard-reload /about or /shop on desktop (1440px) and check that the navbar links stay centered while fading in and never snap or flash.
  • Verified at stack head fe10fc7 in frontend/: npm test -- --run (68 files, 923 tests passed), npx stylelint "src/**/*.scss" (0 errors, 258 pre-existing warnings), and VITE_API_URL=http://localhost:7777 npm run build (passed). Note: running src/stylesheets/pageEntrance.test.js on this branch alone fails 1 test (staggers vertical list items with the shared item cap) until PR [Grok bot] Wave Get Involved lead cards and committee rows in on first visit #487 adds the .pageEntrance__listItem rule.

Stack Context

Stacked on PR #482 (feat/events-page-entrance). Merge PR #482 first, then #484 through #492 in order.

Co-authored with Grok Bot.

The first-visit wave, reading-order style vars, and grid delay now live in
one place, so later pages can reuse them instead of copying Events.

The navbar and footer rise on the first load of the visit only, on Home's
three beats. Overlays get a 180ms scale-and-fade from their trigger, with
a faster exit. The Events page and its timings are unchanged.
The shared module now owns the entering class, item delay variables, and
overlay origin. A page wraps its root, hero, grid, or list (and, for a
grid, passes the column map that already matches its CSS). Checkout and
other early-return pages can use the class hook so the first-visit flag
is only read once.
Hero visuals use the same --entrance-i stagger as list items. The wrapper
now sets that variable, defaulting to the first beat, so a lone hero and
a row of lead portraits stay on the shared wave.
Rename the entrance helpers so they describe the wave order, not a style
object. Keep the hidden start state on the first painted frame, cap long
grid waves, and key each page's clock so a remount cannot restart it.
Point Events' month rows and chips at the shared grid tokens so a long
list cannot outlast the wave, and so the month timing lives with the rest
of the entrance delays.
The bar centers those links with transform: translate(-50%, -50%). The
shared rise animation was replacing that transform, so the links sat low
and to the right until the wave ended. Chrome now fades and shifts with
the individual translate property, which leaves the centering transform
in place.
@uwiuga
uwiuga added this pull request to stack #493 November 25, 2026 04:30
@github-actions

Copy link
Copy Markdown

🚀 Deployed on https://pr-484--iuga.netlify.app

@uwiuga uwiuga changed the title refactor/page entrance helper [Grok bot] Share the page entrance wave and chrome helpers across routes Nov 25, 2026
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