You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
EuiGlobalToastList became hidden behind EuiFlyout with EUI 7.14.1 #5169
We have a seasoned Kibana plugin which makes extensive use of EUI Toast Messages to describe success/errors. Typically we use Flyouts for create/edit table records. Everything has worked fine up until 7.14.1.
This is not a problem that can be solved through CSS (i.e. Z-Index). For some reason the EuiFlyout was moved outside of the Kibana App wrapper with the recent upgrade.
If the EuiFlyout can't be moved back inside (like it used to), then the EuiGlobalToastList must be moved outside in order to supersede the iron-clad DOM hierarchy.
Hey @btychon
EuiFlyout was intentionally moved outside of the normal document flow using React portals, but there should be no adverse stacking effects given normal usage of EuiGlobalToastList. See the simple reproduction in codesandbox that shows z-index working as expected.
Do you have custom styles that change the default positioning of either component?
Wrapping the <EuiGlobalToast> list within an <EuiPortal> was a simple fix that's backwards/forward compatible with older ELK stacks in the wild. We built a notification API at the top level of the React app (also using the Context API) which basically works the same as the Kibana Notification Service. I think that was added in 7.10.x.
I see the wisdom in moving fixed elements outside of the component hierarchy... glad I know about the <EuiPortal> now. I agree with cchaos's last comment. The <EuiGlobalToastList> should probably wrap its children in a portal by default. Anyway, thank you very much for the help!
Activity
thompsongl commentedon Sep 13, 2021
Hey @btychon
EuiFlyout was intentionally moved outside of the normal document flow using React portals, but there should be no adverse stacking effects given normal usage of EuiGlobalToastList. See the simple reproduction in codesandbox that shows
z-indexworking as expected.Do you have custom styles that change the default positioning of either component?
cchaos commentedon Sep 13, 2021
I can also confirm that in Kibana specifically, that when using their global toast service, it does sit on top of any portalled flyouts.

You should be using Kibana's notifications service as a Kibana plugin otherwise you will need to wrap your instance in an EuiPortal.
cchaos commentedon Sep 13, 2021
In EUI, we may want to consider adding this (EuiPortal) directly to the EuiGlobalToastList component with the option to disable it.
btychon commentedon Sep 22, 2021
Wrapping the
<EuiGlobalToast>list within an<EuiPortal>was a simple fix that's backwards/forward compatible with older ELK stacks in the wild. We built a notification API at the top level of the React app (also using the Context API) which basically works the same as the Kibana Notification Service. I think that was added in 7.10.x.I see the wisdom in moving fixed elements outside of the component hierarchy... glad I know about the
<EuiPortal>now. I agree with cchaos's last comment. The<EuiGlobalToastList>should probably wrap its children in a portal by default. Anyway, thank you very much for the help!