-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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: menu-badge color not correct #4089
Conversation
|
WalkthroughThe updates introduce a new function, Changes
Poem
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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- packages/@core/base/shared/src/color/convert.test.ts (2 hunks)
- packages/@core/base/shared/src/color/convert.ts (1 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/menu-badge/menu-badge.vue (3 hunks)
Additional comments not posted (5)
packages/@core/ui-kit/shadcn-ui/src/components/menu-badge/menu-badge.vue (2)
6-6
: Update import statement to useisValidColor
.The import of
convertToRgb
has been replaced withisValidColor
, aligning with the new approach to color validation.
37-39
: Enhance color validation inbadgeStyle
.The
badgeStyle
computed property now checks for valid colors usingisValidColor
, ensuring that only valid color values are applied.packages/@core/base/shared/src/color/convert.ts (2)
49-54
: AddisValidColor
function for color validation.The
isValidColor
function usesTinyColor
to verify if a given color string is valid, returning a boolean result. This addition enhances the module's capability to handle color inputs.
56-62
: Update exports to includeisValidColor
.The export list now includes
isValidColor
, making it available for use in other parts of the codebase.packages/@core/base/shared/src/color/convert.test.ts (1)
48-58
: Add tests forisValidColor
function.The new test cases verify the functionality of
isValidColor
, ensuring it correctly identifies valid and invalid color strings. This enhances the robustness of the color validation logic.
Description
#4088
Type of change
Please delete options that are not relevant.
pnpm-lock.yaml
unless you introduce a new test example.Checklist
pnpm run docs:dev
command.pnpm test
.feat:
,fix:
,perf:
,docs:
, orchore:
.Summary by CodeRabbit
New Features
Bug Fixes
Refactor