Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions docs/branch-review-ledger.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/design-system/COMPONENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ This generated snapshot is a local source-derived inventory. It does not assert
| `AnswerFooter` | answer | yes | yes | no | yes | no | 0 |
| `AsyncButton` | controls | yes | yes | inherited-global-root | yes | no | 4 |
| `Breadcrumb` | layout | yes | yes | inherited-global-root | yes | no | 1 |
| `Button` | controls | yes | yes | inherited-global-root | yes | no | 2 |
| `Button` | controls | yes | yes | inherited-global-root | yes | no | 3 |
| `Checkbox` | controls | yes | yes | no | yes | no | 0 |
| `Chip` | controls | yes | yes | inherited-global-root | yes | no | 3 |
| `Citation` | source | yes | yes | no | yes | no | 0 |
Expand Down Expand Up @@ -990,7 +990,7 @@ This generated snapshot is a local source-derived inventory. It does not assert
| `RetrievalStateBanner` | answer | yes | yes | inherited-global-root | yes | no | 1 |
| `SafeBoldText` | layout | yes | yes | inherited-global-root | yes | no | 8 |
| `SearchField` | controls | yes | yes | no | yes | no | 0 |
| `SegmentedControl` | controls | yes | yes | inherited-global-root | yes | no | 2 |
| `SegmentedControl` | controls | yes | yes | inherited-global-root | yes | no | 3 |
| `Select` | controls | yes | yes | inherited-global-root | yes | no | 2 |
| `Sheet` | layout | yes | yes | inherited-global-root | yes | no | 23 |
| `Skeleton` | feedback | yes | yes | inherited-global-root | yes | no | 6 |
Expand Down
11 changes: 8 additions & 3 deletions docs/design-system/adoption-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,13 @@
"directImportFiles": [
"src/components/AccessibleTable.tsx",
"src/components/clinical-dashboard/signed-image.tsx",
"src/components/in-page-nav/in-page-nav-header.tsx",
"src/components/ui/confirm-dialog.tsx"
],
"productImportFiles": [
"src/components/AccessibleTable.tsx",
"src/components/clinical-dashboard/signed-image.tsx"
"src/components/clinical-dashboard/signed-image.tsx",
"src/components/in-page-nav/in-page-nav-header.tsx"
],
"designSync": {
"listedInSourceMap": true,
Expand Down Expand Up @@ -1338,11 +1340,13 @@
"entryExported": true,
"directImportFiles": [
"src/components/clinical-dashboard/patient-profile-panel.tsx",
"src/components/clinical-dashboard/settings-dialog.tsx"
"src/components/clinical-dashboard/settings-dialog.tsx",
"src/components/in-page-nav/in-page-nav-header.tsx"
],
"productImportFiles": [
"src/components/clinical-dashboard/patient-profile-panel.tsx",
"src/components/clinical-dashboard/settings-dialog.tsx"
"src/components/clinical-dashboard/settings-dialog.tsx",
"src/components/in-page-nav/in-page-nav-header.tsx"
],
"designSync": {
"listedInSourceMap": true,
Expand Down Expand Up @@ -1473,6 +1477,7 @@
"tests/design-sync-visual-exports.test.ts",
"tests/document-filter-panel.dom.test.tsx",
"tests/document-organization.test.ts",
"tests/factsheet-save.dom.test.tsx",
"tests/header-scroll-hide-contract.test.ts",
"tests/image-lightbox-geometry.test.ts",
"tests/mode-nav.dom.test.tsx",
Expand Down
51 changes: 40 additions & 11 deletions docs/search-chrome-behaviour.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ This repo uses one shared search experience across the global shell, dashboard r

## Page ownership model

| Page state | Composer placement | Reserve owner |
| ----------------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| Answer home / standalone mode homes | In-flow hero composer on phones and larger breakpoints | Page content; no fixed phone dock reserve |
| Submitted/search-result views | Compact bottom dock on phones; in normal page flow on tablets and desktops | Shell/dashboard `--mobile-composer-reserve` on phones; page content on desktop |
| Answer result view | Overlaid glass header plus answer composer dock | Dashboard `#main-content` top/bottom reserves |
| Document detail/source routes | `DocumentViewer` floating composer | `DocumentViewer` content padding |
| Document section navigation | Header row disclosure (phone sheet) + rail index card at `lg` | None — adds no chrome and no reserve |
| Calculators (`/calculators`) | Page-owned composer (desktop top + phone bottom dock) | Calculators page pad; shell reserve stays `0` |
| Info/detail pages with no composer | No fixed composer | Idle shell padding only |
| Page state | Composer placement | Reserve owner |
| ----------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| Answer home / standalone mode homes | In-flow hero composer on phones and larger breakpoints | Page content; no fixed phone dock reserve |
| Submitted/search-result views | Compact bottom dock on phones; in normal page flow on tablets and desktops | Shell/dashboard `--mobile-composer-reserve` on phones; page content on desktop |
| Answer result view | Overlaid glass header plus answer composer dock | Dashboard `#main-content` top/bottom reserves |
| Document detail/source routes | `DocumentViewer` floating composer | `DocumentViewer` content padding |
| Document section navigation | Header row disclosure (phone sheet) + rail index card at `lg` | None — adds no chrome and no reserve |
| Record page breadcrumb header | Same header row without the disclosure or track; view mode inline from `sm` | None — portals into the phone collapse row, sticky at `sm+` |
| Calculators (`/calculators`) | Page-owned composer (desktop top + phone bottom dock) | Calculators page pad; shell reserve stays `0` |
| Info/detail pages with no composer | No fixed composer | Idle shell padding only |

## Default in-page navigation template

Expand Down Expand Up @@ -93,10 +94,11 @@ detailed DocumentViewer rules remain invariant 22 — but new work mounts `InPag

**Adopted so far:** `/differentials/diagnoses/[slug]`, `/services/[slug]`, `/forms/[slug]`,
`/specifiers/[slug]` (record and catalogue reference), `/formulation/[slug]`,
`/dsm/diagnoses/[slug]` and its `/differentials` child. Each is also listed in
`/dsm/diagnoses/[slug]` and its `/differentials` child, and factsheet detail pages
(`/factsheets/[slug]`). Each is also listed in
`isHeaderAddonSlotOwnedRoute` (`src/components/mode-nav/header-addon-slot.ts`), which is how
the one-header-per-slot rule stays checkable. Still on their own patterns: medications
(`SectionTabs`), factsheets, and differentials presentations.
(`SectionTabs`) and differentials presentations.

**Visual slots (adapt labels, back href, sections, and actions to the mode):**

Expand All @@ -120,6 +122,33 @@ the one-header-per-slot rule stays checkable. Still on their own patterns: medic
- Do not give the in-page header its own scroll-hide hook; share the universal collapse
signal described under “Scroll hide/reveal”.

**The breadcrumb shape (pages with no section index).** The eight record pages behind
`InformationPageBreadcrumbs` have no sections, so the disclosure would open a sheet listing
one item and the track would render one full-width segment. Omit `sections` and
`InPageNavHeader` drops both and renders the breadcrumb shape instead — same row grammar,
same single collapse owner, none of the section machinery. `usePageSectionWeights` observes
nothing for an empty list, so those pages pay no measurement cost. Three optional props
shape that row:

- `showBackLabel={false}` keeps the arrow alone at every width when the row also carries an
action or a mode, so the title owns the space. `back.label` is still the accessible name
and becomes the desktop tooltip.
- `primaryAction` promotes exactly **one** page action, as `Button variant="secondary"` —
not the filled `--command` slab, because a control pinned to every scroll position should
not be the page's heaviest. Its label is `sr-only` below `sm` so the accessible name does
not change with the breakpoint. A second promoted control is what turns the row back into
the wrapping toolbar this shape replaced; everything else belongs in `actions`.
- `mode` is a page-level **view** mode — how the page renders, not where you are in it — and
uses the shared `SegmentedControl`. Below `sm` it wraps to its own full-width band under
the row; from `sm` it sits inline and costs no extra height (measured on
`/factsheets/sertraline`: 131px phone, 75px from `sm`, 65px with no mode).

Adopted by `src/components/factsheets/factsheet-detail-page.tsx`. When a page adopts this,
register its routes in `isHeaderAddonSlotOwnedRoute`
(`src/components/mode-nav/header-addon-slot.ts`) and add the component to the expected
claimants in `tests/mode-nav-addon-slot.dom.test.tsx`, or that guard fails: the slot holds
exactly one page-owned header.

**Not this template:** Therapy-style `ModeNav` (multi-route mode tabs via
`ModeNavHeaderPortal`) is a different pattern for mode-level page switching. Info-page
`PageHeader` / breadcrumb chrome is also not in-page section navigation. Existing
Expand Down
14 changes: 14 additions & 0 deletions mockups/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,17 @@ Static desktop/phone comps for the pages that need redesign (not ModeHome mockup
These are PNGs for design review only. Runnable `/mockups/*` routes are a separate implementation step.

**Perfected combined comps** (desktop + phone in one image, recommended directions only) live in [`public/mockups/mode-page-redesign-2026-07/perfected-combined/`](../public/mockups/mode-page-redesign-2026-07/perfected-combined/README.md).

## Breadcrumb header study (2026-08-09) — shipped, route retired

Three sticky header directions for record pages that use `InformationPageBreadcrumbs` and have **no in-page section index** — factsheets, services, forms, DSM, specifiers, formulation, medications. `InPageNavHeader` stays the default for in-page navigation per [`docs/search-chrome-behaviour.md`](../docs/search-chrome-behaviour.md); it is the wrong shape for those pages, because with no sections its disclosure opens a one-item sheet and its weighted track renders one full-width segment. Every direction kept that header's row grammar (back, title, ellipsis, one scroll owner) and dropped the section machinery:

| Direction | Adds | Fits |
| -------------------- | ------------------------------------- | --------------------------------------- |
| 01 Crumb rail | Nothing — identity and return only | Forms, DSM, specifiers, formulation |
| 02 Action rail | One promoted primary action pill | Factsheets, services, medications |
| 03 Crumb rail + mode | Segmented view mode in the track slot | Factsheet reading level, medication age |

**Outcome: direction 02 shipped**, as the breadcrumb shape of the existing `InPageNavHeader` rather than a new component — omitting `sections` drops the disclosure and the track, and `primaryAction` / `mode` / `showBackLabel` shape the row. Adopted first on `/factsheets/<slug>`, where the reading level rides the `mode` slot. Contract: `docs/search-chrome-behaviour.md` ("The breadcrumb shape").

**The runnable `/mockups/breadcrumb-header` route was removed once 02 shipped.** It was not deleted for tidiness: `check:bundle-budget` totals every built chunk, mockups included, and `main` sits at roughly +9.4% against a 10% tolerance, so the study's two scratch chunks (~9.8 KiB gzip) alone pushed the repo to +10.1% and failed `Build` — the same failure PR #1580 hit, at the same number. A design-scratch route that 404s in production is the wrong thing to spend the last of that headroom on. The table above is the durable record; recover the route from history if the alternatives need re-reading.
Loading
Loading