Fix: screens can't scroll (min-h-dvh under overflow-hidden body)
CI/CD / CI - API (dotnet build + engine sim) (push) Failing after 1m41s
CI/CD / CI - Web (tsc + next build) (push) Failing after 1m20s
CI/CD / Deploy - local stack (db + server + web) (push) Has been skipped

body is overflow:hidden (to lock the game table), so a min-h-dvh shell just
expands past the viewport and is clipped — its overflow-y-auto never engages.
Make ScreenShell + HomeScreen fixed-height h-dvh scroll containers (with
overscroll-contain + bottom padding). Fixes Profile/Friends/Shop/Leaderboard/
Lobby/BuyCoins/Notifications and the home menu on short viewports.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-04 20:30:47 +03:30
parent fde8b93206
commit a1c2cc0889
2 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ export function HomeScreen() {
const playOnline = () => nav(isAuthed ? "online" : "auth"); const playOnline = () => nav(isAuthed ? "online" : "auth");
return ( return (
<main className="persian-pattern relative min-h-dvh w-full overflow-y-auto"> <main className="persian-pattern relative h-dvh w-full overflow-y-auto overscroll-contain">
<FloatingSuits /> <FloatingSuits />
<div className="relative z-10 mx-auto w-full max-w-md p-4 sm:p-6 flex flex-col min-h-dvh"> <div className="relative z-10 mx-auto w-full max-w-md p-4 sm:p-6 flex flex-col min-h-dvh">
<div className="pt-1"> <div className="pt-1">
+5 -2
View File
@@ -32,8 +32,11 @@ export function ScreenHeader({
export function ScreenShell({ children }: { children: React.ReactNode }) { export function ScreenShell({ children }: { children: React.ReactNode }) {
return ( return (
<main className="persian-pattern relative min-h-dvh w-full overflow-y-auto"> // Fixed-height viewport scroller: body is `overflow:hidden` (for the game
<div className="mx-auto w-full max-w-2xl p-4 sm:p-6">{children}</div> // table), so the shell must own its scroll (h-dvh + overflow-y-auto) — with
// min-h-dvh the content just expands past the body and gets clipped.
<main className="persian-pattern relative h-dvh w-full overflow-y-auto overscroll-contain">
<div className="mx-auto w-full max-w-2xl p-4 pb-24 sm:p-6 sm:pb-28">{children}</div>
</main> </main>
); );
} }