Jeff's Page Shell
Use consistent page composition for predictable UX and maintenance.
Apply when
- •Building or refactoring route page layout.
- •Implementing list/table pages.
Standard layout
tsx
<> <PageHeader ... /> <div className="flex-1 overflow-auto bg-card">...</div> <TableFooter ... /> </>
Rules
- •Use shared
<PageHeader>and<TableFooter>components. - •Prefer one scroll container (
flex-1 overflow-auto) for both axes. - •Avoid nested
overflow-autowrappers around tables. - •Keep loading/empty/error states explicit and consistent.
- •When using
keepPreviousData, use subtleisFetchingUI transitions.
Data table expectations
- •Always handle loading, error, and empty states.
- •Keep horizontal scroll behavior stable (
min-w-maxtable behavior where needed). - •Use shared page-size constants from
src/lib/constants. - •Keep filter UI colocated in
-{feature}-filters.tsxfiles.
Validation checklist
- • Header controls are in expected slots.
- • Footer pagination/page-size behavior is consistent.
- • No nested scroll traps.