-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(theme-tool): add theme-tool.d.ts for tinyOldTheme vars #2786
Conversation
WalkthroughThe pull request introduces two new theme constants, Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
WalkthroughThis pull request introduces type declarations for the Changes
|
@@ -17,6 +17,10 @@ interface ThemeData { | |||
css?: string | |||
} | |||
|
|||
declare const tinyOldTheme: ThemeData |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure that ThemeData
is correctly defined and imported in this file to avoid potential type errors.
[e2e-test-warn] The title of the Pull request should look like "fix(vue-renderless): [action-menu, alert] fix xxx bug". Please make sure you've read our contributing guide |
There was a problem hiding this 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 (1)
packages/theme/src/theme-tool.d.ts (1)
20-21
: LGTM! Consider adding JSDoc comments.The constant declarations are correctly typed with
ThemeData
. Consider adding JSDoc comments to document the purpose and usage of each theme constant.+/** Default theme with legacy styling */ declare const tinyOldTheme: ThemeData +/** Aurora theme with modern styling */ declare const tinyAuroraTheme: ThemeData
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/theme/src/theme-tool.d.ts
(1 hunks)
🔇 Additional comments (2)
packages/theme/src/theme-tool.d.ts (2)
23-23
: LGTM! Export statement is well-structured.The named exports are appropriately used, allowing for selective imports of the theme constants.
20-23
: Verify theme constant usage across the codebase.Let's ensure these new theme constants are used consistently and that any existing theme imports are updated accordingly.
✅ Verification successful
New theme constants can be safely introduced
The new theme constants
tinyOldTheme
andtinyAuroraTheme
are independent additions that don't require changes to existing theme usage in the codebase.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for potential theme imports and usage echo "Checking theme imports and usage..." rg -t ts -t vue "import.*tinyOldTheme|import.*tinyAuroraTheme" --type-add 'vue:*.vue' # Check for existing theme-related constants that might need updates echo "Checking existing theme constants..." rg -t ts -t vue "theme.*=.*Theme" --type-add 'vue:*.vue'Length of output: 1889
Script:
#!/bin/bash # Check for theme-related type definitions and interfaces echo "Checking theme-related types..." ast-grep --pattern 'interface $_ extends ThemeData' ast-grep --pattern 'type $_ = ThemeData' # Check for any direct references to these specific theme names echo "Checking specific theme references..." rg -t ts -t vue "oldTheme|auroraTheme" --type-add 'vue:*.vue'Length of output: 318
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
增加theme-tool的类型声明
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit
tinyOldTheme
andtinyAuroraTheme
@opentiny/vue-theme
package from3.20.1
to3.20.2