Skip to content

feat(redesign): one screen rhythm — every title starts at the same left edge - #865

Closed
thinkclay wants to merge 1 commit into
redesign/r1-814-screenheaderfrom
redesign/r1-851-rhythm
Closed

thinkclay wants to merge 1 commit into
redesign/r1-814-screenheaderfrom
redesign/r1-851-rhythm

Conversation

@thinkclay

Copy link
Copy Markdown
Contributor

Closes #851. Release 1, epic #847. Stacked on #864 — this PR targets that branch so the diff shows only the rhythm work. Merge #864 first and GitHub will retarget this to main.

The problem, and why it hid

The four layouts each invented their own spacing. Three expressed it through the named padding scale, and that is what kept the divergence invisible in the source: '2xl' is 16, 'lg' is 10, 'sm' is 6, so a 32px gutter and a 16px gutter both read as "the big one".

Measured at 1440, before:

Layout Title x
DashboardLayout 332
Profile, Assessments 316
OfficeLayout 314
Office CMS screens 340 — paying the gutter twice, OfficePageLayout adding its own 8px on top of the layout's

The change

SCREEN_RHYTHM and useScreenRhythm (packages/scf-core/constants/layout.ts) hold gutter, vertical padding, section gap, column gap and row gap once, as plain numbers. A layout reaching for '2xl' cannot tell you what it will get without opening the token file; that is how this drift happened in the first place.

The values follow DashboardLayout — already the most airy and the closest to the prototype, whose design system runs a 1.15× density scale and asks for room rather than tightness.

Seven Office screens render no layout at all and set their own padding="md"; they now take the gutter from the same hook.

OfficeLayout also moves off useWindowDimensions, which .radium/scaffald-ui.md forbids. It registers a listener per component where useResponsive shares one subscription, and enough of them mounting together is how "Maximum update depth exceeded" happens. It also carried its own width > 800 threshold, so Office collapsed to one column at a different width than everywhere else.

Verified in the browser

Signed in as the office user, reading each rendered heading's getBoundingClientRect:

Route Desktop Mobile
/communities (332, 32) (16, 68)
/jobs/saved (332, 32) (16, 68)
/dashboard/notifications (332, 32) (16, 68)
/profile (332, 32) (16, 68)
/assessments (332, 32) (16, 68)
/office/applications (332, 56) (16, 92)
/office/cms/jobs (332, 140) (16, 212)

One left edge, everywhere, at both widths — 22 distinct positions before #864, three after it, one here. The remaining y differences are content above the title: Office screens carry a breadcrumb and a secondary tab strip that other screens do not.

nx run scf-core:test 1175/1175, typecheck clean, pnpm prepush clean.

Still open, deliberately

🤖 Generated with Claude Code

…ft edge

The four layouts each invented their own spacing, and because three of
them expressed it through the *named* padding scale the divergence did
not look like divergence in the source: `'2xl'` is 16, `'lg'` is 10,
`'sm'` is 6, so a 32px gutter and a 16px gutter both read as "the big
one". Measured at 1440, the page title started at x=332 under
DashboardLayout, x=316 under Profile and Assessments, x=314 under Office,
and x=340 on the Office CMS screens, which paid the gutter twice —
OfficePageLayout added its own 8px on top of the layout's.

`SCREEN_RHYTHM` and `useScreenRhythm` hold the numbers once, as plain
numbers, and all four layouts read them. The values follow
DashboardLayout: it was already the most airy and the closest to the
prototype, whose design system runs a 1.15x density scale and asks for
room rather than tightness.

The seven Office screens that render no layout at all set their own
`padding="md"`, so they took the gutter from the same hook rather than
from a token that happens to be 8.

OfficeLayout also moves off `useWindowDimensions`, which
`.radium/scaffald-ui.md` forbids: it registers a listener per component
where `useResponsive` shares one subscription, and enough of them
mounting at once is how "Maximum update depth exceeded" happens. It also
carried its own `width > 800` threshold, so Office collapsed to one
column at a different width than the rest of the app.

Measured after, signed in, at 1440 and 390:

  route                     desktop      mobile
  /communities              x=332 y=32   x=16 y=68
  /jobs/saved               x=332 y=32   x=16 y=68
  /dashboard/notifications  x=332 y=32   x=16 y=68
  /profile                  x=332 y=32   x=16 y=68
  /assessments              x=332 y=32   x=16 y=68
  /office/applications      x=332 y=56   x=16 y=92
  /office/cms/jobs          x=332 y=140  x=16 y=212

One left edge, everywhere, at both widths. The remaining y differences
are content above the title — Office screens carry a breadcrumb and a
secondary tab strip that other screens do not — rather than rhythm.

`/office/storage` and `/office/violations` still have no heading: they
render no layout and no ScreenHeader. #816 reaches them.

Refs #851

Co-Authored-By: Claude Opus 5 <[email protected]>
thinkclay added a commit that referenced this pull request Sep 22, 2026
* fix(mobile): five Office routes stop scrolling sideways on a phone

The issue blamed the web Table's 150px column floor. That was wrong, and
measuring said so: `stackBelow` already defaults to 768, so the Table
stacks into cards at 390 and was never the overflow. Walking the DOM for
elements wider than the viewport found three unrelated causes, none of
them the table.

**A text block beside a button, with nothing allowed to shrink.**
`<Row justify="space-between">` holding a bare `<Stack>` of title and
description next to a Refresh button. React Native defaults `flexShrink`
to 0, unlike the web, so the text keeps its content width and the row
pushes past the screen — 460px on Payment Analytics, 412 on Violation
Reports. `flex={1} minWidth={0}` on the text side fixes it, which is the
same treatment `BlockedUsersSection.tsx:54` already uses. Six screens
carried the pattern; all six are fixed, including the three that were
not yet overflowing but would at a longer title.

**Six status filters on one line.** `/office/oauth-apps` laid them in a
`nowrap` Row. They wrap now: a filter scrolled out of frame is one the
user does not know exists — the same call the Tabs strip made.

**Three form fields side by side.** `/office/cms/projects/create` put
Status, Start date and End date in one Row of `flex={1}` children, and
the same `flexShrink: 0` default kept them at content width. They wrap,
with a 200px floor each.

Measured at 390, before → after:

  /office/payments              571 → 390
  /office/violations            524 → 390
  /office/transactions          522 → 390
  /office/cms/projects/create   505 → 390
  /office/oauth-apps            491 → 390

A 94-capture sweep of every `/office` and `/employers` route at 390
reports zero horizontal scroll.

Closes #858

Co-Authored-By: Claude Opus 5 <[email protected]>

* feat(redesign): the last two screens without a heading get one

The route sweep found 120 of 200 captures with no heading in the
accessibility tree. #864 closed almost all of it by moving the title into
the four layouts, and #873 reached the Office lists through
OfficePageLayout. These two were left: they render no layout at all — the
Office navigator's screenLayout only wraps them in a scroller — and each
drew its own title as a plain `<Text>` inside a space-between Row.

Both take `ScreenHeader` instead, with the description as the tip and
Refresh in the actions slot, so a page-level action sits at header right
like everywhere else.

Measured, signed in:

  /office/storage      "Storage Analytics"                    heading found
  /office/violations   "Anti-Circumvention Violation Reports" heading found

at 1440 and 390, no horizontal scroll at either. They sit at x=308/8
rather than the app's 332/16 because this branch is off main and does not
carry the screen rhythm; #865 moves them onto the shared gutter along
with every other Office screen.

Closes #860

Co-Authored-By: Claude Opus 5 <[email protected]>

---------

Co-authored-by: Claude Opus 5 <[email protected]>
@thinkclay
thinkclay deleted the branch redesign/r1-814-screenheader September 22, 2026 19:58
@thinkclay thinkclay closed this Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant