Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pranshuteotia
Copy link

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

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@pranshuteotia pranshuteotia requested a review from a team as a code owner June 27, 2025 10:57
@pranshuteotia pranshuteotia requested review from orangevolon and removed request for a team June 27, 2025 10:57
@@ -75,4 +78,5 @@

.test-utils-drawer-content {
/* used in test-utils */
flex: 1;
Copy link
Member

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

Copy link
Author

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

Copy link
Member

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

Copy link
Author

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

Copy link
Member

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;
Copy link
Member

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

Copy link
Author

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.
Screenshot 2025-06-30 at 3 50 39 PM

Now after adding the the flex styles the content is rendering properly.
Screenshot 2025-06-30 at 3 53 54 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants