-
Notifications
You must be signed in to change notification settings - Fork 184
feat: make drawer content take up full height #3623
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
base: main
Are you sure you want to change the base?
Conversation
@@ -75,4 +78,5 @@ | |||
|
|||
.test-utils-drawer-content { | |||
/* used in test-utils */ | |||
flex: 1; |
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 purpose of this class is to access the dom node by this selector, so no style rules should be used here
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.
Ack. I'll move this into another class
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.
btw, this style rule can only be applied when the parent element is also display: flex
, which is not a case for the runtime drawers
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.
I am not sure if I understand? I do have display flex added to the parent which is the drawer component itself
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.
got it. then this behavior is specific for your use-case, not for this general component. in this case it's better to implement it on your parent level
@@ -16,6 +16,9 @@ | |||
.drawer { | |||
@include styles.styles-reset; | |||
word-wrap: break-word; | |||
height: 100%; | |||
display: flex; |
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.
What is the purpose of this additional flex styles? I tried to apply height: 100%
without them on my local machine - works fine
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.
We not only need the drawer to be full height. We also need the drawer content to take up the rest of the space left after the drawer header. So display flex allows use to add flex-grow: 1
to the content which will make the drawer content take up the rest of the space.
Now after adding the the flex styles the content is rendering properly.
Description
Currently the drawer content does not expand to the full height of its container. Because of this if the drawer content has an embeded iFrame then it results in a broken experience. This PR fixes that.
Related links, issue #, if available: n/a
How has this been tested?
dry-run
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md
.CONTRIBUTING.md
.Security
checkSafeUrl
function.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.