-
Notifications
You must be signed in to change notification settings - Fork 841
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
Added additional/base amount of z-index to popovers #2341
Conversation
@@ -458,7 +458,7 @@ export class EuiPopover extends Component<Props, State> { | |||
const { zIndex: zIndexProp } = this.props; | |||
const zIndex = | |||
zIndexProp == null | |||
? getElementZIndex(this.button, this.panel) | |||
? getElementZIndex(this.button, this.panel) + 2000 |
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.
Smart that you used 2000, which matches $euiZContentMenu
. I might add a comment just for folks so they know that's why you picked that number.
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.
Do we want this to be plus 2000 or at least 2000 ?
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 was thinking plus then it's alway overtop of any other content with the container as well. But I can see that this could get complicated with flyouts and modals both appearing at the same time?
But it should be at least 2000, and would still need to add a significant amount if the container is at least 2000 already.
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.
Alright, let's stick with +2000
and see how it goes :)
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.
Changes LGTM, pulled locally and ran through the docs.
c818936
to
edeb264
Compare
This reverts commit 55bf446.
Fix EuiPopover base z-index
The z-index is based off of the parent and the triggering element. But if both are
0
, then so is the popover which causes anything with a z-index of1
or more to show on top.Before
I've added an example in the File Picker docs section that will show:
Before
After
I'll remove this before merge but allows for easy testing.
And popovers in flyouts still work
Checklist
[ ] Checked in dark mode[ ] Checked in mobile[ ] Checked in IE11 and Firefox[ ] Props have proper autodocs[ ] Added documentation examples[ ] Checked for breaking changes and labeled appropriately[ ] Checked for accessibility including keyboard-only and screenreader modes