Skip to content

refactor(fortal)!: default unsized typography from tokens, not ambient text - #153

Merged
leoafarias merged 1 commit into
mainfrom
leoafarias/fortal-token-typography
Aug 14, 2026
Merged

refactor(fortal)!: default unsized typography from tokens, not ambient text#153
leoafarias merged 1 commit into
mainfrom
leoafarias/fortal-token-typography

Conversation

@leoafarias

Copy link
Copy Markdown
Member

Description

Unsized Fortal typography previously inherited the nearest Flutter
DefaultTextStyle. Material surfaces could therefore replace the intended
Fortal run with host metrics and colors, which made the same component render
differently depending on its ancestor widgets and required the dashboard's
DashboardSurfaceTone workaround.

This change adopts token-backed defaults:

  • unsized Text, Code, Kbd, and Link anchor their metrics to text3;
  • neutral Text and Heading use gray12, while Text defaults to the regular
    weight token;
  • Code and Kbd retain their Radix size factors, now computed from tokens;
  • every Fortal typography recipe uses a non-inheriting Flutter TextStyle, so
    host typography fields cannot leak into its resolved run;
  • transparent, non-accent ghost Code keeps only the ambient foreground as a
    post-composition fallback, allowing an explicit recipe color or foreground
    to override it safely and allowing a later merged ghost recipe to replace an
    earlier ambient fallback;
  • disabled Links no longer enter the actionable underline recipe when they
    retain a callback;
  • FortalScope keeps its root DefaultTextStyle solely as a courtesy fallback
    for bare Flutter Text;
  • the dashboard workaround is removed and gallery-owned bare labels use
    Fortal typography.

The rebased Link changes build on the RemixLink/LinkStyler architecture
landed in #151. Documentation, the public skill guidance, parity exceptions,
and coverage evidence now describe the same token-default contract.

Users relying on a surrounding DefaultTextStyle to resize or reweight an
unsized Fortal component must pass the desired Fortal size or weight
explicitly.

Related Issues

Supersedes the dashboard text-run workaround introduced in #136. Integrates
with the RemixLink implementation from #151; it does not close either PR.


Checklist

  • My PR includes unit or integration tests for all changed/updated/fixed behaviors.
  • I have updated or added relevant documentation (doc comments with ///).
  • I am prepared to follow up on review comments in a timely manner.

Breaking Change

Does this PR require users of the package to manually update their code?

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

Validation

  • fvm dart run build_runner build --delete-conflicting-outputs
  • formatting and git diff --check
  • fvm flutter analyze --fatal-infos in packages/remix_fortal
  • fvm flutter analyze --fatal-infos in apps/dashboard
  • fvm dart run tool/fortal_parity/check.dart
  • fvm dart run tool/validate_docs.dart
  • root toolchain, hosted-Mix, Material-independence, and generated-source checks
  • fvm flutter test in packages/remix_fortal — 381/381
  • fvm flutter test in apps/dashboard — 48/48
  • macOS dashboard Typography gallery inspected in dark/light appearances and
    with the gray theme changed; the Link gallery was rechecked after rebasing
    onto feat(remix)!: add RemixLink and rebuild FortalLink on it #151.

…t text

BREAKING CHANGE: Unsized Fortal typography now resolves its run from Fortal tokens instead of the ambient DefaultTextStyle. Set an explicit Fortal size or weight when a different token is required.
@leoafarias
leoafarias merged commit bea51d2 into main Aug 14, 2026
3 checks passed
@leoafarias
leoafarias deleted the leoafarias/fortal-token-typography branch August 14, 2026 20:29
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