forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Security Solution][Alert Details] - push and overlay expandable flyo…
…ut (elastic#182615) ## Summary This PR adds a new functionality to the `kbn-expandable-flyout` package and its usage in the Security Solution application. The package's flyout now support to be rendered in `overlay` or `push` mode, following [EUI's recommendation](https://eui.elastic.co/#/layout/flyout#push-versus-overlay). A gear icon button is rendered in the top right corner, next to the close button. When clicked, a menu appears where users can select `push` or `overlay` values. `overlay` is the default value. If `push` is selected, a `Reset to default` empty button can be used to reset to `overlay`. Overlay option selected (by default) ![Screenshot 2024-09-04 at 12 10 34 PM](https://github.com/user-attachments/assets/87f57238-9b44-4d29-9516-9eb329c49bb2) Push option selected ![Screenshot 2024-09-04 at 12 10 42 PM](https://github.com/user-attachments/assets/80e7879a-b238-46ba-9c13-2c8e236e138f) The flyout should be toggled between `overlay` and `push` mode in all the pages it's been currently used in: - alerts page - rule creation page - explore pages (host, users...) - case detail page https://github.com/user-attachments/assets/b4cec138-802c-430d-8f37-01258e6afef3 But the flyout cannot be set to `push` mode when opened from Timeline. Timeline is a modal (an EUI Portal to be precise), and getting the portal as well as the overlay mask to correctly resize according to the flyout's width (which is dynamic, changes with the screen size and also changes if the flyout is in collapsed or expanded mode) is very difficult. A future PR might add this functionality to TImeline. At this time, the flyout offers the option to disable the `push/overlay` toggle as well as an icon to show a tooltip to explain why. https://github.com/user-attachments/assets/e00961c8-cc75-4eb9-b34d-544bc4391d5c #### Notes The package also offers a way to hide the gear icon entirely. In the future, we might need a bit more flexibility if we want to be able to show the gear icon with options others than the `push/overlay` entry. Finally the state of the flyout type (`overlay` vs `push`) is saved in local storage so that users don't have to set the value over and over again. This state is persisted within the `kbn-expandable-flyout` package so that developers don't have to worry about setting it up. The package uses its internal `urlKey` to guarantee that the key used to save in localStorage is unique. This means that `memory` flyouts cannot persist the `push` or `overlay` states, this is expected. https://github.com/elastic/kibana/assets/17276605/500315b5-07d4-4498-aab9-ee2e2be0253b ### Notes The package's README has been updated. New Storybook stories have been added to reflect the new push/overlay functionality. elastic#182593
- Loading branch information
1 parent
832bc99
commit d968cc0
Showing
20 changed files
with
835 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.