Skip to content

fix(docsite): restore pull-to-refresh on mobile, scope the overscroll suppression to desktop - #5415

Merged
imdreamrunner merged 2 commits into
meta:mainfrom
HelloOjasMutreja:fix/docsite-pull-to-refresh-mobile
Aug 25, 2026
Merged

imdreamrunner merged 2 commits into
meta:mainfrom
HelloOjasMutreja:fix/docsite-pull-to-refresh-mobile

Conversation

@HelloOjasMutreja

Copy link
Copy Markdown
Contributor

Fixes #5392 — step 1, the small verified mobile half, per your own framing in the issue. Left step 2 (bounding the desktop-pinned layers, restoring native rubber-band on macOS) for a follow-up, since it needs its own visual pass on the tuned pin-and-cover effect.

Fix

overscroll-behavior-y: none on html was global and unscoped by width. Below 1024px, backdropGlow (the aurora blur behind the hero) is the only layer still position: fixed at all widths — everything else you listed (heroContent, stage) already goes in-flow or is hidden there. So:

  • backdropGlow goes position: absolute below 1024px, inside heroScope (already position: relative, already bounding the pin-and-cover), mirroring the exact pattern heroContent uses ~100 lines away in the same file. top drops to 0 in the absolute case, since heroScope already starts below the header — keeping the header offset would've shifted the glow down 48px, which is the bug you flagged in the naive version of this fix.
  • overscroll-behavior-y: none is scoped to @media (min-width: 1024px), where the remaining pinned layers still need it.

Desktop is untouched — same three layers, same suppression.

Verification

Computed styles at both widths (Playwright, real next dev build):

390px (mobile) 1280px (desktop)
overscroll-behavior-y auto none (unchanged)
backdropGlow position absolute fixed (unchanged)
backdropGlow top 0px 48px (unchanged)

That confirms the mechanism directly: pull-to-refresh's gate (overscroll-behavior-y) is auto on mobile now, and the layer that was reaching past the footer (backdropGlow) no longer has position: fixed there.

On the screenshot: I tried to also produce a before/after of the actual overscroll-bleed artifact you documented (translating <body> past its scroll bounds to fake the rubber-band gap), the same shape as your own iOS-simulator evidence. It didn't work — a CSS transform on <body> doesn't reproduce genuine elastic-overscroll compositing, so both attempts rendered an identical clean strip regardless of whether the fix was applied, which means it wasn't testing anything real. I'm not including those as evidence since they'd be misleading. I don't have a way to drive genuine touch-overscroll or an iOS Safari session in this environment, so real pull-to-refresh and the visual-bleed check are unverified beyond the computed-style proof above — flagging that plainly rather than claiming coverage I don't have.

Lint clean, no typecheck errors from either changed file (ran tsc --noEmit and grepped for the two file paths specifically — a full production next build currently fails on an unrelated pre-existing type error in a generated example, BannerCollapsibleContent.tsx, present on a clean checkout before I touched anything).

… suppression to desktop

Fixes meta#5392 (step 1, the mobile half).

overscroll-behavior-y: none on html was global and unscoped by width,
added so the home hero's fixed pin-and-cover layers couldn't show
through past the top/bottom of the page during elastic overscroll. Below
1024px only backdropGlow is actually still pinned past the fold (every
other hero layer already goes in-flow or is hidden there), so the fix is
narrower than the rule it caused:

- backdropGlow goes position: absolute (inside heroScope, which already
  bounds the pin-and-cover) below 1024px, mirroring the pattern
  heroContent already uses in the same file. top drops to 0 in the
  absolute case, since heroScope already starts below the header.
- overscroll-behavior-y: none is scoped to @media (min-width: 1024px),
  where the remaining pinned layers still need it.

Desktop is unchanged. Verified via computed styles at both widths:
390px reports overscroll-behavior-y: auto and backdropGlow at
position: absolute; top: 0px. 1280px reports none and
position: fixed; top: 48px (the header height), matching pre-fix
desktop exactly.

Step 2 (bounding the desktop-pinned layers properly, restoring native
rubber-band on macOS trackpads) needs its own visual pass on the tuned
pin-and-cover effect and is left for a follow-up, per the issue's own
framing.
@vercel

vercel Bot commented Aug 24, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
astryx Error Error Aug 25, 2026 1:14am

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 24, 2026
@github-actions github-actions Bot added community Authored by a community contributor (not on the eng/design team) needs:code-review High-risk change (new package/component/API) — needs human code review before merge needs:design-review Affects visuals — Design should review labels Aug 24, 2026
@HelloOjasMutreja
HelloOjasMutreja marked this pull request as ready for review August 24, 2026 11:15

@xinzi-bot xinzi-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 Blocking — line-ending churn in apps/docsite/src/app/globals.css (needs:code-review, community contribution).

Triage: bug fix · non-breaking · docsite-only · low blast radius → standard path (visual/behavioral change, verified in a real browser)

Thanks for this — the diagnosis is right, the mechanism is right, and I appreciate you being explicit about what you could and couldn't verify rather than claiming coverage you didn't have. I verified the fix independently and it does what it says. One mechanical blocker before it lands.

Verification

Local next dev at 650bad43, Playwright, same server with the two files flipped between main and this head, canary banner hidden so the layout matches production:

viewport html overscroll-behavior-y backdropGlow position glow document Y at scroll 0
390 × 844 none → auto fixed → absolute 48 → 48 (unchanged)
820 × 1180 none → auto fixed → absolute 48 → 48 (unchanged)
1280 × 900 none → none fixed → fixed 48 → 48 (unchanged)

Document height and scrollWidth are identical before/after at all three widths — no horizontal overflow from width: min(1200px, 100vw) resolving against heroScope instead of the viewport. Desktop is unchanged on every axis I measured.

I also ran it on a real iOS 26.5 Safari simulator (iPhone 17 Pro, genuine touch gestures), which closes the gap you flagged:

  • Pull-to-refresh completes — the same 660pt pull at the top of / produces a reload navigation entry on this head, and nothing on live production.
  • Bottom overscroll is clean — 89px elastic gap under the footer, elementFromPoint in the gap returns <html>, no aurora.
  • Top overscroll is clean too — the strip the pull exposes is the cream nav band, not the glow.
  • Fixed-layer census at 390px across /, /components/Button, /blog and /docs/getting-started: the only position: fixed element left below 1024px anywhere is navBackdrop, a 48px strip at the very top of the home page. It cannot reach the bottom gap.

So your computed-style proof holds up under real touch, and both halves of the change are load-bearing — auto alone bleeds.

🔴 B1 — globals.css was re-saved with CRLF, rewriting all 205 lines

git diff --numstat                     → 211 / 205
git diff --numstat --ignore-cr-at-eol  →  10 /   4

The actual change is 10 lines. Every other file in the repo is LF, and nothing normalizes CSS line endings today — your own #5229 proposing exactly that is still open, so it can't be relied on here.

Three concrete costs: the real change is invisible in review, git blame for the whole file lands on this commit, and any concurrent edit to globals.css conflicts wholesale.

git config core.autocrlf false
git add --renormalize apps/docsite/src/app/globals.css

Purely mechanical — nothing about the fix itself is in question.

🟡 N2 — the new comment inverts the causal chain

HeroThemeReel.tsx, on backdropGlow:

a fixed glow below 1024px reached past the footer into the bottom-overscroll gap, which blocked pull-to-refresh from ever registering a release

The glow never blocked pull-to-refresh — overscroll-behavior-y: none did. The glow is the reason that rule was written, which is exactly why bounding it is what lets the rule retreat to desktop. Worth correcting, because this comment is the durable record of the decision and the next person to touch these layers will reason from it.

Something like: "a fixed glow below 1024px reached past the footer into the bottom-overscroll gap — the exposure the global overscroll-behavior-y: none was suppressing, at the cost of pull-to-refresh site-wide (#5392)."

Note on CI

The Vercel check failure is not yours — #5414, #5398 and #5362 all fail the same deployment check on unrelated heads. Every GitHub Actions check on this PR is green.


Requesting changes on B1 alone. Fix the line endings and this is good to go on my end — the mobile fix is correct, complete, and now verified on-device. Deferring desktop to a follow-up is the right call and matches how #5392 scopes it.

The previous commit re-saved the whole file with CRLF, so the diff read
211/205 instead of the 10/4 the change actually is. Content is untouched:
git diff --ignore-cr-at-eol was already 10/4 before this commit.

Committed with --no-verify deliberately: lint-staged would run prettier
--write over the file, and globals.css does not satisfy prettier on main
either (quote style, selector wrapping), so letting it run would swap one
unrelated whole-file rewrite for another.

@imdreamrunner imdreamrunner 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.

Thanks for your contribution! (human here, I added a small fix to change the newline style, otherwise nothing is changed)

@imdreamrunner
imdreamrunner enabled auto-merge (squash) August 25, 2026 01:52
@github-actions github-actions Bot removed the needs:code-review High-risk change (new package/component/API) — needs human code review before merge label Aug 25, 2026
@imdreamrunner
imdreamrunner merged commit f2eec71 into meta:main Aug 25, 2026
20 of 21 checks passed
imdreamrunner added a commit that referenced this pull request Aug 26, 2026
…eader comment

The comment directly above backdropGlow still described the layer as
'fixed' full stop. Since #5415 that is only true at >=1024px; below that
it is absolute inside heroScope. Same defect class as the comment this
branch already corrects, four lines away.

Both siblings state the split — HeroFloatingCards' stage says 'Hidden
<1024px', page.tsx's heroContent says 'Desktop: fixed ... Narrow: in
flow' — so this was the one layer comment that hid its responsive
behavior.

Comment only, no behavior change.
imdreamrunner added a commit that referenced this pull request Aug 26, 2026
…5467)

* docs(docsite): correct the backdropGlow comment's causal chain

The comment said a fixed glow below 1024px 'blocked pull-to-refresh from
ever registering a release'. It never did — `overscroll-behavior-y: none`
in globals.css did. The glow is the *reason that rule was written*: it was
the layer bleeding into the bottom-overscroll gap, and bounding it is what
lets the rule scope to desktop widths.

Comment only, no behavior change. Follow-up to #5415 (issue #5392).

* docs(docsite): drop the stale unconditional 'fixed' from the glow's header comment

The comment directly above backdropGlow still described the layer as
'fixed' full stop. Since #5415 that is only true at >=1024px; below that
it is absolute inside heroScope. Same defect class as the comment this
branch already corrects, four lines away.

Both siblings state the split — HeroFloatingCards' stage says 'Hidden
<1024px', page.tsx's heroContent says 'Desktop: fixed ... Narrow: in
flow' — so this was the one layer comment that hid its responsive
behavior.

Comment only, no behavior change.

This branch had an error being deployed

1 failed deployment
Preview — 6827a480 Deployed Aug 25, 2026 by vercel[bot]
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. community Authored by a community contributor (not on the eng/design team) needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Docsite: pull-to-refresh is disabled on mobile by a global overscroll-behavior-y rule

3 participants