Skip to content

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

Merged
thinkclay merged 3 commits into
mainfrom
redesign/r1-851-rhythm
Sep 22, 2026
Merged

thinkclay merged 3 commits into
mainfrom
redesign/r1-851-rhythm

Conversation

@thinkclay

Copy link
Copy Markdown
Contributor

Closes #851. Release 1, epic #847. Replaces #865, which GitHub auto-closed when its base branch was deleted on merging #864; same branch, now merged with 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

The change

SCREEN_RHYTHM and useScreenRhythm 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.

Seven Office screens that render no layout 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 it carried its own width > 800 breakpoint, so Office collapsed to one column at a different width than everywhere else.

Verified

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

One left edge, everywhere — 22 distinct positions before #864, three after it, one here. Remaining y differences are content above the title: Office screens carry a breadcrumb and a tab strip.

Re-verified after merging main: nx run scf-core:test 1175/1175, typecheck and pnpm prepush clean.

Merge notes

Resolved against what has landed since: the two bare Office screens keep the ScreenHeader from #876 and take the shared gutter from this branch — both were wanted. The layout conflicts were import lists where this branch's rhythm hook replaces useResponsive.

One thing worth flagging: git auto-merged a hook block into ProfileLayout twice without raising a conflict, because the two copies landed at different offsets. tsc caught it (Cannot redeclare block-scoped variable). A clean git merge is not evidence that a merge is correct.

🤖 Generated with Claude Code

thinkclay and others added 3 commits September 21, 2026 15:53
…ne source

120 of the 200 screens captured by the route sweep matched no heading at
all — not `h1`, not `aria-level`, not `role="heading"`. They were not
blank; they showed a visible title set as styled `Text`, which reaches
neither the accessibility tree nor a screen reader's heading navigation.
Of the 39 that did have one, the title started in 22 distinct positions
on desktop and 24 on mobile.

`DashboardPage`'s `pageTitle` only ever set the browser tab. The four
layouts now render a `ScreenHeader` and take the title from the route's
own `titleKey`, so a screen gets a heading without remembering to draw
one — and the nav label and the page title are the same string by
construction, which is the drift the prototype's audit called out ("Find
talent" opening a page titled "Worker search").

`OfficePageLayout` swaps its bare `<H2>` for the same component, with the
create button in the actions slot: page-level primary actions live at
header right, not inside the filter bar. Notifications was the one screen
with no header treatment at all; its hand-rolled 20px bold title is gone
and its Settings control moves to that same slot.

The first-run rule, from the prototype's second audit: a screen opens
expanded, and collapsing the tip is a choice it remembers per screen.
`useScreenHeaderCollapse` holds that; an unreadable store means expanded,
which is the first-visit answer anyway.

Measured after, at 1440:

  /communities              Communities    (332,32)
  /jobs/saved               Saved Jobs     (332,32)
  /dashboard/notifications  Notifications  (332,32)
  /office/cms/jobs          Jobs           (314,120)
  /profile                  Profile        (316,6)
  /assessments              Assessments    (316,6)

22 positions down to three — one per layout. Collapsing those three into
one is #851, which is what that issue is for; the gutters and vertical
rhythm differ between the layouts, not the header.

Kickers and tips are wired through but no screen supplies copy yet: that
is per-screen writing and lands with each screen in releases 2 and 3.
`PageHeader` is untouched — despite #814's description it is a search and
filter toolbar, not a title header, so it belongs to #815.

Refs #814, #860

Co-Authored-By: Claude Opus 5 <[email protected]>
…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]>
# Conflicts:
#	packages/scf-core/components/layouts/AssessmentsLayout.tsx
#	packages/scf-core/components/layouts/DashboardLayout.tsx
#	packages/scf-core/features/office/legal/OfficeViolationReports.tsx
#	packages/scf-core/features/office/office-storage-dashboard.tsx
@thinkclay
thinkclay merged commit 6006bb1 into main Sep 22, 2026
9 checks passed
@thinkclay
thinkclay deleted the redesign/r1-851-rhythm branch September 22, 2026 20:04
thinkclay added a commit that referenced this pull request Sep 22, 2026
#877 treated `OfficeProjectsList` as one of the Office screens that render
no layout and gave it the shared gutter directly. It is not: it wraps
itself in `OfficeLayout`, which already supplies one. So the title sat at
x=364 while every other Office list sat at 332 — the same
gutter-paid-twice bug #877 fixed for `OfficePageLayout`, reintroduced one
file over.

Caught by sweeping `main` after the release-1 merges rather than by any
test: six of the seven screens that change touched were genuinely bare,
and only a measurement of where the title lands distinguishes the
seventh.

While in here, the screen's hand-rolled `<H2>` plus description becomes
`ScreenHeader`, like every other Office list. It was a fourth way to open
a screen in a section that now has one.

Measured at 1440 and 390:

  /office/cms/projects   x=332   x=16
  /office/cms/jobs       x=332   x=16

Refs #851

Co-authored-by: Claude Opus 5 <[email protected]>
thinkclay added a commit that referenced this pull request Oct 5, 2026
…/ bell / avatar (#989)

Two things a phone user sees on every screen, brought onto the prototype's
arrangement (#975, #976).

The bottom bar was a floating glass pill — blur, a 32px radius, a drop
shadow, an animated indicator sliding under the active tab. The prototype's
bar is a strip: full width, a hairline on top, slots at a 52px floor, an
icon over an 11px label, the active one in the accent. Being opaque, it gets
for free what the pill did in three layers to stay legible over scrolled
content (#378). The strip publishes 52 as its height; consumers add the
safe-area inset themselves, as they already did. The blur-view shims go
with it — nothing else imported them.

The masthead was avatar / centred screen title / search. It is now logo /
search / bell with its unread count / avatar on a hairline: the title comes
from each screen's ScreenHeader since #877, so the bar was repeating it;
the count moves from the avatar's corner to a bell that goes to
Notifications; the logo takes the left edge so a phone screen says whose
app it is. The section's tabs still ride beneath the row (#968).

Drawer ceilings in the literal ratchet drop (fontSize 16 → 15, hex 4 → 3).

Co-authored-by: Claude Fable 5.1 <[email protected]>
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.

feat(layout): one screen rhythm — gutters, content width, section gaps and breakpoints in DashboardPage, OfficeLayout and the drawer

1 participant