-
Notifications
You must be signed in to change notification settings - Fork 266
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(alert): [alert] updata alert xdesign #2083
Conversation
WalkthroughThis pull request introduces a new Changes
Possibly related PRs
Suggested labels
Poem
Tip New featuresWalkthrough comment now includes:
Notes:
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 (
|
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
Outside diff range, codebase verification and nitpick comments (3)
packages/design/smb/src/alert/index.ts (1)
1-5
: Potential Impact of Removing theinfo
IconThe
info
icon is still referenced in multiple files across the codebase, indicating its continued usage. Removing it from the alert component's icons object could lead to issues in other parts of the application that rely on this icon. Please verify all usages of theinfo
icon to ensure that its removal does not introduce any breaking changes.
- Files with
info
icon references:
packages/vue/src/alert/src/index.ts
packages/vue/src/top-box/index.ts
packages/vue/src/tooltip/src/token.ts
packages/vue/src/popconfirm/src/index.ts
packages/vue/src/notify/index.ts
packages/vue/src/modal/src/index.ts
packages/vue/src/button/src/index.ts
packages/vue-icon/index.ts
examples/solid-docs/src/views/button.tsx
examples/solid-docs/src/views/alert.tsx
examples/sites/demos/pc/app/button/basic-usage.spec.ts
examples/sites/demos/pc/app/badge/type.spec.ts
Analysis chain
Verify the impact of removing the
info
icon.The removal of the
info
icon from the alert component's icons object could potentially affect UI elements that rely on this icon. Ensure that this change is intentional and check for any breaking changes in the UI where theinfo
icon was previously used.Run the following script to verify the usage of the
info
icon:Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of the `info` icon in the project. # Test: Search for the `info` icon usage. Expect: No occurrences of the `info` icon. rg --type typescript -A 5 $'info'Length of output: 67
Script:
#!/bin/bash # Description: Verify the usage of the `info` icon in the project. # Test: Search for the `info` icon usage in TypeScript files. Expect: No occurrences of the `info` icon. rg --type ts -A 5 $'info'Length of output: 65736
examples/sites/demos/pc/app/tag/slot-default-composition-api.vue (1)
47-49
: Inconsistent border-radius values for.tiny-only-iocn
classThe
.tiny-only-iocn
class is used in two different Vue files with inconsistent border-radius values:
examples/sites/demos/pc/app/tag/slot-default-composition-api.vue
:border-radius: 0px 8px 0px 8px;
examples/sites/demos/pc/app/tag/slot-default.vue
:border-radius: 0px 6px 0px 6px;
Please ensure that the border-radius values are consistent across these files unless there is a specific design requirement for the difference.
Analysis chain
Approve the new CSS class styling.
The new CSS class
.tiny-only-iocn
with specific border-radius styling is correctly implemented to modify the appearance of the tag. Ensure that this styling is consistent across different components and does not conflict with existing styles.Run the following script to verify the consistency of the new CSS class:
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the consistency of the new CSS class `.tiny-only-iocn`. # Test: Search for the CSS class usage. Expect: Consistent styling across different files. rg --type css -A 5 $'.tiny-only-iocn'Length of output: 36
Script:
#!/bin/bash # Description: Verify the usage of the new CSS class `.tiny-only-iocn` across all files. # Test: Search for the CSS class usage in all files. Expect: Consistent styling across different components. rg -A 5 $'.tiny-only-iocn'Length of output: 1547
examples/sites/demos/pc/app/tag/slot-default.vue (1)
55-57
: Inconsistent border-radius values for.tiny-only-iocn
class.The CSS class
.tiny-only-iocn
is used in bothslot-default.vue
andslot-default-composition-api.vue
, but the border-radius values differ between the two files. Ensure that the border-radius values are consistent across these files unless there is a specific design requirement for the difference.
examples/sites/demos/pc/app/tag/slot-default.vue
:border-radius: 0px 6px 0px 6px;
examples/sites/demos/pc/app/tag/slot-default-composition-api.vue
:border-radius: 0px 8px 0px 8px;
Analysis chain
Approve the new CSS class styling.
The new CSS class
.tiny-only-iocn
with specific border-radius styling is correctly implemented to modify the appearance of the tag. Ensure that this styling is consistent across different components and does not conflict with existing styles.Run the following script to verify the consistency of the new CSS class:
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the consistency of the new CSS class `.tiny-only-iocn`. # Test: Search for the CSS class usage. Expect: Consistent styling across different files. rg --type css -A 5 $'.tiny-only-iocn'Length of output: 36
Script:
#!/bin/bash # Description: Verify the consistency of the new CSS class `.tiny-only-iocn` across all file types. # Test: Search for the CSS class usage in all files. Expect: Consistent styling across different files. rg -A 5 $'.tiny-only-iocn'Length of output: 1547
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- examples/sites/demos/pc/app/tag/slot-default-composition-api.vue (2 hunks)
- examples/sites/demos/pc/app/tag/slot-default.vue (2 hunks)
- packages/design/smb/src/alert/index.ts (1 hunks)
- packages/theme/src/tag/smb-theme.js (1 hunks)
Additional comments not posted (3)
examples/sites/demos/pc/app/tag/slot-default-composition-api.vue (1)
11-13
: Approve the addition of the new<tiny-tag>
component.The new
<tiny-tag>
component with atype
of "success" and the classtiny-only-iocn
is a welcome addition, enhancing the visual representation and functionality. Ensure that this new component is correctly implemented and styled across different platforms and browsers.Run the following script to verify the correct implementation:
examples/sites/demos/pc/app/tag/slot-default.vue (1)
9-11
: Approve the addition of the new<tiny-tag>
component.The new
<tiny-tag>
component with asize
of "small", atype
of "success", and the classtiny-only-iocn
is a welcome addition, enhancing the visual representation and functionality. Ensure that this new component is correctly implemented and styled across different platforms and browsers.Run the following script to verify the correct implementation:
Verification successful
Verification successful for the
<tiny-tag>
component implementation.The
<tiny-tag>
component withsize="small"
,type="success"
, and the classtiny-only-iocn
is correctly implemented inexamples/sites/demos/pc/app/tag/slot-default.vue
. No issues were found with its implementation.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correct implementation of the new `<tiny-tag>` component. # Test: Search for the new `<tiny-tag>` usage. Expect: Correct implementation across different files. rg --type vue -A 5 $'tiny-tag size="small" type="success"'Length of output: 87
Script:
#!/bin/bash # Description: Verify the correct implementation of the new `<tiny-tag>` component. # Find all .vue files and search for the new `<tiny-tag>` usage. fd --extension vue --exec rg -Hn -A 5 '<tiny-tag size="small" type="success"' {}Length of output: 537
packages/theme/src/tag/smb-theme.js (1)
10-10
: Verify the new CSS variable for consistency.The change to the primary background color of tags from
var(--ti-common-color-bg-light-normal)
tovar(--ti-common-color-bg-6)
is noted. While this update is likely intended to align with new design guidelines, it's crucial to ensure that the new variable is defined and used consistently across the project.Verification successful
CSS Variable Usage Verified
The CSS variable
--ti-common-color-bg-6
is used consistently across multiple theme files, includingtabs
,tag
, andfilter-box
components. Its presence with a fallback value invars.less
confirms its role in the design system. The change inpackages/theme/src/tag/smb-theme.js
aligns with this usage pattern and does not introduce any issues.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the definition and usage of the new CSS variable. # Test: Search for the new CSS variable definition. Expect: At least one occurrence. rg --type css 'var(--ti-common-color-bg-6)' # Test: Search for the usage of the new CSS variable. Expect: Multiple occurrences. rg --type css 'var(--ti-common-color-bg-6)'Length of output: 91
Script:
#!/bin/bash # Description: Search for the definition of the CSS variable across all file types. # Test: Search for the definition of the CSS variable. Expect: At least one occurrence. rg '--ti-common-color-bg-6'Length of output: 452
Script:
#!/bin/bash # Description: Correct the search for the definition of the CSS variable across all file types. # Test: Search for the definition of the CSS variable. Expect: At least one occurrence. rg '--ti-common-color-bg-6'Length of output: 452
Script:
#!/bin/bash # Description: Correct the search for the definition of the CSS variable across all file types. # Test: Search for the definition of the CSS variable. Expect: At least one occurrence. rg '--ti-common-color-bg-6'Length of output: 452
Script:
#!/bin/bash # Description: Correct the search for the definition of the CSS variable across all file types using the -e option. # Test: Search for the definition of the CSS variable. Expect: At least one occurrence. rg -e '--ti-common-color-bg-6'Length of output: 474
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 (5)
- examples/sites/demos/pc/app/tag/slot-default-composition-api.vue (2 hunks)
- examples/sites/demos/pc/app/tag/slot-default.vue (2 hunks)
- packages/theme/src/tag/index.less (1 hunks)
- packages/theme/src/tag/smb-theme.js (1 hunks)
- packages/theme/src/tag/vars.less (1 hunks)
Files skipped from review due to trivial changes (1)
- packages/theme/src/tag/vars.less
Files skipped from review as they are similar to previous changes (3)
- examples/sites/demos/pc/app/tag/slot-default-composition-api.vue
- examples/sites/demos/pc/app/tag/slot-default.vue
- packages/theme/src/tag/smb-theme.js
Additional comments not posted (1)
packages/theme/src/tag/index.less (1)
261-261
: Good use of CSS variables for theming.The change to use a CSS variable for the disabled tag background color enhances maintainability and flexibility. Ensure that the variable
--ti-tag-disabled-background-color
is defined elsewhere in the stylesheets or theme configuration to avoid any runtime issues.Run the following script to verify the definition of the CSS variable:
Verification successful
CSS Variable Definition Verified
The CSS variable
--ti-tag-disabled-background-color
is correctly defined inpackages/theme/src/tag/vars.less
and used inpackages/theme/src/tag/index.less
. This ensures maintainability and theming flexibility without runtime issues.
- Definition found in:
packages/theme/src/tag/vars.less
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the definition of the CSS variable `--ti-tag-disabled-background-color`. # Test: Search for the variable definition. Expect: At least one occurrence. rg --type css --type less --type scss $'--ti-tag-disabled-background-color'Length of output: 511
Script:
#!/bin/bash # Description: Verify the definition of the CSS variable `--ti-tag-disabled-background-color`. # Test: Search for the variable definition. Expect: At least one occurrence. rg --type css --type less --type scss '--ti-tag-disabled-background-color'Length of output: 511
Script:
#!/bin/bash # Description: Verify the definition of the CSS variable `--ti-tag-disabled-background-color`. # Test: Search for the variable definition. Expect: At least one occurrence. rg --type css --type less --type scss '\-\-ti-tag-disabled-background-color'Length of output: 107
Script:
#!/bin/bash # Description: Verify the definition of the CSS variable `--ti-tag-disabled-background-color`. # Test: Search for the variable definition. Expect: At least one occurrence. rg --type css --type less '\-\-ti-tag-disabled-background-color'Length of output: 255
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
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
New Features
<tiny-tag>
component with an icon for file upload, enhancing visual representation and functionality.Bug Fixes
info
icon from the alert component, streamlining available icons.Style