-
Notifications
You must be signed in to change notification settings - Fork 300
fix(dialog-box): [dialog-box] modify the style of the dialog box #2757
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,9 +116,11 @@ | |
|
||
& &__body { | ||
text-align: left; | ||
padding: 0 var(--tv-DialogBox-padding); | ||
padding: var(--tv-DialogBox-vertical-padding) var(--tv-DialogBox-padding); | ||
color: var(--tv-DialogBox-body-text-color); | ||
font-size: var(--tv-DialogBox-body-font-size); | ||
overflow: auto; | ||
max-height: 65vh; | ||
Comment on lines
+122
to
+123
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification 🛠️ Refactor suggestion Consider implementing responsive max-height with CSS custom properties The codebase analysis confirms the review's concerns:
The suggested improvements in the review are valid and align with the existing patterns in the codebase. 🔗 Analysis chainReview max-height implementation for mobile responsiveness. The current implementation has potential issues:
Consider these improvements:
&__body {
text-align: left;
padding: var(--tv-DialogBox-vertical-padding) var(--tv-DialogBox-padding);
color: var(--tv-DialogBox-body-text-color);
font-size: var(--tv-DialogBox-body-font-size);
overflow: auto;
- max-height: 65vh;
+ max-height: var(--tv-DialogBox-body-max-height, 65vh);
}
&.is-fullscreen &__body {
flex: 1;
overflow: scroll;
+ max-height: none; // Override max-height when fullscreen
}
@media (max-width: 480px) {
.@{dialog-box-prefix-cls} {
width: 100% !important;
top: 0 !important;
left: 0 !important;
+ &__body {
+ max-height: var(--tv-DialogBox-body-max-height-mobile, 80vh);
+ }
}
} Let me verify the current mobile handling in the codebase: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Check for other mobile-specific dialog box styles and max-height usage
rg -l "max-height.*vh" packages/theme/src/
rg -l "@media.*480px" packages/theme/src/
Length of output: 282 Script: #!/bin/bash
# Check vh-based max-height implementations and fullscreen styles
rg "max-height:.*vh" packages/theme/src/ -A 2
rg "is-fullscreen" packages/theme/src/
rg "tv-DialogBox.*height" packages/theme/src/
Length of output: 1068 |
||
|
||
.@{css-prefix}upload { | ||
overflow: hidden; | ||
|
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 the max-height of 65vh does not cause content clipping in smaller viewports. Consider making this value responsive if necessary.