-
Notifications
You must be signed in to change notification settings - Fork 312
feat(popconfirm): [popconfirm] Adapting to the SMB theme #2072
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
Conversation
WalkthroughThe changes involve modifications to the content and styling of the popconfirm component in a Vue application. Key updates include shortening message texts for improved readability, introducing new CSS variables for better styling flexibility, and adjusting default properties such as width. Additionally, new class bindings enhance visual feedback based on the presence of messages. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Popconfirm
User->>Popconfirm: Trigger popconfirm
Popconfirm->>Popconfirm: Check message presence
alt Message exists
Popconfirm->>Popconfirm: Render message
else No message
Popconfirm->>Popconfirm: Apply no-message class
end
Popconfirm->>User: Display popconfirm
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 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: 2
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (6)
- examples/sites/demos/pc/app/popconfirm/basic-usage-composition-api.vue (1 hunks)
- examples/sites/demos/pc/app/popconfirm/basic-usage.vue (1 hunks)
- packages/theme/src/popconfirm/index.less (2 hunks)
- packages/theme/src/popconfirm/smb-theme.js (1 hunks)
- packages/theme/src/popconfirm/vars.less (1 hunks)
- packages/vue/src/popconfirm/src/pc.vue (2 hunks)
Files skipped from review due to trivial changes (2)
- examples/sites/demos/pc/app/popconfirm/basic-usage-composition-api.vue
- examples/sites/demos/pc/app/popconfirm/basic-usage.vue
Additional comments not posted (7)
packages/theme/src/popconfirm/smb-theme.js (3)
9-9
: Approved: Trailing comma added.The addition of a trailing comma is a good practice in JavaScript objects as it facilitates easier modifications and version control handling.
11-11
: Approved: New text color property.The addition of
ti-popconfirm-popover-text-color
enhances the theme customization by allowing specific control over the text color.
12-12
: Approved: New line height property.The addition of
ti-popconfirm-popover-line-height
with a value of1.5
is appropriate for ensuring good text readability within the popover.packages/theme/src/popconfirm/index.less (2)
47-47
: Approved: New class for elements without a message.The addition of the
.no-message
class with a font weight of 400 is appropriate for styling elements that do not contain a message, enhancing the component's visual hierarchy.
64-64
: Approved: Updated color property to use CSS variable.Updating the color property in the
&__content
class to use the variablevar(--ti-popconfirm-popover-text-color)
enhances styling flexibility and maintainability.packages/vue/src/popconfirm/src/pc.vue (2)
25-25
: Conditional class binding for better visual feedback.The introduction of the
no-message
class based on themessage
prop's value enhances visual feedback. Ensure that this change does not negatively impact accessibility or introduce unexpected behavior in the UI.Please verify the visual and accessibility impact of this change.
99-99
: Default width property adjustment.The change in the default value of the
width
property from350
to260
likely aims to optimize the component's layout. Ensure that this change does not adversely affect the layout in existing implementations.Please verify the impact of this width adjustment on existing layouts where the component is used.
@@ -6,5 +6,8 @@ export const tinyPopconfirmSmbTheme = { | |||
'ti-popconfirm-popover-icon-width': 'var(--ti-common-size-4x)', | |||
'ti-popconfirm-popover-title-font-weight': 'var(--ti-common-font-weight-bold)', | |||
'ti-popconfirm-popover-title-font-size': 'var(--ti-common-font-size-2)', | |||
'ti-popconfirm-popover-icon-margin-right': 'var(--ti-common-space-base)' | |||
'ti-popconfirm-popover-icon-margin-right': 'var(--ti-common-space-base)', | |||
'ti-popconfirm-popover-margin-bottomt': '8px', |
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.
Typo in property name.
The property name ti-popconfirm-popover-margin-bottomt
appears to have a typo. It should likely be ti-popconfirm-popover-margin-bottom
.
Propose a correction:
-'ti-popconfirm-popover-margin-bottomt': '8px',
+'ti-popconfirm-popover-margin-bottom': '8px',
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
'ti-popconfirm-popover-margin-bottomt': '8px', | |
'ti-popconfirm-popover-margin-bottom': '8px', |
@@ -30,4 +30,5 @@ | |||
// 标题字重、大小 | |||
--ti-popconfirm-popover-title-font-size: var(--ti-common-font-size-1); | |||
--ti-popconfirm-popover-title-font-weight: var(--ti-common-font-weight-normal, 400); | |||
--ti-popconfirm-popover-text-color: #5c6976; |
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.
Potential color inconsistency.
The new variable --ti-popconfirm-popover-text-color
is set to #5c6976
, which differs from the #191919
used in the smb-theme.js
file. Please verify if this discrepancy is intentional or if one of the values needs to be updated for consistency.
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
Bug Fixes
Style
Chores