-
Notifications
You must be signed in to change notification settings - Fork 861
[Flyout system] Dynamic z-index calculation #9238
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
[Flyout system] Dynamic z-index calculation #9238
Conversation
tsullivan
left a comment
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.
Relatively simple fix, addresses two important issues. LGTM!
I tested by changing the Non-Session flyout in the layout-euiflyout-flyout-manager--multi-session-example storybook: I changed side from left to right. Now, when we open the non-session flyout after a managed flyout is open, the non-session flyout appears correctly on top.
One suggestion I might give is to put into the code the test I did:
diff --git packages/eui/src/components/flyout/manager/flyout_sessions.stories.tsx packages/eui/src/components/flyout/manager/flyout_sessions.stories.tsx
index dafa9ee68..35162e47d 100644
--- packages/eui/src/components/flyout/manager/flyout_sessions.stories.tsx
+++ packages/eui/src/components/flyout/manager/flyout_sessions.stories.tsx
@@ -313,7 +313,6 @@ const NonSessionFlyout: React.FC<{ size: string }> = ({ size }) => {
ownFocus={flyoutOwnFocus}
pushAnimation={true}
onClose={flyoutOnClose}
- side="left"
>
<EuiFlyoutHeader>
<EuiTitle size="m">…FLYOUT` and `currentZIndex`
|
@tsullivan I removed the |
…flyout-system-dynamic-z-index
💚 Build SucceededHistory
cc @tkajtoch |
💚 Build Succeeded
History
cc @tkajtoch |
Summary
Resolves #9160
Resolves #9237
This PR fixes stacking of managed and unmanaged flyouts by dynamically calculating
z-indexvalues for each new flyout. The added z-index value gets reset to0when no more flyouts are open to avoid too high values in long-running runtimes.This PR has
skip-changeloglabel applied as it brings back the expected flyouts "stacking" behavior to the Flyout System. There should be no differences in rendering multiple flyouts one on top of another compared tomain.Why are we making this change?
Part of the Flyout System project; fixing remaining bugs before merging the feature branch to
mainScreenshots #
Impact to users
No negative impact to users. They'll see the overlays applied properly, no matter the DOM injection order or the managed and unmanaged flyouts combinations.
QA
Remove or strikethrough items that do not apply to your PR.