Skip to content

Navigation Menu

Sign in
Sign up

docs(theme-neutral): document Figtree and its loading snippet - #6079

Open
AKnassa wants to merge 3 commits into
facebook:main from
AKnassa:rocky/issue-5991-neutral-figtree
Open

docs(theme-neutral): document Figtree and its loading snippet #6079
AKnassa wants to merge 3 commits into
facebook:main from
AKnassa:rocky/issue-5991-neutral-figtree

Conversation

@AKnassa

@AKnassa AKnassa commented Sep 5, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

Fixes #5991

What this does

Makes the Neutral theme honest about its font. The docs said "system fonts", but the theme actually asks for Figtree, a webfont the app has to load itself. Anyone who followed the docs got a silent fallback with no clue why.

Why

A missing webfont looks like an integration failure. Per #5047 and #5048 ("enable rather than deter"), the fix keeps Figtree and documents it instead of stripping the theme back to system fonts. Direction matches @Kyujenius's analysis on the issue.

What changed

  • Neutral README now says "Figtree typography" and gains a Fonts section with the copy-paste Google Fonts snippet, same shape as Stone's.
  • The section also says skipping the webfont is a supported choice, so offline or no-third-party-request apps know the fallback is intentional, not broken.
  • The astryx docs theme table row for Neutral now names Figtree too.
  • A new test derives the declared webfonts from the built theme tokens and fails if the README ever stops naming or loading them.
  • Patch release note for @astryxdesign/theme-neutral.

How to check

Read packages/themes/neutral/README.md, Fonts section, or run astryx docs theme and find the Neutral row.

The edge-case test round has landed: the guards now cover the theme's full font surface and the CLI docs row, each proven by mutation testing.

Kyujenius reacted with laugh emoji
The README and the CLI theme docs described Neutral as a system-font
theme while neutralTheme declares Figtree for body and heading. Figtree
is not bundled or loaded, so a clean consumer app silently falls back
to system fonts and the missing webfont reads as an integration
failure.
Describe Neutral as Figtree typography in both places, add the
Stone-style Fonts section with the Google Fonts snippet to the README,
and guard README/theme drift with a colocated test that derives the
declared webfonts from the resolved --font-family-* tokens.
Fixes facebook#5991 
Some apps picked Neutral precisely because nothing external loads
(offline apps, no-third-party-request policies). Frame skipping the
webfont as a supported choice rather than a failure state, so the new
Fonts section keeps that audience.
Part of facebook#5991 

vercel Bot commented Sep 5, 2026
edited
Loading

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Sep 5, 2026 9:53pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 5, 2026
@github-actions github-actions Bot added community Authored by a community contributor (not on the eng/design team) needs:code-review High-risk change (new package/component/API) — needs human code review before merge needs:design-review Affects visuals — Design should review labels Sep 5, 2026
Widen the README guard to the theme's whole font surface: every
--font-family-* token by prefix plus component-level fontFamily
overrides, with var() aliases (nested included) stripped before
parsing. Tie the loading-recipe assertion to each declared webfont
(family= URL token or @font-face) instead of a blanket regex the
mutation run proved vacuous. Add a CLI-side guard pinning the
astryx docs theme Neutral row via collectUnloadedFonts, so the
system-fonts claim cannot return on the surface the README test
cannot see.
All three guards are mutation-proven: URL font swap, undocumented
webfont injection, and doc-row revert each fail exactly the
intended assertion.
Part of facebook#5991 

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

PR Analysis Report

Preview availability: Storybook and Sandbox were not published for this CI run.

No new or modified components detected.

Bundle Size Summary

No component packages changed.

Accessibility Audit

Status: No accessibility violations detected.

Visual Regression

2 of 348 shot(s) changed. View the report

A repository maintainer can accept these exact frames: /accept-visual 33994177354/1 <why every changed frame is correct>

A change here is a question, not a failure: check whether the after is the
picture you intended. If it is, say so in the PR — the release gate's baseline
is updated deliberately, and this check never rewrites it.

component story theme mode pixels
ComplexSelector Fruit ripeness selector neutral light 3,993
ComplexSelector Fruit ripeness selector neutral dark 3,844
ComplexSelector — Fruit ripeness selector — neutral light
BeforeAfterDiff
Before visual regression frame After visual regression frame Pixel difference frame
ComplexSelector — Fruit ripeness selector — neutral dark
BeforeAfterDiff
Before visual regression frame After visual regression frame Pixel difference frame

Generated by PR Enrichment workflow | View full report

AKnassa marked this pull request as ready for review September 6, 2026 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cvkxx cvkxx Awaiting requested review from cvkxx
@ernestt ernestt Awaiting requested review from ernestt
@kentonquatman kentonquatman Awaiting requested review from kentonquatman
@rubyycheung rubyycheung Awaiting requested review from rubyycheung
@cixzhang cixzhang Awaiting requested review from cixzhang cixzhang is a code owner
@imdreamrunner imdreamrunner Awaiting requested review from imdreamrunner imdreamrunner is a code owner
@josephfarina josephfarina Awaiting requested review from josephfarina josephfarina is a code owner

Assignees

No one assigned

Labels

CLA Signed This label is managed by the Meta Open Source bot. community Authored by a community contributor (not on the eng/design team) needs:code-review High-risk change (new package/component/API) — needs human code review before merge needs:design-review Affects visuals — Design should review

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[Bug] Neutral theme is described as system-font based but declares unloaded Figtree

1 participant

AltStyle によって変換されたページ (->オリジナル) /