Preload only Inter latin; drop Lora and cyrillic font preloads - #1661
Conversation
|
ⓘ Your Qodo trial ends soon. Ask your workspace admin to set up billing to keep reviews running after the trial. Manage billing |
PR Summary by QodoReduce Next.js font preloads to Inter latin; disable Lora + cyrillic preloads
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1. Cyrillic font faces removed
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe root layout restricts Inter and Lora to Latin font subsets. Lora no longer preloads. Both fonts retain ChangesFont loading
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This localized change reduces font preloads while preserving Cyrillic webfont support and fallback metrics; no actionable merge-blocking risk remains after normal checks and review. Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Code Review by Qodo
1.
|
Closes #1600
Every page preloaded four woff2 files (~126 KB, priority High): Inter latin + cyrillic and Lora latin + cyrillic. WebPageTest traces on the entry route show six of the seven render-blocking stylesheets finishing by ~380 ms while the last one contends with the font preloads on the same connection until ~650 ms, and the parser resumes only then.
Changes in
apps/web/src/app/layout.tsx:subsets: ["latin"], so only the latin file is preloaded. The generated@font-facerules keep every subset throughunicode-range, so cyrillic text still upgrades to the webfont once it loads.preload: falseand latin subset. Lora only styles entry/publish serif text; painting it with the metric-adjusted fallback first is acceptable.Verified on a production build:
@font-faceblocks (unicode-rangeU+0400..) for both familiesLab A/B against the deployed build follows after merge.
Summary by CodeRabbit