Skip to content

fix(native): every Office screen scrolls on a phone - #798

Merged
thinkclay merged 1 commit into
mainfrom
fix/office-native-scroll
Sep 17, 2026
Merged

thinkclay merged 1 commit into
mainfrom
fix/office-native-scroll

Conversation

@thinkclay

Copy link
Copy Markdown
Contributor

Closes #796. Completes the iPhone half of #768.

What

Fourteen Office screens are rooted in a plain Stack with no ScrollView of their own, and several more drop their scroll container in loading/error branches (full audit in the table below). On web the document scrolls so nobody noticed; on iOS the storage table sat below the fold with no way to reach it.

Rather than a ScrollView per screen, the Office stack now wraps every screen through the navigator's screenLayout (packages/scf-core/components/layouts/ScreenScroll.tsx, wired via a new screenLayout prop on DrawerLayout):

  • web: passthrough, the document keeps scrolling; no second scroller (acceptance box 2)
  • native: ScrollView with contentContainerStyle={{ flexGrow: 1 }} and bottom padding that clears the floating bottom nav, so flex: 1 roots still fill the viewport and taller ones scroll
  • screens that already scroll (DashboardLayout, OfficeLayout) nest harmlessly: Yoga sizes the inner scroller to its content and the outer one moves
  • a screen that must own its full height can opt out with layout on its own Stack.Screen

Also fixed on the way: OfficePageLayout's loading state rendered a bare string inside a Stack (<Stack>Loading…</Stack>), which native logs as an error on every list screen while data loads. It is a Text now.

Audit: Office roots without a scroll container before this PR

Root Routes
office-storage-dashboard.tsx:243 storage
office-applications-screen.tsx:127 applications, ats/metrics (scrolled only in the metrics view)
projects/components/ProjectForm.tsx:179 cms/projects/create, cms/projects/[id]/edit
office-universities-form.tsx:200 cms/universities/create, cms/universities/[id]/edit
payments/office-payment-analytics.tsx:147 payments
payments/OfficeTransactionHistory.tsx:165 transactions
legal/OfficeViolationReports.tsx:145 violations
settings/StripeSettingsPage.tsx:162 settings/stripe
api-keys/DeveloperPortal.tsx:140 api-keys
oauth/components/OAuthAppList.tsx:28 oauth-apps
route-local Stack roots cms/projects/[id], cms/teams/[id]/edit, cms/teams/create, settings/geographic

Plus loading/invalid branches in applications/[applicationId]/inquiry, cms/jobs/[id]/edit, cms/organizations/[id]/edit, cms/universities/[id]/edit, cms/teams/[id]/settings, oauth-apps/[id]. The navigator-level wrapper covers all of these and any future screen.

Verified

iPhone 17 Pro simulator, dev client 1.17.1 on this branch, signed in as the demo office user:

  • /office/storage: before, a swipe up changed nothing; after, it scrolls to "Top users by storage consumption", rendered as stacked cards, and the last card clears the bottom nav
  • /office/cms/workers (OfficePageLayout + OfficeLayout, nested case): scrolls through the full user list, no LogBox error
  • /office/ats/checks (DashboardLayout, nested case): scrolls to the end

Web, headless Chromium at 1280 and 1700 wide, signed in: /office/storage renders no screen-scroll wrapper and window.scrollY moves on a document scroll.

Tests: ScreenScroll.native.test.tsx (4) and ScreenScroll.web.test.tsx (1). pnpm prepush green.

Noted, not fixed here

  • DashboardLayout screens under Office now carry the bottom-nav inset twice at the very end of the page (the wrapper's and their own), about 90 px of extra whitespace on four screens.
  • The storage page's title row overflows on a phone: the "Refresh" button is pushed off the right edge (office-storage-dashboard.tsx, Row justify="space-between").
  • The desktop web storage table renders cells without column widths and clips the body to ~116 px. Not from this PR (the wrapper is a passthrough on web); filed separately.

🤖 Generated with Claude Code

Fourteen Office screens are rooted in a plain Stack with no ScrollView
of their own (storage, payments, transactions, violations, the project
and team forms, the developer portal, Stripe settings, ...) and several
more drop their scroll container in loading and error branches. On web
the document scrolls so nobody noticed; on iOS the storage table sat
below the fold with no way to reach it.

Rather than a ScrollView per screen, the Office stack now wraps every
screen through the navigator's `screenLayout`. `ScreenScroll` is a
passthrough on web and a ScrollView with `flexGrow: 1` content on native,
so `flex: 1` roots still fill the viewport and taller ones scroll. Screens
that already scroll (DashboardLayout, OfficeLayout) nest harmlessly: Yoga
sizes the inner scroller to its content and the outer one moves. A screen
that must own its full height can override with `layout` on its own
Stack.Screen.

Also: OfficePageLayout's loading state rendered a bare string inside a
Stack, which native logs as an error on every list screen while data
loads. It is a Text now.

Verified on the iPhone 17 Pro simulator: /office/storage scrolls to the
stacked table (the iPhone half of #768), /office/cms/workers and
/office/ats/checks scroll through their nested layouts, and the last card
clears the bottom nav. Web /office/storage renders no wrapper and the
document scrolls as before.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Native: Office screens built on a plain Stack cannot scroll on a phone — the storage table is unreachable below the fold

1 participant