-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[core] fix(Dialog): set dialog header z-index to 0 #4888
[core] fix(Dialog): set dialog header z-index to 0 #4888
Conversation
realized the scss variable probably can't be removed until v4 in case a consumer is importing it - curious if that's the right approach here |
Why do you need |
it's hard to tell working with legacy code, but it seemed there was a clear path forward to fix the issue here from playing around in the console regardless of this specific issue the header having |
Well the intention of the header |
the header has looking at https://blueprintjs.com/docs/#core/components/dialog and making my window short it seems like dialog body doesn't add scrolling and instead adds a scrollbar at the window level when the dialog overflows I'm not sure if the usage of |
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.
hey @adidahiya - are there any concerns with this PR? sorry if the repro makes this look overwhelming, I was trying to thoroughly demonstrate the issue and that this 1 line change fixes it (toggling the 1 line change with the "style override" checkbox and manually overriding the css in the repro when checked)
this change keeps users from needing to fight against blueprint setting an unnecessarily high z-index for the dialog header - the second part of the repro shows the z-index was added for the border in the multistep dialog and was not needed before that, and that "0" also works there
@@ -95,7 +95,7 @@ $dialog-padding: $pt-grid-size * 2 !default; | |||
min-height: $pt-icon-size-large + $dialog-padding; | |||
padding-left: $dialog-padding; | |||
padding-right: $dialog-padding / 4; | |||
z-index: $pt-z-index-dialog-header; |
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.
could leave a comment above $pt-z-index-dialog-header
now that blueprint no longer uses it to remove in a future breaking version
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.
On second thought... this PR looks good. I missed the fact that this z-index
was only added in the MultiStepDialog PR, and you're right that it doesn't need to be set to such a high value.
Changes proposed in this pull request:
remove z-index from
dialog-header
classReviewers should focus on:
any reasons this high z-index may be needed? without more context it seems unlikely the highest constant z-index should be for the dialog header but I could be missing something.
Screenshot
gif showing:
usePortal
isfalse
inpopoverProps
z-index: 0
is needed forMultistepDialog
- the PR that introduced this component added this z-index (see here) and I think it was just set higher than it needed to be