Repository navigation
fix(ads): dock the flex header ad while an inline page is open - #5471
Conversation
Opening a page modal (Store, Settings, ...) locks the document at scroll 0, so the Playwire flex unit stayed in its expanded 350px state in flow above the modal, leaving it only a sliver of height to scroll in. Park the ad container just above the viewport while a page is open so Playwire's IntersectionObserver docks the unit into its fixed leaderboard, pin that leaderboard to the viewport top, pad the content area below it, and make the desktop nav static (nothing scrolls while a page is open). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. WalkthroughThe page-open state now moves the flex advertisement above the viewport, docks its inner unit, pads content below the ad height, and changes the desktop navigation from sticky to static. ChangesPage-open layout
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The page-open layout change has no unresolved concrete correctness or availability risk identified before merge. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. The banner rests above the view Comment |
Regression from the flex header ad (#5009 / #5237). No approved issue — reporting and fixing in one go.
Description:
With the flex header ad showing, opening any inline page modal (Store, Settings, Leaderboard, ...) leaves the modal only a sliver of height, so it effectively can't be scrolled.
Cause.
body.page-openlocks the document at scroll 0 (#5148). Playwire's flex unit expands (350px desktop / 210px mobile) whenever its container intersects the viewport and only docks to the 100px/70px fixed leaderboard once the container scrolls out — which can never happen while the page is locked. So the expanded ad sat in flow above the modal for as long as the page was open. On an 800px-tall viewport the modal got ~220px.Fix (CSS only,
index.html). While a page is open:#pw-oop-flex_containerjust above the viewport (position: fixed; bottom: 100%) so Playwire's IntersectionObserver docks the unit;top: 0(Playwire docks withtop: auto, i.e. the static position, which is now above the viewport);--top-ad-height(already measured by HomepagePromos) and make the desktop nav static, since nothing scrolls in that state.When the page closes the container returns to flow and the unit re-expands as before.
Verified in headed Chromium with the Playwire preview URL on desktop (1400×800) and mobile (390×844): the unit docks within Playwire's collapse delay, the modal scroller reaches its full extent, closing restores the expanded unit and document scrolling, and opening a page from a scrolled position keeps the docked unit in place.
Before: the expanded ad sat in flow above the Settings modal, which was ~220px tall. After: the ad is docked at the top and the modal fills the area below the nav.
Please complete the following:
Please put your Discord username so you can be contacted if a bug or regression is found:
evanpelle
🤖 Generated with Claude Code