feat(core): add userStyle option to ensure highest priority, closes #1110#1695
feat(core): add userStyle option to ensure highest priority, closes #1110#1695Mister-Hope wants to merge 1 commit intomainfrom
Conversation
Pull Request Test Coverage Report for Build 23836340449Details
💛 - Coveralls |
There was a problem hiding this comment.
Pull request overview
Adds a userStyle theme option intended to inject a user-provided style file late in the client entry, so it has higher CSS precedence in the final bundle.
Changes:
- Extend core types (
ThemeObject,ThemeInfo,App) with an optionaluserStylestring. - Resolve
userStylethrough theme inheritance and attach it to the app instance. - Inject
userStyleas an additional import in the generated@internal/clientConfigstemp module.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/core/src/types/theme.ts | Adds userStyle?: string to theme typing and resolved theme info typing. |
| packages/core/src/types/app/app.ts | Adds userStyle?: string onto the App type surface. |
| packages/core/src/app/setupAppThemeAndPlugins.ts | Copies resolved themeInfo.userStyle onto app.userStyle. |
| packages/core/src/app/resolveThemeInfo.ts | Attempts to merge userStyle through theme inheritance. |
| packages/core/src/app/prepare/prepareClientConfigs.ts | Adds an import for app.userStyle in the generated client configs entry. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /** | ||
| * Allow specifying user styles, which will be injected into client at the bottom | ||
| */ | ||
| userStyle?: string |
There was a problem hiding this comment.
userStyle is assigned during app creation (setupAppThemeAndPlugins() is called from createDevApp/createBuildApp before app.init()), so placing it under AppPropertiesInitialized and documenting it as only available after initialization is misleading. Consider moving userStyle to AppPropertiesBase, or adjust the initialization flow/docs so it truly becomes available only after init().
No description provided.