From 2cbff8925d6cbd008e58f1c8d35d51873a0853fc Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Tue, 31 Mar 2026 10:57:09 -0700 Subject: [PATCH] =?UTF-8?q?fix(layout):=20viewport-filling=20rApp=20layout?= =?UTF-8?q?=20=E2=80=94=20eliminate=20body=20scroll?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make #app a flex column with height:100vh so all rApps fill the viewport exactly. Wrap module body in .rapp-content flex child. Replace all hardcoded calc(100vh - Npx) with height:100% across 20+ components. Remove sticky positioning from subnav/tabbar (now flex items). Generalize mobile body-flex to all pages (not just canvas-layout). Co-Authored-By: Claude Opus 4.6 --- modules/crowdsurf/components/crowdsurf.css | 1 - .../components/folk-crowdsurf-dashboard.ts | 1 - modules/rbooks/components/books.css | 3 - modules/rbooks/components/folk-book-reader.ts | 5 +- modules/rcart/components/cart.css | 7 -- modules/rchoices/components/choices.css | 1 - modules/rdesign/mod.ts | 5 +- modules/rmaps/components/folk-map-viewer.ts | 6 +- modules/rmeets/components/folk-jitsi-room.ts | 6 +- modules/rnetwork/components/network.css | 2 +- modules/rnotes/components/folk-notes-app.ts | 2 +- modules/rpubs/components/folk-pubs-editor.ts | 5 +- modules/rpubs/components/pubs.css | 1 - .../components/automation-canvas.css | 2 +- .../rsocials/components/campaign-planner.css | 4 +- .../rsocials/components/campaign-workflow.css | 4 +- modules/rsplat/components/splat.css | 4 +- modules/rswag/components/swag.css | 1 - modules/rtime/components/rtime.css | 2 +- .../rtrips/components/folk-trips-planner.ts | 2 +- server/shell.ts | 30 +++------ website/public/shell.css | 66 +++++++++---------- 22 files changed, 63 insertions(+), 97 deletions(-) diff --git a/modules/crowdsurf/components/crowdsurf.css b/modules/crowdsurf/components/crowdsurf.css index c2f073a..b32ac29 100644 --- a/modules/crowdsurf/components/crowdsurf.css +++ b/modules/crowdsurf/components/crowdsurf.css @@ -1,5 +1,4 @@ /* CrowdSurf module layout */ main { - min-height: calc(100vh - 56px); padding: 0; } diff --git a/modules/crowdsurf/components/folk-crowdsurf-dashboard.ts b/modules/crowdsurf/components/folk-crowdsurf-dashboard.ts index f5f265d..bd16928 100644 --- a/modules/crowdsurf/components/folk-crowdsurf-dashboard.ts +++ b/modules/crowdsurf/components/folk-crowdsurf-dashboard.ts @@ -856,7 +856,6 @@ class FolkCrowdSurfDashboard extends HTMLElement { .cs-app { display: flex; flex-direction: column; height: 100%; - min-height: calc(100vh - 56px); background: var(--rs-bg-page); color: var(--rs-text-primary); } diff --git a/modules/rbooks/components/books.css b/modules/rbooks/components/books.css index 75bdaac..eb8e54b 100644 --- a/modules/rbooks/components/books.css +++ b/modules/rbooks/components/books.css @@ -1,4 +1 @@ /* Books module layout */ -main { - min-height: calc(100vh - 56px); -} diff --git a/modules/rbooks/components/folk-book-reader.ts b/modules/rbooks/components/folk-book-reader.ts index fcc3810..5f9b659 100644 --- a/modules/rbooks/components/folk-book-reader.ts +++ b/modules/rbooks/components/folk-book-reader.ts @@ -365,7 +365,6 @@ export class FolkBookReader extends HTMLElement { display: block; width: 100%; height: 100%; - min-height: calc(100vh - 52px); background: var(--rs-bg-page); } @@ -418,7 +417,7 @@ export class FolkBookReader extends HTMLElement { flex-direction: column; align-items: center; justify-content: center; - height: calc(100vh - 52px); + height: 100%; gap: 1rem; } @@ -457,7 +456,7 @@ export class FolkBookReader extends HTMLElement { flex-direction: column; align-items: center; justify-content: center; - height: calc(100vh - 52px); + height: 100%; gap: 0.5rem; } .error h3 { color: var(--rs-error); margin: 0; } diff --git a/modules/rcart/components/cart.css b/modules/rcart/components/cart.css index 158b3c7..a6cbb89 100644 --- a/modules/rcart/components/cart.css +++ b/modules/rcart/components/cart.css @@ -1,6 +1,5 @@ /* Cart module layout */ main { - min-height: calc(100vh - 56px); padding: 0; } @@ -20,9 +19,3 @@ main:has(folk-payment-page) .rapp-subnav, main:has(folk-group-buy-page) .rapp-subnav { display: none; } - -@media (max-width: 600px) { - main { - min-height: calc(100vh - 44px); - } -} diff --git a/modules/rchoices/components/choices.css b/modules/rchoices/components/choices.css index bb028f6..968c333 100644 --- a/modules/rchoices/components/choices.css +++ b/modules/rchoices/components/choices.css @@ -1,5 +1,4 @@ /* Choices module layout */ main { - min-height: calc(100vh - 56px); padding: 0; } diff --git a/modules/rdesign/mod.ts b/modules/rdesign/mod.ts index 0275556..f82a1ca 100644 --- a/modules/rdesign/mod.ts +++ b/modules/rdesign/mod.ts @@ -72,9 +72,8 @@ routes.get("/", (c) => { }); const RDESIGN_CSS = ` -/* Layout — prevent page scroll */ -html:has(.rd-app), html:has(.rd-app) body { overflow:hidden; height:100vh; } -.rd-app { display:flex; flex-direction:column; height:calc(100vh - 56px); overflow:hidden; } +/* Layout — fills viewport via shell flex layout */ +.rd-app { display:flex; flex-direction:column; height:100%; overflow:hidden; } .rd-toolbar { display:flex; align-items:center; gap:8px; padding:6px 12px; border-bottom:1px solid var(--rs-border); background:var(--rs-bg-surface); flex-shrink:0; } .rd-split { display:flex; flex:1; overflow:hidden; } .rd-chat { flex:1; display:flex; flex-direction:column; min-width:300px; border-right:1px solid var(--rs-border); background:var(--rs-bg-page); } diff --git a/modules/rmaps/components/folk-map-viewer.ts b/modules/rmaps/components/folk-map-viewer.ts index 7956446..442623d 100644 --- a/modules/rmaps/components/folk-map-viewer.ts +++ b/modules/rmaps/components/folk-map-viewer.ts @@ -2206,7 +2206,7 @@ class FolkMapViewer extends HTMLElement { .room-name { font-size: 15px; font-weight: 600; } .map-container { - width: 100%; height: calc(100vh - 220px); min-height: 300px; + width: 100%; height: 100%; min-height: 300px; border-radius: 10px; background: var(--rs-bg-surface-sunken); border: 1px solid var(--rs-border); position: relative; overflow: hidden; @@ -2219,7 +2219,7 @@ class FolkMapViewer extends HTMLElement { .map-sidebar { width: 220px; flex-shrink: 0; background: var(--rs-glass-bg); border: 1px solid var(--rs-border); border-radius: 10px; - padding: 12px; max-height: calc(100vh - 280px); overflow-y: auto; + padding: 12px; max-height: 100%; overflow-y: auto; } .sidebar-title { font-size: 11px; font-weight: 600; color: var(--rs-text-secondary); @@ -2279,7 +2279,7 @@ class FolkMapViewer extends HTMLElement { .mobile-bottom-sheet { display: none; } @media (max-width: 768px) { - .map-container { height: calc(100vh - 48px); min-height: 250px; max-height: none; border-radius: 0; border: none; } + .map-container { height: 100%; min-height: 250px; max-height: none; border-radius: 0; border: none; } .map-layout { flex-direction: column; } .map-sidebar { display: none; } .controls { display: none; } diff --git a/modules/rmeets/components/folk-jitsi-room.ts b/modules/rmeets/components/folk-jitsi-room.ts index d00727f..7d62746 100644 --- a/modules/rmeets/components/folk-jitsi-room.ts +++ b/modules/rmeets/components/folk-jitsi-room.ts @@ -61,10 +61,10 @@ class FolkJitsiRoom extends HTMLElement { private render() { this.shadow.innerHTML = `