debug(workspace): unocss fonts split shared testing#282
Conversation
✅ Deploy Preview for airi-vtuber ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for airi-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
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
presetWebFontsFontsutility function has been introduced in the rootuno.config.tsto define a common set of web fonts. This function accepts aproviderargument ('fontsource' or 'none') to allow for flexible font sourcing across different applications. - Decoupled Web Font Presets: The
presetWebFontsconfiguration block has been removed from thesharedUnoConfigin the rootuno.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.tsfiles (apps/playground-prompt-engineering,apps/realtime-audio,apps/stage-tamagotchi,apps/stage-web) have been updated to consume the newpresetWebFontsFontsfunction. 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
-
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. ↩
There was a problem hiding this comment.
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.
| export default mergeConfigs([ | ||
| sharedUnoConfig(), | ||
| { | ||
| presets: [ | ||
| presetWebFonts({ | ||
| fonts: { | ||
| ...presetWebFontsFonts('fontsource'), | ||
| }, | ||
| timeouts: { | ||
| warning: 5000, | ||
| failure: 10000, | ||
| }, | ||
| }), | ||
| ], | ||
| }, | ||
| ]) |
There was a problem hiding this comment.
To adhere to the style guide1, the code suggestion should be wrapped in a GitHub suggestion block.
Style Guide References
| 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
|
oh you just merged it. I also just tested this PR and it does fix the build |
Description
Linked Issues
Additional context