Skip to content

feat(core): add userStyle option to ensure highest priority, closes #1110#1695

Open
Mister-Hope wants to merge 1 commit intomainfrom
user-style
Open

feat(core): add userStyle option to ensure highest priority, closes #1110#1695
Mister-Hope wants to merge 1 commit intomainfrom
user-style

Conversation

@Mister-Hope
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings March 20, 2026 01:18
@coveralls
Copy link
Copy Markdown

coveralls commented Mar 20, 2026

Pull Request Test Coverage Report for Build 23836340449

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.05%) to 75.712%

Totals Coverage Status
Change from base Build 23834724787: -0.05%
Covered Lines: 751
Relevant Lines: 991

💛 - Coveralls

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 optional userStyle string.
  • Resolve userStyle through theme inheritance and attach it to the app instance.
  • Inject userStyle as an additional import in the generated @internal/clientConfigs temp 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.

Comment thread packages/core/src/app/resolveThemeInfo.ts
Comment thread packages/core/src/app/resolveThemeInfo.ts
Comment thread packages/core/src/app/prepare/prepareClientConfigs.ts
Comment thread packages/core/src/types/app/app.ts Outdated
Comment on lines +98 to +101
/**
* Allow specifying user styles, which will be injected into client at the bottom
*/
userStyle?: string
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

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().

Copilot uses AI. Check for mistakes.
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.

3 participants