Repository navigation
feat: www & docs fonts - #47227
feat: www & docs fonts#47227
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
6 Skipped Deployments
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughUpdates the www and docs shells to load shared font variables, replaces bundled custom font styling with configured local/google font sources, and revises heading, prose, and markdown subtitle styling to use the new typography system. ChangesFont and typography migration
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/docs/features/docs/GuidesMdx.template.tsx`:
- Around line 104-106: The subtitle wrapper in GuidesMdx.template.tsx should
remain a semantic heading instead of being changed to a div, so it stays in the
heading hierarchy and keeps the h2 typography styles. Update the wrapper around
ReactMarkdown in the relevant subtitle block back to an h2 and preserve the
paragraph margin reset with the existing [&>p]:m-0 utility. Use the surrounding
subtitle markup in GuidesMdx.template.tsx to locate the change.
In `@apps/docs/features/ui/guide/GuideHeader.tsx`:
- Around line 20-22: The JSX in GuideHeader is unbalanced because the subtitle
wrapper opened around ReactMarkdown is not closed correctly. Update the closing
tag for the wrapper in GuideHeader so the element around meta.subtitle is
properly terminated with </div>, keeping the surrounding JSX structure intact
and parseable.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 76a9991d-8f4c-4f93-9c09-796ef0b02353
⛔ Files ignored due to path filters (5)
apps/docs/fonts/inter/InterVariable-Italic.woff2is excluded by!**/*.woff2apps/docs/fonts/inter/InterVariable.woff2is excluded by!**/*.woff2apps/docs/fonts/manrope/Manrope-VariableFont_wght.ttfis excluded by!**/*.ttfapps/docs/fonts/source-code-pro/SourceCodePro-Variable-Italic.woff2is excluded by!**/*.woff2apps/docs/fonts/source-code-pro/SourceCodePro-Variable.woff2is excluded by!**/*.woff2
📒 Files selected for processing (7)
apps/docs/app/layout.tsxapps/docs/components/StepHikeCompact/index.tsxapps/docs/features/docs/GuidesMdx.template.tsxapps/docs/features/ui/guide/GuideHeader.tsxapps/docs/fonts/index.tsapps/docs/fonts/stripe-fonts.tsapps/docs/styles/globals.css
✅ Files skipped from review due to trivial changes (1)
- apps/docs/components/StepHikeCompact/index.tsx
czenko
left a comment
There was a problem hiding this comment.
The title of this PR suggests a change to the Docs site to review, but the Docs site was skipped in its preview deployment.
There was a problem hiding this comment.
Contrast is reduced
We already have bad color contrast -- like, really bad.
But this change introduces even more color contrast issues.
Local on the left and live on the right. Running through this multiple times looked variable, so I'm not sure if all is captured here.
This is run with Axe Devtools, which is a free plugin.
The gray fonts, which were already hard to see, appear even smaller, which reduces contrast more.
They are additionally thinner. I urge bumping the gray any amount to offset the thinner appearance of the font and to bump the size of the subhead.
Fonts are harder to see:
The jump in network size is significant
See below for a Network snapshot of the difference in size between before and after. There is some variability since the left is in dev.
Going from 1 request at 25.3 kB to 5 requests at ~215 kB is roughly an 8x increase in font payload for the docs page.
I ran into this issue at a previous company when introducing variable fonts. A solution to reduce size is to subset. (I just saw @dnywh mention this. 😁 )
|
Oh this is a variable font? Yeah, good shout on subsetting. From my own site's notes if helpful:
|
|
oook @czenko not all 100% fixed but mostly resolved in the context of this PR. Contrast
But yea contrast and a11y is probably a topic for its own separate PR that requires some playing around with brand colors, especially on light mode. Ok if we handle all that separately? FontsI update the import logic to follow what NextJS recommends, so using variable fonts imported from next/google/fonts. Nextjs caches and serves them statically + defining the latin subset directly in the import. We now have two sans-serif google fonts: Inter (sans-serif), Manrope (sans-serif on headings). cc @dnywh
SourceCodePro (font-mono), somehow loads without needing to import it, not sure how... already before my pr though. |
Just unblocking the PR as the requested changes are non-blocking.
Braintrust eval report
|
|
Looks like this is already merged.
Yes, I don't expect all color contrast to be handled in this PR so long as the contrast isn't getting worse. 😁 |
## What kind of change does this PR introduce? Chore ## What is the current behavior? Design system still uses the old CustomFont family, so documented components no longer match Studio, www, and docs after the Inter / Manrope rollout. ## What is the new behavior? Design system uses the same font stack as the other apps: - Inter for body (`--font-sans`) - Manrope for headings (`--font-heading`) - Source Code Pro for mono Also adopts the Inter-optimised type scale and base weight (`450`) used in Studio. ## Additional context Based on Francesco's unshipped `chore/update-fonts` draft (design-system slice only). Related shipped work: #47306, #47227. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** * Updated the design system with refreshed typography using Inter and Manrope, with Source Code Pro for code. * Refined theme typography and spacing tokens, including a more complete text scale, updated font weights, and container sizing. * Improved heading styling and ensured `code`/`pre`/`kbd`/`samp` use consistent monospace treatment. * Adjusted default border styling and improved font loading/fallback behavior for more consistent rendering. <!-- end of auto-generated comment: release notes by coderabbit.ai -->

Update marketing website and docs with new sans-serif fonts:
Inter- sans-serif for all body textManrope- sans-serif for headingsPR breakdown of #43455
Related: #47226 #47228 #47236
Summary by CodeRabbit
Style
Chores