Skip to content

fix(docsite): keep the hero's aurora glow pinned on mobile - #5544

Closed
imdreamrunner wants to merge 1 commit into
mainfrom
fix/hero-glow-stays-pinned
Closed

fix(docsite): keep the hero's aurora glow pinned on mobile#5544
imdreamrunner wants to merge 1 commit into
mainfrom
fix/hero-glow-stays-pinned

Conversation

@imdreamrunner

Copy link
Copy Markdown
Contributor

Follow-up to #5415. Keeps its fix; restores the appearance it changed.

What happened

#5415 stopped the aurora glow painting past the end of the page below 1024px, which is what let overscroll-behavior-y: none retreat to desktop widths and gave mobile back its pull-to-refresh. That is right and stays.

It did it by unpinning the glow — position: fixedabsolute in ordinary flow. That also changed how the hero looks. The three aurora blobs sit low in the glow's 1050px box (65–85% down), so:

  • pinned, they parked near the bottom edge of the screen, largely out of frame
  • unpinned, they scroll up through the viewport with the hero

So mid-scroll the mobile home page is now visibly warmer than it was. Scroll the home page to ~600px on a phone and compare against the deployed site before yesterday: the cream wash behind the cards is new.

before #5415 after #5415
pixels shifted ≥10/255 20–25% of the viewport
peak shift 51/255rgb(248,244,237)rgb(243,223,186)

Before, after and difference at scroll 600

The middle panel is what is deployed today. The right panel is the difference, amplified 8×.

This was not visible in #5415's verification because computed styles at a single scroll position cannot show it, and it is not visible to pixelmatch at default settings either — its perceptual threshold discards a soft wash of exactly this kind. It needs a raw channel-delta check.

The fix

Bounded and pinned are not in conflict, and the hero already had a layer that is both: cardsLayer is position: sticky; height: 0. Sticky pins to the viewport exactly like fixed while the hero is on screen, and stops existing once the band has scrolled by — so it cannot reach the overscroll gap.

The glow moves into that layer as an absolute child, painting under the cards. The layer is renamed pinLayer, since it now carries both.

  • below 1024px — glow is pinned again, and still bounded
  • at and above 1024px — nothing changes; the glow stays fixed alongside heroContent and the stage, and the desktop rule is untouched

Net diff against main is small: the glow's element moves inside the layer that already existed, and two comments are corrected.

Test plan

New test apps/docsite/src/__tests__/hero-glow-pinning.test.ts asserts both halves of the contract, because each was traded away once:

pre-#5392 (fixed) #5415 (in-flow absolute) this PR
bounded — can't reach the overscroll gap
pinned — doesn't scroll with the hero

Verified by checking out each of those two states and running the test against it: the pre-#5392 source fails both, the merged source fails the pinning assertion, this branch passes both. The pinning half is structural — the glow's element has to be inside the sticky layer — because the property alone (absolute) is identical in the broken and fixed cases.

Measured on this build against the pre-#5392 appearance (the glow put back to fixed in the same DOM), reducedMotion: 'reduce' so the theme reel holds one slide, canary banner removed so the header is production's 48px, ten scroll offsets per viewport:

viewport differing pixels (threshold 0) max channel delta fixed layers reaching the viewport bottom at page end
390×844 0 0/255 1 → 0
900×1200 0 0/255 0 → 0
1280×900 0 0/255 2 → 2 (desktop, unchanged)

overscroll-behavior-y stays auto on mobile — the #5392 fix is intact.

apps/docsite vitest run (405 passed), tsc --noEmit, and pnpm lint:strict (0 errors) are green on current main.

Related

@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
astryx Ready Ready Preview Aug 26, 2026 3:50am

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 26, 2026
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Aug 26, 2026
@imdreamrunner imdreamrunner reopened this Aug 26, 2026
@imdreamrunner
imdreamrunner force-pushed the fix/hero-glow-stays-pinned branch from d7081c3 to 3799df9 Compare August 26, 2026 03:45
@github-actions github-actions Bot removed the needs:design-review Affects visuals — Design should review label Aug 26, 2026
page, which is what let the overscroll suppression retreat to desktop widths
and gave mobile its pull-to-refresh back. That part is right and stays. But
unpinning also changed how the hero looks: the aurora blobs sit low in the
glow's 1050px box, so a glow that scrolls with the hero walks them up through
the viewport instead of holding them near the bottom edge. Mid-scroll the
mobile home page is now visibly warmer — 20-25% of pixels shifted by 10/255 or
more, peaking at 51/255.

Being bounded and being pinned are not in conflict; the hero already had a
layer that is both. cardsLayer is sticky and zero-height, so it pins to the
viewport exactly like fixed while the hero is on screen, and stops existing
once the band has scrolled by. The glow moves into it (renamed pinLayer, since
it now carries both) as an absolute child, painting under the cards.

Below 1024px the glow is therefore pinned again, and still cannot reach the
overscroll gap. At and above 1024px nothing changes: the glow stays fixed with
heroContent and the stage, and the desktop rule is untouched.

Measured against the pre-#5392 appearance on this same build, at ten scroll
offsets each: 0 differing pixels at 390x844, 900x1200 and 1280x900, max
channel delta 0/255. Hero layers still reaching the viewport bottom at page
end on mobile: 1 before, 0 after.
@imdreamrunner imdreamrunner reopened this Aug 26, 2026
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Aug 26, 2026

@rubyycheung rubyycheung left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The design intent is to keep the gradients to be where the UI elements are

Image

@imdreamrunner

Copy link
Copy Markdown
Contributor Author

We will keep the current behavior in doc site~~

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

Labels

CLA Signed This label is managed by the Meta Open Source bot. needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants