Skip to content

Commit 9d14a81

Browse files
committed
fix(app-shell): phone bar pages grow their route slot so the end inset scrolls (#36792)
Claude-Session: https://claude.ai/code/session_01QSeKYmRepQK9DkZeU7F53D Co-authored-by: Claude <noreply@anthropic.com>
1 parent a03c3d4 commit 9d14a81

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

‎ui/packages/app-shell/src/layout/ConsoleLayout.tsx‎

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { DraftPreviewBar } from '../preview/DraftPreviewBar.js';
2323
import { UnpublishedAppBar } from '../preview/UnpublishedAppBar.js';
2424
import { ConsoleNotificationBanners } from './ConsoleNotificationBanners.js';
2525
import { UnifiedSidebar } from './UnifiedSidebar.js';
26-
import { PhoneAppNavBar, isPhoneTabRoute } from './PhoneAppNavBar.js';
26+
import { PhoneAppNavBar, isPhoneTabRoute, phoneTabOf } from './PhoneAppNavBar.js';
2727
import { PhoneAppHomeSlotProvider } from './PhoneAppHome.js';
2828
import { PhonePageBarProvider } from './PhonePageBar.js';
2929
import { SidebarDocsNavSlotProvider } from './sidebarDocsNavSlot.js';
@@ -195,6 +195,15 @@ export function ConsoleLayout({
195195
// the top left goes back. The route slot leaves the bar's height free at its
196196
// end.
197197
const phoneNavBar = phone && isPhoneTabRoute(location.pathname);
198+
// objectstack#36792 — the inset's end padding only scrolls when it follows
199+
// in-flow content: a page taller than an `h-full` route slot overflows the
200+
// slot, and the scroll ends at the page's bottom, under the bar. So on the
201+
// bar's home and approvals pages the slot grows with its page (at least the
202+
// inset's height, so a short page or an empty state still fills it) and the
203+
// padding ends the scroll above the bar. The inbox list keeps the fixed slot:
204+
// it is an object list page, which bounds itself and scrolls its rows in its
205+
// own box (objectui#12463), and a growing slot would unbound a long one.
206+
const phoneSlotGrows = phoneNavBar && phoneTabOf(location.pathname) !== 'notifications';
198207
// objectstack#35424 — a docs page has one navigation, the docs' own (the
199208
// app's books and a way back to the app), so the app's menu is not drawn
200209
// there. objectstack#37150 (ruling 7142354097 on objectstack#36107) — from
@@ -393,7 +402,14 @@ export function ConsoleLayout({
393402
ref={mainContentRef}
394403
tabIndex={-1}
395404
data-testid="console-route"
396-
className="h-full lg:min-h-0 focus:outline-none"
405+
className={cn(
406+
'h-full lg:min-h-0 focus:outline-none',
407+
// objectstack#36792 — a one-track grid: its row stretches to the
408+
// `min-h-full` floor, so a page's `h-full` root still resolves
409+
// against it, and grows past it with a taller page. The track's
410+
// `minmax(0,1fr)` keeps a wide page from widening the slot.
411+
phoneSlotGrows && 'grid h-auto min-h-full grid-cols-[minmax(0,1fr)]',
412+
)}
397413
>
398414
<ShellSidebarExpandFallback />
399415
{children}

0 commit comments

Comments
 (0)