Repository navigation
feat: www & docs fonts - #47441
feat: www & docs fonts#47441
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
6 Skipped Deployments
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughReplaces inline font-face usage and hardcoded font references in ChangesLocal Font Migration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 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 |
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 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 103-106: The subtitle rendering in the `GuidesMdxTemplate`
component wraps `ReactMarkdown` inside a paragraph, which can create invalid
nested paragraph markup; update the `meta?.subtitle` block to use a neutral
container instead of `<p>`, and keep the existing spacing/text styles on that
container while ensuring any rendered markdown paragraph has its margin reset.
In `@apps/docs/features/ui/guide/GuideHeader.tsx`:
- Around line 20-22: The outer paragraph wrapping `ReactMarkdown` in
`GuideHeader` can cause invalid nested paragraphs because `ReactMarkdown` may
render its own `<p>` for `meta.subtitle`. Replace that wrapper with a neutral
container element and keep the existing styling/classes on the new container so
the subtitle layout remains unchanged.
In `@apps/www/pages/_app.tsx`:
- Around line 105-129: Move the font variable classes out of the inner wrapper
in the app component so portaled UI inherits them correctly. Update the pages
router root document in _document.tsx to apply manrope.variable, inter.variable,
and sourceCodePro.variable at the document level, and remove that className from
the top-level wrapper in _app.tsx. Keep the existing providers and page
rendering flow unchanged while relocating the font-token scope.
In `@apps/www/styles/globals.css`:
- Around line 172-174: The `html` global style change is removing the
`custom-font` alias before all consumers are migrated. Update the remaining
hardcoded `custom-font` usage in `ticket.tsx` to the new font tokens, or keep
the alias in `globals.css` until every caller is switched over. Use the `html`
rule in `globals.css` and the `font-family` stack in `ticket.tsx` as the places
to verify the migration is complete.
🪄 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: fc1aac77-34b2-4a6f-9a74-4cc5b3ddcbf5
⛔ Files ignored due to path filters (10)
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!**/*.woff2apps/www/fonts/inter/InterVariable-Italic.woff2is excluded by!**/*.woff2apps/www/fonts/inter/InterVariable.woff2is excluded by!**/*.woff2apps/www/fonts/manrope/Manrope-VariableFont_wght.ttfis excluded by!**/*.ttfapps/www/fonts/source-code-pro/SourceCodePro-Variable-Italic.woff2is excluded by!**/*.woff2apps/www/fonts/source-code-pro/SourceCodePro-Variable.woff2is excluded by!**/*.woff2
📒 Files selected for processing (14)
apps/docs/app/layout.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.cssapps/www/app/layout.tsxapps/www/components/Hero/Hero.tsxapps/www/fonts/index.tsapps/www/fonts/stripe-fonts.tsapps/www/lib/fonts.tsapps/www/pages/_app.tsxapps/www/styles/globals.cssapps/www/styles/realtime.module.css
| {meta?.subtitle && ( | ||
| <h2 className="mt-3 text-xl text-foreground-light"> | ||
| <p className="mt-3 text-xl text-foreground-light"> | ||
| <ReactMarkdown>{meta.subtitle}</ReactMarkdown> | ||
| </h2> | ||
| </p> |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Map the target file and inspect the changed area with line numbers.
git ls-files apps/docs/features/docs/GuidesMdx.template.tsx
wc -l apps/docs/features/docs/GuidesMdx.template.tsx
sed -n '85,125p' apps/docs/features/docs/GuidesMdx.template.tsx
# Find how ReactMarkdown is used elsewhere in the repo.
rg -n "ReactMarkdown" apps/docs -S
# Inspect package version if available in lockfile/package manifests.
rg -n '"react-markdown"|react-markdown' package.json **/package.json pnpm-lock.yaml yarn.lock package-lock.json -SRepository: supabase/supabase
Length of output: 5905
Avoid wrapping ReactMarkdown in a <p> here. ReactMarkdown renders its own paragraph for normal subtitle text, so this becomes invalid nested markup and can break the intended styling. Use a neutral container like <div className="mt-3 text-xl text-foreground-light [&>p]:m-0"> instead.
🤖 Prompt for 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.
In `@apps/docs/features/docs/GuidesMdx.template.tsx` around lines 103 - 106, The
subtitle rendering in the `GuidesMdxTemplate` component wraps `ReactMarkdown`
inside a paragraph, which can create invalid nested paragraph markup; update the
`meta?.subtitle` block to use a neutral container instead of `<p>`, and keep the
existing spacing/text styles on that container while ensuring any rendered
markdown paragraph has its margin reset.
| <div className={`${manrope.variable} ${inter.variable} ${sourceCodePro.variable}`}> | ||
| <AuthProvider> | ||
| {/* [TODO] I think we need to deconflict with the providers in layout.tsx? */} | ||
| <FeatureFlagProvider API_URL={API_URL} enabled={{ cc: true, ph: false }}> | ||
| <DevToolbarProvider apiUrl={API_URL}> | ||
| <ThemeProvider forcedTheme={forceDarkMode ? 'dark' : undefined}> | ||
| <TooltipProvider delayDuration={0}> | ||
| <CommandProvider app="www" onTelemetry={onTelemetry}> | ||
| <Toaster /> | ||
| <Component {...pageProps} /> | ||
| <WwwCommandMenu /> | ||
| <PageTelemetry | ||
| API_URL={API_URL} | ||
| hasAcceptedConsent={hasAcceptedConsent} | ||
| enabled={IS_PLATFORM} | ||
| /> | ||
| <DevToolbar /> | ||
| </CommandProvider> | ||
| </TooltipProvider> | ||
| </ThemeProvider> | ||
| </DevToolbarProvider> | ||
| </FeatureFlagProvider> | ||
| </AuthProvider> | ||
| <TelemetryTagManager /> | ||
| </div> |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
echo "Where the font variable classes are applied:"
rg -n "manrope\\.variable|inter\\.variable|sourceCodePro\\.variable" apps/www
echo
echo "Does the pages router have a custom document where these can be moved to <Html>/<body>?"
fd -i "_document.*" apps/www
echo
echo "Likely portal-backed UI under apps/www/packages:"
rg -n "SonnerToaster|createPortal|DialogPortal|Portal|CommandMenu" apps/www packagesRepository: supabase/supabase
Length of output: 50373
Move the font variables to the pages-router document root.
Keeping ${manrope.variable} ${inter.variable} ${sourceCodePro.variable} on the inner wrapper leaves portaled UI outside the font-token scope. Apply them in apps/www/pages/_document.tsx instead of apps/www/pages/_app.tsx.
🤖 Prompt for 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.
In `@apps/www/pages/_app.tsx` around lines 105 - 129, Move the font variable
classes out of the inner wrapper in the app component so portaled UI inherits
them correctly. Update the pages router root document in _document.tsx to apply
manrope.variable, inter.variable, and sourceCodePro.variable at the document
level, and remove that className from the top-level wrapper in _app.tsx. Keep
the existing providers and page rendering flow unchanged while relocating the
font-token scope.
| html { | ||
| scroll-behavior: smooth !important; | ||
| font-weight: 450; |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Don't remove custom-font until the remaining callers are migrated.
apps/www/pages/launch-week/ticket.tsx:24 still hardcodes custom-font in its font-family stack. After deleting the global @font-face, that page silently falls back to the next font instead of the intended face. Update that consumer to the new tokens, or keep the alias until the migration is complete.
🤖 Prompt for 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.
In `@apps/www/styles/globals.css` around lines 172 - 174, The `html` global style
change is removing the `custom-font` alias before all consumers are migrated.
Update the remaining hardcoded `custom-font` usage in `ticket.tsx` to the new
font tokens, or keep the alias in `globals.css` until every caller is switched
over. Use the `html` rule in `globals.css` and the `font-family` stack in
`ticket.tsx` as the places to verify the migration is complete.
Fix docs subheading by removing the h2 html tag and adjusting styling. Likely a result of a merge conflict resolution between #47441 and #47288 ## What is the current behavior? <img width="1168" height="641" alt="Screenshot 2026-07-09 at 10 19 00" src="https://github.com/user-attachments/assets/c23b2e88-650c-4835-ae10-5a13c7b2e180" /> ## What is the new behavior? <img width="1167" height="605" alt="Screenshot 2026-07-09 at 10 32 56" src="https://github.com/user-attachments/assets/852f208c-2b22-4bf6-ad8c-edcf5bee5991" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** * Refined how guide subtitles are displayed for a cleaner, more consistent layout. * Adjusted subtitle spacing and presentation while keeping subtitle content rendering with formatted text support intact. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit