-
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(modal): [modal] the style does not take effect #2751
Conversation
WalkthroughThe pull request involves a minor modification to a CSS variable in the modal theme configuration. Specifically, the font size for the modal box body text has been updated from Changes
Possibly related PRs
Suggested labels
Suggested reviewers
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 (
|
WalkthroughThis pull request addresses a styling issue in the modal component where the style was not taking effect. The change updates the font size variable for the modal's body text to ensure the correct styling is applied. Changes
|
@@ -77,7 +77,7 @@ | |||
// 弹窗内容区的垂直内边距 | |||
--tv-Modal-box-body-padding-y: 0; | |||
// 弹窗内容区的消息文本字体大小 | |||
--tv-Modal-box-body-text-font-size: var(--tv-font-size-m); | |||
--tv-Modal-box-body-text-font-size: var(--tv-font-size-md); |
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.
The font size variable for the modal body text has been updated from --tv-font-size-m
to --tv-font-size-md
. Ensure that this change aligns with the intended design specifications and does not affect other components relying on this variable.
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/modal/vars.less (1)
80-80
: Consider adding visual regression tests.Since this is a styling change, it would be beneficial to add visual regression tests to ensure the modal's appearance remains consistent across changes.
Consider using tools like Storybook with visual regression testing capabilities to capture and verify the modal's appearance.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/theme/src/modal/vars.less
(1 hunks)
🔇 Additional comments (2)
packages/theme/src/modal/vars.less (2)
80-80
: Verify the font size variable naming convention.The change from
--tv-font-size-m
to--tv-font-size-md
appears to be a correction to align with the standard naming convention. However, we should verify that both variables exist and their values to ensure this isn't a breaking change.Let's verify the font size variables in the theme:
✅ Verification successful
Font size variable change is correct and safe
The change aligns with the codebase's convention where
--tv-font-size-md
(14px) is the standard variable used across theme files. The previous--tv-font-size-m
variable was undefined, making this a safe correction rather than a breaking change.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for font size variable declarations rg --type less "tv-font-size-(m|md)" packages/theme/Length of output: 660
80-80
: Update documentation if font sizes differ.If
--tv-font-size-m
and--tv-font-size-md
have different values, please:
- Document this change in the changelog
- Update any relevant component documentation
- Add a note about migration if this is a breaking change
Let's check if this change is documented:
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
The style does not take effect
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