Repository navigation
frontend(fix): restore site typefaces and brand OG cards on docs routes - #575
Merged
Merged
Conversation
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]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedNext included review available in 20 minutes. View limit detailsLimit 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. Review configuration: ⚙️ Run configurationConfiguration used: Repository: Ducksss/payload-components/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
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. Comment |
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]>
3 of 4 tasks
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two docs-route brand gaps, both fixed in the docs route itself:
src/app/[locale]/docs/docs.cssimports Tailwind a second time for the Fumadocs preset. That build re-emits the stock theme into the samethemecascade layerglobals.cssuses and loads after it, so any tokenglobals.csscustomises 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.cssnow re-declares all five beside the existing--breakpoint-2xl.fumadocs-ui/ogtemplate (dark#0c0c0c, pink accent)./og/docs/**/image.pngis now drawn like the site's own cards.Re-declaring on
:rootis enough here: the tokens land in the same:root, :hostrule that declares--default-font-family: var(--font-sans)and--default-mono-font-family: var(--font-mono), so preflight'shtmlfont follows without copying the--default-*pair. The scoped[data-editorial]block onclaude/design-philosophy-docsneeded that pair only because it re-declares the fonts on a subtree. Once this lands, its font lines are redundant.Docs OG card
public/favicon.svg(as the blog card does) instead of adding another inline copy of the geometryLogomark.tsxasks to keep in sync. It is followed by docs in Instrument Serif italic, the card's one serif accent.Get Started,Reference,Contributing), or on component pages the same facts as the header chips (Page block · Hero family).npx payload-components add <slug>command; every other page ends on its URL.#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:
frontend(landing)/components-visual/components/preview/<slug>templates-visual/templates/…blog-visual/blog,/blog/<slug>Tests
tests/int/fumadocs-site.int.spec.ts: any theme variableglobals.cssemits that the docs entry's stock sheets (Tailwind'sindex.css, Fumadocsdefault-colors.css/base.css) redefine with a different value must be re-declared identically indocs.css. Againstmain'sdocs.cssit fails and names exactly the five tokens above.tests/e2e/frontend.e2e.spec.ts:/docs/installationmust resolve the same--font-*, body font and--color-fd-success/--color-fd-erroras the landing, which loadsglobals.cssalone.Verification
pnpm lint,pnpm exec tsc --noEmit,pnpm format:check: pass.pnpm run test:int: 793 passed, 1 skipped.pnpm build:e2e, thenPLAYWRIGHT_SERVER_MODE=production pnpm run test:e2e): exit 0 across all five batches.frontendhad 151 passed and 1 skipped;templates-a11yhad 63 passed; the remaining specs had 191 passed and 5 skipped, including both geo OG tests and axe on/docs,/docs/architectureand 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.CSS.getPlatformFontsForNode): docs H1s, body, sidebar and header paintGeist; code blocks and inline code paintGeist Mono. Onmainthey paint.SF NSandMenlo. Success-callout rules and icons resolve to--brand.ai-discovery(1→2) andpayload-generate-importmap(3→4).—, both in the vendored fonts, andsrc/app/_fonts/README.mdnow records that rule for docs frontmatter.Not in this PR
src/app/[locale]/blog/blog.cssis identical to the olddocs.css, so/blogstill paints system fonts. Fixing it moves the fourblog-visualbaselines, so it needs its own change and a mint.rounded-sm/md/lg/xlagainst Tailwind's stock radius scale (var(--radius-lg)= 0.5rem), whereglobals.cssmaps 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