feat(garage_ui): PageHeading, a real extraBold, and a mono that chains

The weight helpers went through _StyledText, which merges a style naming
one property and lets everything else in scope stand. That works for a
colour and it doesnt work for a weight: google_fonts encodes the weight
in the family NAME, so merging w800 over an already resolved family
changes no font file and skia synthesises instead. Skia has one fake
bold, so w600, w700 and w800 all came out the same stroke and extraBold
was indistinguishable from bold. They re-resolve the family now, keeping
whichever face is in scope, so .mono().bold() and .bold().mono() both
land on the real mono bold.

PageHeading is lifted out of the hub, where it was drawn by hand above
every section. A&A's licence page wanted the same block and a lookalike
drifts from the original inside a day.

pageGutter and propertiesSectionGap are new density tokens. Both were
local magic numbers - `fontSize * 3` copied into every app that copied
the hub, and a flat gapLg that a dense editor pane full of sections
wears badly.

garage_auth takes an optional handoff code on signIn/beginSignIn and
sends it as _handoff, so a desktop build can hand its user to the web
one without a second sign in.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FkzfwZf59HNP6R8jXcC1NR
This commit is contained in:
ImBenji
2026-10-09 15:21:48 +01:00
co-authored by Claude Opus 5
parent b5e5ed5b75
commit 7aa5cb8f8b
7 changed files with 276 additions and 23 deletions
+24
View File
@@ -96,6 +96,7 @@ class Density {
// ---- container-level spacing (panels, popovers, dialogs) ----
this.containerGap = 8.0,
this.containerPadding = 16.0,
this.propertiesSectionGap = 6.0,
// ---- optical ----
this.controlTextOffset = 0.0,
@@ -123,6 +124,7 @@ class Density {
listRowIndent = 12.0,
containerGap = 10.0,
containerPadding = 20.0,
propertiesSectionGap = 15.0,
controlTextOffset = 0.0;
/// The product tier - for the Garage web apps rather than for A&A.
@@ -156,6 +158,7 @@ class Density {
listRowIndent = 10.0,
containerGap = 10.0,
containerPadding = 20.0,
propertiesSectionGap = 15.0,
controlTextOffset = 0.0;
/// Which tier this token set represents.
@@ -230,6 +233,19 @@ class Density {
/// and `baseContainerPadding`, which always held the same value.)
final double containerPadding;
/// What separates one properties section from the NEXT one.
///
/// Its own token rather than a step off the gap ladder, because the right
/// answer genuinely isnt the same at every density. A dashboard has a
/// handful of sections and wants air around each so they read as separate
/// subjects; an editor pane stacks eight of them down a 300px column and
/// the air is the thing thats in short supply. Same widget, opposite
/// pressures - so the number is a dial, not a derivation.
///
/// Whatever its set to it must stay clearly bigger than the gap between two
/// ROWS inside a section, or a run of sections reads as one striped block.
final double propertiesSectionGap;
// ---- optical ----
/// Downward nudge applied to control content so it sits on its optical
@@ -443,6 +459,14 @@ class Density {
/// The largest step - page-level separation, above the panel scale.
double get gapXxl => controlGap * 6;
/// The inset a page's reading column takes either side, beside a rail.
///
/// Off the font, not the gap ladder: its measured against the text it
/// frames, 48 at product. Wrong on a phone - a 390pt screen loses a quarter
/// of itself to it - so a phone page wants [gapMd] instead. Was a local
/// `fontSize * 3` in the hub and in every app copying the hub.
double get pageGutter => fontSize * 3;
}
/// Icon sizes. `small` is the control icon and is derived from the density's