Skip to content

fix: atoms fonts for non next apps#22886

Merged
supalarry merged 3 commits intomainfrom
fix-atoms-fonts
Aug 4, 2025
Merged

fix: atoms fonts for non next apps#22886
supalarry merged 3 commits intomainfrom
fix-atoms-fonts

Conversation

@supalarry
Copy link
Contributor

User reported following error

ERROR in ./node_modules/@calcom/atoms/globals.min.css (./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[2]!./node_modules/source-map-loader/dist/cjs.js!./node_modules/@calcom/atoms/globals.min.css) 5:36-108
Module not found: Error: Can't resolve '/_next/static/media/55c55f0601d81cf3-s.woff2' in '/Users/x/ms-booking/client/node_modules/@calcom/atoms'

and they use platform atoms in vue app. However, as you see in PR we changed globals css file to not have "_next" import path to files auto-generated after building next app but include fonts directly in the bundle.

@supalarry supalarry requested a review from a team August 4, 2025 13:42
@supalarry supalarry requested a review from a team as a code owner August 4, 2025 13:42
@graphite-app graphite-app bot requested a review from a team August 4, 2025 13:42
@keithwillcode keithwillcode added core area: core, team members only platform Anything related to our platform plan labels Aug 4, 2025
@dosubot dosubot bot added the 🐛 bug Something isn't working label Aug 4, 2025
@graphite-app
Copy link

graphite-app bot commented Aug 4, 2025

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (08/04/25)

1 reviewer was added to this PR based on Keith Williams's automation.

"Add ready-for-e2e label" took an action on this PR • (08/04/25)

1 label was added to this PR based on Keith Williams's automation.

@supalarry supalarry enabled auto-merge (squash) August 4, 2025 13:49
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 4, 2025

Walkthrough

This change updates the @calcom/atoms package to bundle font files for improved compatibility with non-Next.js applications. The CSS file globals.css is modified to reference font files using relative paths (./fonts/) instead of absolute Next.js-specific paths. The package.json is updated to include the fonts directory in the published package. Additionally, a new changeset file is added to document this minor version update and describe the change. No code logic or exported API signatures are altered.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~6 minutes

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f8d9860 and bed1eae.

📒 Files selected for processing (1)
  • packages/platform/atoms/package.json (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/platform/atoms/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Install dependencies / Yarn install & cache
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-atoms-fonts

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@vercel
Copy link

vercel bot commented Aug 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Aug 4, 2025 2:03pm
cal-eu ⬜️ Ignored (Inspect) Aug 4, 2025 2:03pm

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
packages/platform/atoms/globals.css (1)

97-98: __calFont_a90182 block updated, but font-display differs

While all other faces use font-display: swap, this one keeps block. Consider switching to swap for CLS friendliness unless the block behaviour is deliberate.

-  font-display: block;
+  font-display: swap;
.changeset/tough-mugs-design.md (1)

5-5: Capitalize the summary sentence for consistency

Changeset summaries conventionally start with a capital letter. Consider updating to:

-bundle fonts to fix atoms in non-next apps
+Bundle fonts to fix atoms in non-Next apps
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cf4e7a5 and f8d9860.

⛔ Files ignored due to path filters (8)
  • packages/platform/atoms/fonts/26a46d62cd723877-s.woff2 is excluded by !**/*.woff2
  • packages/platform/atoms/fonts/55c55f0601d81cf3-s.woff2 is excluded by !**/*.woff2
  • packages/platform/atoms/fonts/581909926a08bbc8-s.woff2 is excluded by !**/*.woff2
  • packages/platform/atoms/fonts/6d93bde91c0c2823-s.woff2 is excluded by !**/*.woff2
  • packages/platform/atoms/fonts/90475aac776488b6-s.p.woff2 is excluded by !**/*.woff2
  • packages/platform/atoms/fonts/97e0cb1ae144a2a9-s.woff2 is excluded by !**/*.woff2
  • packages/platform/atoms/fonts/a34f9d1faa5f3315-s.p.woff2 is excluded by !**/*.woff2
  • packages/platform/atoms/fonts/df0a9ae256c0569c-s.woff2 is excluded by !**/*.woff2
📒 Files selected for processing (3)
  • .changeset/tough-mugs-design.md (1 hunks)
  • packages/platform/atoms/globals.css (8 hunks)
  • packages/platform/atoms/package.json (1 hunks)
🔇 Additional comments (8)
packages/platform/atoms/package.json (1)

38-42: Fonts Directory and CSS Paths Verified

All .woff2 assets are present in packages/platform/atoms/fonts and every @font-face in packages/platform/atoms/globals.css correctly uses src: url(./fonts/<filename>.woff2). No further action required.

packages/platform/atoms/globals.css (7)

20-21: Consistent change across weights – good follow-through

The same relative-path update is applied consistently for the second unicode-range block, ensuring no glyph subset is left pointing at the old location.


30-31: 👍 Third subset updated correctly

No further remarks; change is clear and correct.


40-41: Fourth subset updated – OK

Uniform treatment keeps the font-loading logic coherent.


50-51: Vietnamese subset path fixed – OK

Nothing else to flag here.


60-61: Extended Latin subset updated – OK


70-71: Asset filename exists – no changes needed

  • Confirmed that packages/platform/atoms/fonts/a34f9d1faa5f3315-s.p.woff2 matches the src: url(./fonts/a34f9d1faa5f3315-s.p.woff2) reference in packages/platform/atoms/globals.css.

10-11: All local font references validated

I’ve filtered out inline data: URIs and confirmed that every ./fonts/*.woff2 referenced in packages/platform/atoms/globals.css exists on disk. No missing files remain, so the relative‐path change is safe to approve.

Copy link
Contributor

@emrysal emrysal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woops! 😅

@supalarry supalarry merged commit fb36497 into main Aug 4, 2025
61 of 62 checks passed
@supalarry supalarry deleted the fix-atoms-fonts branch August 4, 2025 16:51
@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2025

E2E results are ready!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working core area: core, team members only platform Anything related to our platform plan ready-for-e2e

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants