Skip to content

Conversation

@google-labs-jules
Copy link
Contributor

πŸ’‘ What:

  • Changed font-display: fallback to font-display: swap for the 'Cormorant Garamond' font in src/style.css.
  • Added a new regression test tests/font-performance.spec.ts to ensure this setting is maintained.

🎯 Why:

  • font-display: fallback hides text for up to 100ms if the font is not ready (FOIT - Flash of Invisible Text).
  • font-display: swap shows the fallback font immediately and swaps in the custom font once loaded (FOUT - Flash of Unstyled Text). This improves perceived performance and First Contentful Paint (FCP), ensuring the user can read the content immediately even on slower connections.

πŸ“Š Measured Improvement:

  • Baseline: font-display was confirmed to be fallback via Playwright verification.
  • Improvement: font-display is now verified to be swap via Playwright test.
  • While exact timing metrics (FCP delta) are difficult to simulate reliably in this environment without network throttling tools, the property change directly maps to the browser behavior described above. The added test confirms the property is correctly applied.

PR created automatically by Jules for task 7939261234456912839 started by @xRahul

- Change `font-display` from `fallback` to `swap` in `src/style.css` to reduce FOIT.
- Add regression test `tests/font-performance.spec.ts` to verify font-display property.
@google-labs-jules
Copy link
Contributor Author

πŸ‘‹ Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a πŸ‘€ emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@xRahul xRahul marked this pull request as ready for review January 26, 2026 05:16
@xRahul xRahul merged commit f499f83 into master Jan 26, 2026
1 check passed
@xRahul xRahul deleted the font-display-optimization-7939261234456912839 branch January 26, 2026 05:16
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.

1 participant