Skip to content

debug(workspace): unocss fonts split shared testing#282

Merged
nekomeowww merged 1 commit intomainfrom
dev/unocss-fonts-testing
Jul 21, 2025
Merged

debug(workspace): unocss fonts split shared testing#282
nekomeowww merged 1 commit intomainfrom
dev/unocss-fonts-testing

Conversation

@nekomeowww
Copy link
Member

Description

Linked Issues

Additional context

@netlify
Copy link

netlify bot commented Jul 16, 2025

Deploy Preview for airi-vtuber ready!

Name Link
🔨 Latest commit 3bef0f4
🔍 Latest deploy log https://app.netlify.com/projects/airi-vtuber/deploys/68780b347449470008e85caa
😎 Deploy Preview https://deploy-preview-282--airi-vtuber.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Jul 16, 2025

Deploy Preview for airi-docs ready!

Name Link
🔨 Latest commit 3bef0f4
🔍 Latest deploy log https://app.netlify.com/projects/airi-docs/deploys/68780b341718590008f86210
😎 Deploy Preview https://deploy-preview-282--airi-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @nekomeowww, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refactors the Unocss configuration across the workspace by centralizing web font definitions into a reusable utility function. This change streamlines font management, reduces configuration duplication in individual applications, and allows for more flexible per-application presetWebFonts configurations, improving maintainability and consistency.

Highlights

  • Centralized Web Font Definitions: A new presetWebFontsFonts utility function has been introduced in the root uno.config.ts to define a common set of web fonts. This function accepts a provider argument ('fontsource' or 'none') to allow for flexible font sourcing across different applications.
  • Decoupled Web Font Presets: The presetWebFonts configuration block has been removed from the sharedUnoConfig in the root uno.config.ts. This change allows individual applications to explicitly include and configure their web fonts using the new shared utility, rather than inheriting a monolithic web font setup.
  • Reduced Duplication in App Configurations: Multiple application-specific uno.config.ts files (apps/playground-prompt-engineering, apps/realtime-audio, apps/stage-tamagotchi, apps/stage-web) have been updated to consume the new presetWebFontsFonts function. This significantly reduces redundant font declarations and simplifies font management across the workspace.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request introduces a refactoring of UnoCSS font configurations, centralizing the font definitions in presetWebFontsFonts. The review comments focus on ensuring adherence to the style guide by wrapping code suggestions in GitHub suggestion blocks.

Comment on lines +5 to +20
export default mergeConfigs([
sharedUnoConfig(),
{
presets: [
presetWebFonts({
fonts: {
...presetWebFontsFonts('fontsource'),
},
timeouts: {
warning: 5000,
failure: 10000,
},
}),
],
},
])
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

To adhere to the style guide1, the code suggestion should be wrapped in a GitHub suggestion block.

Style Guide References

Suggested change
export default mergeConfigs([
sharedUnoConfig(),
{
presets: [
presetWebFonts({
fonts: {
...presetWebFontsFonts('fontsource'),
},
timeouts: {
warning: 5000,
failure: 10000,
},
}),
],
},
])
defineConfig([
sharedUnoConfig(),
{
presets: [
presetWebFonts({
fonts: {
...presetWebFontsFonts('fontsource'),
},
timeouts: {
warning: 5000,
failure: 10000,
},
}),
],
},
])

Footnotes

  1. Always wrap code suggestions in GitHub suggestion blocks to enable one-click application by maintainers. (link)

@nekomeowww nekomeowww marked this pull request as ready for review July 21, 2025 06:36
@nekomeowww nekomeowww merged commit 77832da into main Jul 21, 2025
14 checks passed
@nekomeowww nekomeowww deleted the dev/unocss-fonts-testing branch July 21, 2025 06:36
@Weathercold
Copy link
Collaborator

oh you just merged it. I also just tested this PR and it does fix the build

baysonfox pushed a commit to baysonfox/airi that referenced this pull request Jul 24, 2025
Disqort pushed a commit to Disqort/airi that referenced this pull request Aug 29, 2025
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.

2 participants