Page layouts
Page regions ① to ⑨, the Index, Entity, Document and Overview templates, and how each region behaves at each width.
docs/page-layouts.md · Handoff bundle page-layouts/page-layouts.md; the sidebar tree in the mocks supersedes its secondary nav
Copied from the design handoff bundle on 2026-09-22. The ④ secondary nav described below has been superseded by the sidebar tree in the bundle's
page-layouts/mock/index-tree.html, built in this repo asShellNav(see the Lookbook). The region numbering, the templates and the Index matrix still stand. The worksheet,list-table-column-roles.mdand the HTML mocks are not copied; they live in the bundle.
Working document for the Tool's page templates. Printable region map: page-layouts-worksheet.html (in the handoff bundle). Reference material (all in the handoff bundle): workshop-brutalist.html (Entity Pages two-level navigation, Account Settings, Order Detail three-zone layout, Slideover, breadcrumbs), 06-design-principles.md (P9 mobile first: desktop adds columns, not content), 05-inspiration-reference.md (responsive shell: desktop sidebar + main + detail panel, tablet slide-over, phone full screen).
Process
- Inventory the regions once (the Vocabulary below).
- For each template, decide the Phone column first: every region ④ to ⑨, as a content question (what must exist on this page at all).
- Move up one breakpoint at a time. For each region ask only what the extra width buys: same, more, or moves.
- Record the column in the Matrix, then take the next breakpoint.
- Guardrail at the end of each template row: anything present only at a wider breakpoint has a reachable equivalent below it.
- Build one reference page per template and measure it at the four test widths.
Reference pages are throwaway HTML in mock/ (this folder). Open mock/viewer.html to see one at the four widths, scaled to fit, with an overlay that labels the regions and a List selector that swaps ④ between a 3, 6 and 10 item list. mock/index-payments.html is the Index template with Payments as its content.
Reference pages and the pages built from them use a 16px root, so published measurements (Material, Tailwind UI, Polaris) apply as written and mock widths carry into Rails unchanged.
Each Index page also gets a Body matrix: one row per data column, one column per band of table room, each cell saying whether the column is shown and in what form. The bands come from the room the table has after ④ and ⑧, not from the viewport. The vocabulary for those forms is developed on Payments, the first real example, and recorded in list-table-column-roles.md once agreed.
Out of scope for the matrix: the disclosure ladder (tooltip, popover, slideover, full page) and visual style.
Vocabulary
Regions, numbered as on the worksheet:
| # | Region | Notes |
|---|---|---|
| ① | App band | App shell. Constant. The 48px strip above the page card, on the backdrop: the sidebar handle and the breadcrumb (③) on the left, the account utilities (planning, new order, notifications, help) on the right. Below lg it is pinned, under a 48px logo bar that scrolls away (2026-10-07). It replaced the dark top bar with dropdowns (2026-10-01) |
| ② | App sidebar | App shell. Built as ShellNav. Changes by width only: expanded with labels from 1440, the icon rail from lg to 1439, a drawer below lg; the handle in ① is its one toggle at every width. It sits on the backdrop with no container. A takeover level (Settings, an entity) replaces its tree from lg (see Entity) |
| ③ | Breadcrumbs | Constant on every template. Declared by the page, placed by the shell in ① (2026-10-01). Ancestry, ending on the current page as quiet text (2026-10-13; it was ancestry only) |
| ④ | Secondary nav | Matrix. The pages of the current area (Payments / Payouts / Settings). One list, two shapes: a column beside the content where there is room, a pill row under the page header where there is not. Same icons, same off-white track, same white current pill as the app sidebar. "You are here" is shown by the pill and text colour only, never by font weight |
| ⑤ | Page header | Matrix. Title, primary action |
| ⑥ | Toolbar | Matrix. Search, filters, sort. ⑥a bulk action bar swaps in on selection |
| ⑦ | Body | Matrix. The primary content slot. Index: data table. Entity: overview sections or a settings form. Document: the record |
| ⑧ | Side panel | Matrix. A right-hand column |
| ⑨ | Footer | Matrix. Count, pagination |
App shell = ① ②. Content area = ③ to ⑨, defined against the content area's width, not the viewport, so the sidebar's three states need no page changes.
Page templates: Index, Entity, Document, Overview. Breakpoints: Wide desktop, Laptop, Tablet, Phone.
Page templates
-
Index: a list of records with a toolbar, table and bulk actions. Payments, Payouts, Orders, Customers.
-
Entity: a long-lived thing with children. Level 1 overview is the show page, children are scoped indexes, Level 2 is Settings. Level 2's shape (2026-10-02, reference
/invoicing/settings/payment-types; it replaced a two-column layout with a 224px section nav inside the content column): the level takes over the sidebar. Fromlg,ShellNavreplaces the tree with a Back link out ("Back to Invoicing"), the level's name and its sections, and holds the sidebar expanded so a level never shows as the icon rail. Each section is its own page, URL and save. The content column is then one column like every other page: the page header's title names the section (Payment Types, not "Settings"), the section's primary action sits on the title row, and the trail ends on the section (Invoicing › Settings › Payment Types). A sub-page of a section (New Tax Registration) takes its own title and a back link to its section, and its trail ends on itself. Belowlgthere are no slide-outs (2026-10-07): the drawer keeps the global tree, the title becomes the level's name, and the sections are a select list under the page header (<optgroup>s for the level's groups; choosing one navigates). Chosen over stacking every section on one page as an accordion. Customer, Integration connection (typed as levels inlib/mock-data/shell-nav.ts; no pages replicated). Account Settings is Level 2 with no Level 1. -
Document: one record with a lifecycle whose content is the page. Toolbar with identity and actions, conditional alert banner, content plus a read-only reference column, sub-views (timeline, emails) as facets of the same record. Order, Payout, Payment.
-
Overview (2026-10-07, reference
/invoicing/overview; no production equivalent): an area's front page, rolling up the whole area rather than one thing. One section order, the same at every width, each section answering one question:- Snapshot: where do I stand today? Four tiles on the page (Owed to you, Overdue, Due this week, Next payout), no heading.
- Period overview: is it getting better or worse? 7, 30 or 90 days or a Custom range, each against the period before, with a column chart.
- Needs attention: what do I need to fix?
- The area's breakdown, named by its question (Who owes you): where do I start?
- Upcoming Schedule: what is coming? Seven calendar days.
- Recent activity: what happened while I was away?
- Improve Invoicing: how do I get more from this? Tips from the account's own numbers.
- Transactions · Resources · Settings: where is the work done? Links mirroring the menu; a setting carries its current value.
From
xl3 sits beside 4 and 5 beside 6, so the DOM order is the phone's reading order. The page header's title is "Overview" (the sidebar names the area), and its one action is the area's workflow (Collect payments), not one record's New. Sections are quiet, never the heavy frame: each row is aquietcontainer with astone-25header band, two widgets in a row are two containers, and the snapshot and the tips sit on the page as tiles and cards. Needs attention is the one loud box, and only while it has rows: the featured frame withshadow-brutalist-error, one red mark on its header. It never disappears: empty, it goes quiet and says "Nothing needs attention" in a dashed slot that keeps its place. Improve is the only section allowed to disappear (every tip dismissed, a new account, a role that cannot see money). A new account opens on Get set up, a featured card of the steps to start collecting (a done step stays, quieter), dismissed with Undo; it is the loud box while it shows. No financial access is an open question (2026-10-13): the prototype keeps the shape, turns every amount into a count or a date, and says why in one line under the title, rather than skeletons, padlocks or hidden sections.
Tests: has a status that ends → Document. Can be configured → Entity. An entity's overview is a roll-up of things with their own pages → Entity. An area's front page → Overview. Would be printed → Document.
Edit forms are not a template. A record edit from a list is a slideover with a sticky footer; configuration is Entity Level 2. The Order composer is bespoke and out of scope.
Breakpoints
| Band | App shell state | Test at |
|---|---|---|
| Ultra-wide | Past 2200 (3xl) the shell stops growing and centres in the backdrop; nothing changes shape | 2400 |
| Wide desktop | App sidebar expanded with labels | 1920 |
| Laptop | Expanded with labels from 1440 (the threshold moved from 1920 on 2026-10-05); collapsed to the icon rail from lg (1024) to 1439 | 1440 and 1024 |
| Tablet | App sidebar as a drawer, one content column | 768 |
| Phone | Everything stacks, lists included | 390 |
The 1440 threshold is not a CSS breakpoint: the expanded sidebar and the rail are different markup, switched by a matchMedia('(min-width: 1440px)') listener (in the app, a small Stimulus controller). The others are Tailwind's defaults plus 3xl.
Matrix
Reference pages in this repo (2026-09-24): Index
/invoicing/transactions(/invoicing/paymentsuntil 2026-10-13); Document/invoicing/transactions/3002(designed; production has no payment detail); Entity Level 2/invoicing/settings/payment-types. The Document and Entity rows below are to be filled from those pages once measured at the four widths.
Agreed cells only. Blank means undecided. A cell names a shape, never content.
| Template | Region | Wide desktop | Laptop | Tablet | Phone |
|---|---|---|---|---|---|
| Index | ④ Secondary nav | Present, beside the content | Same list as a pill row under the page header; scrolls sideways with a fade when it overflows | Same as laptop | Same as laptop, pills share the width evenly, no icons |
| Index | ⑤ Page header | Same as laptop | Same as tablet | Same as phone | One row: title left, primary action right |
| Index | ⑥ Toolbar / bulk bar | Same as laptop | Search, Filters and Sort controls in one visible row; Filters opens a popover anchored to the button; bulk bar swaps in on selection | Search, Filters and Sort controls in one visible row; Filters opens the same popover (the slide-over was not built); the list is stacked, so the bulk bar floats at the foot of the screen with a Select all (2026-10-15) | Search on its own line; Filters, the count and Sort on the next, the two triggers icon-only. Filters opens a sheet: the categories as a drill-in list showing what each has set, Apply pinned to the foot. Sort stays in the toolbar, not in the sheet. Bulk bar floats at the foot with a Select all (2026-10-15) |
| Index | ⑦ Body | Same table, filling the room left by ④ and ⑧ | Same table; more columns show as room allows (Body matrix); sideways scroll only where a band still needs it | Same as phone: the four Invoicing lists stack below lg (2026-10-15). Nothing scrolls sideways | A StackedList (2026-10-15): one list with hairline rows, not a card per record. The whole row links to the record: the record and its amount; who and what, with the status at the end; quieter facts, with the sync at the end. Row actions only where a record has no page of its own. Selection keeps its boxes. A day band groups the rows while the list is in date order. Nothing scrolls sideways |
| Index | ⑧ Side panel | Off-white column beside the page, full card height, with a left hairline; clicking a row shows that record's summary there with a link to open it; the row is marked in mustard; checkbox selection is separate and stays for bulk actions | None; the same click opens the record | None | None |
| Index | ⑨ Footer | Same as laptop | Same as tablet | Numbered pager; count stays in the toolbar | Previous/next pager; result count sits in the toolbar |
| Entity | ④ Secondary nav | ||||
| Entity | ⑤ Page header | ||||
| Entity | ⑥ Toolbar / bulk bar | ||||
| Entity | ⑦ Body | ||||
| Entity | ⑧ Side panel | ||||
| Entity | ⑨ Footer | ||||
| Document | ④ Secondary nav | ||||
| Document | ⑤ Page header | ||||
| Document | ⑥ Toolbar / bulk bar | ||||
| Document | ⑦ Body | ||||
| Document | ⑧ Side panel | ||||
| Document | ⑨ Footer |
Proposals for Index (not agreed)
Fable's draft, to react to on the live Payments page (localhost:3250/payment_transactions, currently rendered with no ④ at any width).
On Index, ⑦ holds the data table. As built on Payments: the checkbox and row-action columns have set widths, Customer takes a quarter of the table and truncates, the remaining columns never wrap, and Orders and Fees fold into a small line under Customer and Total Amount below 900px of table room (container query). The column vocabulary is not agreed; see list-table-column-roles.md for the measured widths.
Giving order as width drops: folding columns fold; Customer truncates; toolbar wraps and the header action moves under the title; below lg the rows become a StackedList, and below sm the filter popover becomes a sheet (both built 2026-10-15). A record's item tables and the settings lists stack only below md, where they stop fitting; a table of inputs reflows instead of stacking (Table reflow_below). See the UX guide "A table on a phone".
Open questions: whether ⑧ exists on Index at wide (research suggests the selected row's detail shown in place of a slideover, and P9 requires anything in it to be reachable at other widths); whether the ⑦ width is capped at wide.
Answered (2026-10-15): phone cards versus a scrolling table — neither, a StackedList of hairline rows; the filter sheet on phone — a sheet below sm, nearly full height with Apply pinned to its foot, so it no longer outgrows a short page at 390.