Skip to content

frontend(fix): restore site typefaces and brand OG cards on docs routes - #575

Merged
Ducksss merged 1 commit into
mainfrom
claude/brave-davinci-59380a
Sep 30, 2026
Merged

Ducksss merged 1 commit into
mainfrom
claude/brave-davinci-59380a

Conversation

@Ducksss

@Ducksss Ducksss commented Sep 30, 2026

Copy link
Copy Markdown
Owner

Summary

Two docs-route brand gaps, both fixed in the docs route itself:

  • Docs pages rendered in system fonts. src/app/[locale]/docs/docs.css imports Tailwind a second time for the Fumadocs preset. That build re-emits the stock theme into the same theme cascade layer globals.css uses and loads after it, so any token globals.css customises is overwritten on /docs/*. The compiled docs chunk shadowed five: --font-sans / --font-mono / --font-serif (Geist Sans, Geist Mono, Instrument Serif → the system stacks) and --color-fd-success / --color-fd-error (--brand / --destructive → Fumadocs' #00c758 / #fb2c36, so success callouts on installation, architecture and contributing drew a second, brighter green). docs.css now re-declares all five beside the existing --breakpoint-2xl.
  • Docs OG cards were the stock fumadocs-ui/og template (dark #0c0c0c, pink accent). /og/docs/**/image.png is now drawn like the site's own cards.

Re-declaring on :root is enough here: the tokens land in the same :root, :host rule that declares --default-font-family: var(--font-sans) and --default-mono-font-family: var(--font-mono), so preflight's html font follows without copying the --default-* pair. The scoped [data-editorial] block on claude/design-philosophy-docs needed that pair only because it re-declares the fonts on a subtree. Once this lands, its font lines are redundant.

Docs OG card

  • White card with the hero's dot grid, masked to the right, under the root card's faint emerald wash. The backdrop is one SVG because Satori's CSS gradients would not tile the dots or feather the mask.
  • Wordmark: the mark is read from public/favicon.svg (as the blog card does) instead of adding another inline copy of the geometry Logomark.tsx asks to keep in sync. It is followed by docs in Instrument Serif italic, the card's one serif accent.
  • Eyebrow (Geist Mono, emerald): the page's sidebar section (Get Started, Reference, Contributing), or on component pages the same facts as the header chips (Page block · Hero family).
  • Title in Geist Bold, balanced, stepped 80/68/60/52px by length, and description in Geist with a 3-line clamp. The title has no clamp because Satori ellipsizes a balanced title at the wrong width.
  • Footer: component pages end on their exact npx payload-components add <slug> command; every other page ends on its URL.
  • Emerald is #059669, which the root, template and blog cards and the favicon all use, rather than --brand's sRGB #007a55. That keeps the card to one green.

Visual baselines

None of the committed baselines load the docs CSS chunk, so none move and nothing needs minting. Stylesheets loaded per route on a production build:

Suite Routes CSS
frontend (landing) / globals
components-visual /components/preview/<slug> globals
templates-visual /templates/… globals + template theme
blog-visual /blog, /blog/<slug> globals + the blog chunk, untouched

Tests

  • tests/int/fumadocs-site.int.spec.ts: any theme variable globals.css emits that the docs entry's stock sheets (Tailwind's index.css, Fumadocs default-colors.css / base.css) redefine with a different value must be re-declared identically in docs.css. Against main's docs.css it fails and names exactly the five tokens above.
  • tests/e2e/frontend.e2e.spec.ts: /docs/installation must resolve the same --font-*, body font and --color-fd-success / --color-fd-error as the landing, which loads globals.css alone.

Verification

  • pnpm lint, pnpm exec tsc --noEmit, pnpm format:check: pass.
  • pnpm run test:int: 793 passed, 1 skipped.
  • Production e2e (pnpm build:e2e, then PLAYWRIGHT_SERVER_MODE=production pnpm run test:e2e): exit 0 across all five batches. frontend had 151 passed and 1 skipped; templates-a11y had 63 passed; the remaining specs had 191 passed and 5 skipped, including both geo OG tests and axe on /docs, /docs/architecture and a component page. The visual batches skip their comparisons on macOS by design because the baselines are Linux-only, so this PR's Linux gate is the pixel check.
  • Paint-level check on the production build (Chromium CSS.getPlatformFontsForNode): docs H1s, body, sidebar and header paint Geist; code blocks and inline code paint Geist Mono. On main they paint .SF NS and Menlo. Success-callout rules and icons resolve to --brand.
  • All 103 docs pages captured before and after at 1440×900 and 390×844. All return 200, none overflow horizontally before or after, and page heights move by at most 1.1%. Two mobile H1s wrap one more line because Geist Bold is wider than SF: ai-discovery (1→2) and payload-generate-importmap (3→4).
  • All 103 docs OG images rendered and reviewed. The build log shows no dynamic font fetches; docs frontmatter uses only ASCII and —, both in the vendored fonts, and src/app/_fonts/README.md now records that rule for docs frontmatter.

Not in this PR

  • src/app/[locale]/blog/blog.css is identical to the old docs.css, so /blog still paints system fonts. Fixing it moves the four blog-visual baselines, so it needs its own change and a mint.
  • The second build also compiles rounded-sm / md / lg / xl against Tailwind's stock radius scale (var(--radius-lg) = 0.5rem), where globals.css maps them to --radius (0.625rem). Shared chrome on docs and blog is therefore about 2px squarer. That is a utility collision, not variable shadowing, and fixing it changes every Fumadocs corner, so it is left for a deliberate decision.

No issues closed this cycle.

🤖 Generated with Claude Code

docs.css imports Tailwind a second time for the Fumadocs preset, and that
build re-emits the stock theme into the same theme layer as globals.css,
after it. On every docs page that replaced Geist Sans, Geist Mono and
Instrument Serif with the system stacks, and --color-fd-success/error with
Fumadocs' own green and red. docs.css now re-declares the five tokens, and
an int test fails whenever a token globals.css emits would be shadowed on
the docs route without a matching re-declaration.

The docs OG route drew the stock fumadocs-ui/og card (dark, pink accent). It
now renders the site's light card: the favicon mark with a serif "docs"
lockup, the hero dot grid under the emerald wash, the sidebar section or
component family as an eyebrow, and the install command on component pages.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings September 30, 2026 09:20
@vercel

vercel Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
payload-components Ready Ready Preview Sep 30, 2026 9:24am UTC
payload-components-97bf Ready Ready Preview Sep 30, 2026 9:24am UTC

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Sep 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 20 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: Ducksss/payload-components/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 3742060c-88a4-428b-bca6-c468f800855f

📥 Commits

Reviewing files that changed from the base of the PR and between c8ee9fd and 44340b5.

📒 Files selected for processing (5)
  • src/app/[locale]/docs/docs.css
  • src/app/[locale]/og/docs/[...slug]/route.tsx
  • src/app/_fonts/README.md
  • tests/e2e/frontend.e2e.spec.ts
  • tests/int/fumadocs-site.int.spec.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Ducksss
Ducksss merged commit 73b5ec3 into main Sep 30, 2026
18 checks passed
@Ducksss
Ducksss deleted the claude/brave-davinci-59380a branch September 30, 2026 14:04
Ducksss added a commit that referenced this pull request Sep 30, 2026
Ducksss added a commit that referenced this pull request Sep 30, 2026
Brings in #574 (retire dev, point everything at main), #575 (restore
site typefaces and brand OG cards on docs routes), and #576 (share one
Tailwind entry for docs and blog).

Resolves the docs.css conflict by keeping main's one-line import of
src/app/fumadocs.css and appending the editorial rules after it. The
editorial scope no longer re-declares --font-sans/mono/serif or the
--default-* pair: fumadocs.css now restores Geist and Instrument Serif
on every docs route, so that block was redundant. [data-editorial] keeps
only its section counter. Also drops the stale "restores the faces" line
from AGENTS.md and the DesignEditorial header comment.

Verified after the merge: painted fonts on /docs/design are Geist,
Instrument Serif for the accents, and Geist Mono for code and receipts.
source:build, tsc, lint, format:check, and test:int (794 passed) are
green, and the a11y and overflow e2e checks for /docs/design and
/about/case-study pass.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

This branch was successfully deployed

2 active deployments
Preview – payload-components — 44340b5f Deployed Sep 30, 2026 by vercel[bot]
Preview – payload-components-97bf — 44340b5f Deployed Sep 30, 2026 by vercel[bot]
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.

2 participants