Ensure only one flyout is open at a time #8069
Unanswered
JasonStoltz
asked this question in
Feature Request
Replies: 1 comment 2 replies
-
I've moved this to be a discussion. I'm not sure if this is something we want to adopt or not. This could be an EUI feature of a shared service in @elastic/appex-sharedux We'd need to determine the best approach here and what the rules would be. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is your feature request related to a problem? Please describe.
There have been a few instances where users have had issues with competing flyouts.
Here is an example in Kibana: elastic/kibana#193452
While things like this can be solved within a given solution, as seen here, it could be desirable to manage this more holistically, at a the EUI level.
I'm not sure whether or not this is possible within EUI or not. If not, we may be able to implement a shared service via the Shared UX team. I think the first step would be to consider whether or not this is even possible in EUI and/or desirable in EUI.
EUI flyouts currently have no awareness of one another. They have a simple show/hide toggle. There's no context of any sort that tracks what flyouts are already opened. We rely on consumers to track that state.
The rules could get a bit tricky here, as well. For instance, it doesn’t make sense to allow multiple push flyouts, but a push and 1 overlay flyout could make sense,
And additionally, I believe there were some proposals on the table at one point to allow multiple push flyouts at one time.
Describe the solution you'd like
A solution might involve maintaining a context of all opened Flyouts, and close any other Flyout when a new one is opened.
Describe alternatives you've considered
The alternative to doing this in EUI is expecting that consumers are responsible to manage this.
Desired timeline
None, that I know of.
Additional context
This issue was raised by @kertal
Related flyout issue: #7443
Another consideration:
There are situations where we have a globally available flyout (think of an ai assistant) that users can "pin", so that it remains open as users navigate from page to page. This can conflict with other flyouts that are already on the page.
Beta Was this translation helpful? Give feedback.
All reactions