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:
@@ -102,7 +102,13 @@ class GarageAuth extends ChangeNotifier {
|
||||
// completeSignIn() with the query params. on native it opens the system
|
||||
// browser; the host app catches the inbound deep link and likewise calls
|
||||
// completeSignIn(). this is the lower level half of signIn().
|
||||
Future<void> beginSignIn() async {
|
||||
//
|
||||
// [handoff] is a code another build of your app minted with
|
||||
// /auth/handoff/issue - the desktop app sending its user to the web one. It
|
||||
// stands in for the sign in screen (and consent, when both clients are in
|
||||
// the same project), so they dont have to sign in twice. A used or expired
|
||||
// one just means they get the normal sign in.
|
||||
Future<void> beginSignIn({String? handoff}) async {
|
||||
if (clientId.isEmpty) {
|
||||
throw AuthError("GarageAuth: clientId is empty.");
|
||||
}
|
||||
@@ -127,6 +133,7 @@ class GarageAuth extends ChangeNotifier {
|
||||
"state": state,
|
||||
"code_challenge": challenge,
|
||||
"code_challenge_method": "S256",
|
||||
if (handoff != null && handoff.isNotEmpty) "_handoff": handoff,
|
||||
});
|
||||
|
||||
await _redirect.navigateTo(authUri.toString());
|
||||
@@ -136,7 +143,7 @@ class GarageAuth extends ChangeNotifier {
|
||||
// future never really "completes" (the page is leaving) — your callback route
|
||||
// drives completeSignIn. on native it's the same begin step; the deep-link
|
||||
// handler completes it. so think of signIn() as "start the flow".
|
||||
Future<void> signIn() => beginSignIn();
|
||||
Future<void> signIn({String? handoff}) => beginSignIn(handoff: handoff);
|
||||
|
||||
// finishes the exchange. callers pass the query params off the inbound
|
||||
// callback url (web: go_router state.uri.queryParameters, native: parse the
|
||||
|
||||
Reference in New Issue
Block a user