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 as ShellNav (see the Lookbook). The region numbering, the templates and the Index matrix still stand. The worksheet, list-table-column-roles.md and 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

  1. Inventory the regions once (the Vocabulary below).
  2. For each template, decide the Phone column first: every region ④ to ⑨, as a content question (what must exist on this page at all).
  3. Move up one breakpoint at a time. For each region ask only what the extra width buys: same, more, or moves.
  4. Record the column in the Matrix, then take the next breakpoint.
  5. Guardrail at the end of each template row: anything present only at a wider breakpoint has a reachable equivalent below it.
  6. 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:

#RegionNotes
①App bandApp 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 sidebarApp 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)
③BreadcrumbsConstant 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 navMatrix. 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 headerMatrix. Title, primary action
⑥ToolbarMatrix. Search, filters, sort. ⑥a bulk action bar swaps in on selection
⑦BodyMatrix. The primary content slot. Index: data table. Entity: overview sections or a settings form. Document: the record
⑧Side panelMatrix. A right-hand column
⑨FooterMatrix. 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. From lg, ShellNav replaces 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. Below lg there 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 in lib/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:

    1. Snapshot: where do I stand today? Four tiles on the page (Owed to you, Overdue, Due this week, Next payout), no heading.
    2. 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.
    3. Needs attention: what do I need to fix?
    4. The area's breakdown, named by its question (Who owes you): where do I start?
    5. Upcoming Schedule: what is coming? Seven calendar days.
    6. Recent activity: what happened while I was away?
    7. Improve Invoicing: how do I get more from this? Tips from the account's own numbers.
    8. Transactions · Resources · Settings: where is the work done? Links mirroring the menu; a setting carries its current value.

    From xl 3 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 a quiet container with a stone-25 header 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 with shadow-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

BandApp shell stateTest at
Ultra-widePast 2200 (3xl) the shell stops growing and centres in the backdrop; nothing changes shape2400
Wide desktopApp sidebar expanded with labels1920
LaptopExpanded with labels from 1440 (the threshold moved from 1920 on 2026-10-05); collapsed to the icon rail from lg (1024) to 14391440 and 1024
TabletApp sidebar as a drawer, one content column768
PhoneEverything stacks, lists included390

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/payments until 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.

TemplateRegionWide desktopLaptopTabletPhone
Index④ Secondary navPresent, beside the contentSame list as a pill row under the page header; scrolls sideways with a fade when it overflowsSame as laptopSame as laptop, pills share the width evenly, no icons
Index⑤ Page headerSame as laptopSame as tabletSame as phoneOne row: title left, primary action right
Index⑥ Toolbar / bulk barSame as laptopSearch, Filters and Sort controls in one visible row; Filters opens a popover anchored to the button; bulk bar swaps in on selectionSearch, 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⑦ BodySame 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 itSame as phone: the four Invoicing lists stack below lg (2026-10-15). Nothing scrolls sidewaysA 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 panelOff-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 actionsNone; the same click opens the recordNoneNone
Index⑨ FooterSame as laptopSame as tabletNumbered pager; count stays in the toolbarPrevious/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.