Conversation
…/solution_nav/jest.config.js
…ib/jest.config.js
|
Pinging @elastic/eui-team (EUI) |
|
Pinging @elastic/fleet (Team:Fleet) |
|
We found the following inconsistency with the export flyout that is owned by the @elastic/appex-sharedux team. See: #244911 (comment) cc @tsullivan |
|
/oblt-deploy |
rmyz
left a comment
There was a problem hiding this comment.
src/platform/packages/shared/kbn-unified-metrics-grid/src/components/flyout/hooks/use_flyout_a11y.tsx change LGTM
Filed #245851 for the SharedUX backlog |
|
@elasticmachine merge upstream |
| onClose={() => onClose()} | ||
| {...restOfProps} | ||
| maxWidth={MAX_FLYOUT_WIDTH} | ||
| ref={null} |
There was a problem hiding this comment.
I have a couple questions regarding this:
- I'm curious, why is it still necessary to keep the higher z-index? i saw it's being removed elsewhere.
- I think we're (slowly) moving away from styled components. Would it make sense to update the component to use emotion rather than doing this?
There was a problem hiding this comment.
Great catch! It's probably not necessary at this point - when I was refactoring this file, I was focused on getting the ref fixed and, at that time, we still haven't had the dynamic z-index calculation implemented. I'll update it
criamico
left a comment
There was a problem hiding this comment.
Tested locally, LGTM for Fleet
nikitaindik
left a comment
There was a problem hiding this comment.
Tested Rule Management team owned flyouts locally:
- rule flyout on prebuilt rules installation page
- rule flyout on the Upgrade tab of the rules table
- rule upgrade flyout on Rule Details page
Works as expected.
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
Page load bundle
History
cc @tkajtoch |
…3806) ~~Depends on elastic/eui#8982 ~~Depends on elastic/eui#9202 ~~Depends on #245515 This PR enhances the core UX offerings in Kibana with `core.overlays.openSystemFlyout`. ### `core.overlays.openSystemFlyout` Opens a system flyout that integrates with the EUI Flyout Manager. Using a mount point would break the context propogation of the EUI Flyout Manager, so this method accepts React elements directly rather than `toMountPoint`. ```typescript import React, { useRef } from 'react'; import { EuiFlyoutBody, EuiFlyoutFooter, EuiText, EuiButton, EuiButtonEmpty, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import type { OverlayRef } from '@kbn/core-mount-utils-browser'; // Create a component or function that opens the system flyout const openMySystemFlyout = (overlays) => { const flyoutRef = useRef<OverlayRef | null>(null); const handleClose = () => { if (flyoutRef.current) { flyoutRef.current.close(); } }; const FlyoutContent = () => ( <> <EuiFlyoutBody> <EuiText> <p>This is a system flyout that integrates with EUI Flyout Manager.</p> <p>The header is automatically created from the title option.</p> </EuiText> </EuiFlyoutBody> <EuiFlyoutFooter> <EuiFlexGroup justifyContent="spaceBetween"> <EuiFlexItem grow={false}> <EuiButtonEmpty onClick={handleClose}> Cancel </EuiButtonEmpty> </EuiFlexItem> <EuiFlexItem grow={false}> <EuiButton onClick={() => console.log('Save')} fill> Save </EuiButton> </EuiFlexItem> </EuiFlexGroup> </EuiFlyoutFooter> </> ); flyoutRef.current = overlays.openSystemFlyout(<FlyoutContent />, { title: 'My System Flyout', type: 'overlay', size: 'm', maxWidth: 600, ownFocus: false, onClose: () => { console.log('System flyout closed'); flyoutRef.current = null; }, onActive: () => { console.log('System flyout became active'); }, }); return flyoutRef.current; }; // Open the flyout const flyoutRef = openMySystemFlyout(overlays); // Close the flyout programmatically from outside flyoutRef.close(); ``` The developer README for the Flyout System is [here](https://github.com/elastic/eui/blob/feat/flyout-system/packages/eui/src/components/flyout/README.md). ### Example plugin Along with the new service and documentation changes, a new example plugin for developers is provided that shows different integration patterns for the EUI flyout system. **Screenshot of example plugin:** <img width="1327" height="836" alt="image" src="https://github.com/user-attachments/assets/9664f0cb-f793-4a8c-8a96-c46d069756dd" /> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Ania Kowalska <ania.kowalska@elastic.co> Co-authored-by: Lene Gadewoll <lene.gadewoll@elastic.co> Co-authored-by: Weronika Olejniczak <weronika.olejniczak@elastic.co> Co-authored-by: Jorge Oliveira <jorge.oliveira@elastic.co> Co-authored-by: Tomasz Kajtoch <tomasz.kajtoch@elastic.co> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…stic#233806) ~~Depends on elastic/eui#8982 ~~Depends on elastic/eui#9202 ~~Depends on elastic#245515 This PR enhances the core UX offerings in Kibana with `core.overlays.openSystemFlyout`. ### `core.overlays.openSystemFlyout` Opens a system flyout that integrates with the EUI Flyout Manager. Using a mount point would break the context propogation of the EUI Flyout Manager, so this method accepts React elements directly rather than `toMountPoint`. ```typescript import React, { useRef } from 'react'; import { EuiFlyoutBody, EuiFlyoutFooter, EuiText, EuiButton, EuiButtonEmpty, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import type { OverlayRef } from '@kbn/core-mount-utils-browser'; // Create a component or function that opens the system flyout const openMySystemFlyout = (overlays) => { const flyoutRef = useRef<OverlayRef | null>(null); const handleClose = () => { if (flyoutRef.current) { flyoutRef.current.close(); } }; const FlyoutContent = () => ( <> <EuiFlyoutBody> <EuiText> <p>This is a system flyout that integrates with EUI Flyout Manager.</p> <p>The header is automatically created from the title option.</p> </EuiText> </EuiFlyoutBody> <EuiFlyoutFooter> <EuiFlexGroup justifyContent="spaceBetween"> <EuiFlexItem grow={false}> <EuiButtonEmpty onClick={handleClose}> Cancel </EuiButtonEmpty> </EuiFlexItem> <EuiFlexItem grow={false}> <EuiButton onClick={() => console.log('Save')} fill> Save </EuiButton> </EuiFlexItem> </EuiFlexGroup> </EuiFlyoutFooter> </> ); flyoutRef.current = overlays.openSystemFlyout(<FlyoutContent />, { title: 'My System Flyout', type: 'overlay', size: 'm', maxWidth: 600, ownFocus: false, onClose: () => { console.log('System flyout closed'); flyoutRef.current = null; }, onActive: () => { console.log('System flyout became active'); }, }); return flyoutRef.current; }; // Open the flyout const flyoutRef = openMySystemFlyout(overlays); // Close the flyout programmatically from outside flyoutRef.close(); ``` The developer README for the Flyout System is [here](https://github.com/elastic/eui/blob/feat/flyout-system/packages/eui/src/components/flyout/README.md). ### Example plugin Along with the new service and documentation changes, a new example plugin for developers is provided that shows different integration patterns for the EUI flyout system. **Screenshot of example plugin:** <img width="1327" height="836" alt="image" src="https://github.com/user-attachments/assets/9664f0cb-f793-4a8c-8a96-c46d069756dd" /> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Ania Kowalska <ania.kowalska@elastic.co> Co-authored-by: Lene Gadewoll <lene.gadewoll@elastic.co> Co-authored-by: Weronika Olejniczak <weronika.olejniczak@elastic.co> Co-authored-by: Jorge Oliveira <jorge.oliveira@elastic.co> Co-authored-by: Tomasz Kajtoch <tomasz.kajtoch@elastic.co> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Summary
This EUI upgrade brings the new Flyout System. While all of the changes we made are opt-in, we did have to update the DOM nesting in
EuiFlyoutandEuiFlyoutResizable. This change includes making overlay masks a sibling of flyouts, rather than wrapping the flyouts as children, which required internal changes to the mask's z-index value. Following @tsullivan request, please run through your UIs and make sure the flyouts render as expected, especially in the areas where you override EuiFlyout styles.Dependency updates
@elastic/eui:v110.0.0⏩v111.0.0@elastic/eui-theme-borealis:v5.1.0⏩v5.2.0Changes
z-indexoverrides from various places across Kibana. The updated EuiFlyout logic calculatesz-indexvalues dynamically based on the order of opening flyouts, making the manual overrides unnecessary.EuiFlyoutandEuiFlyoutResizablePackage updates
@elastic/euiv111.0.0session="start"to EuiFlyout. Check out the documentation to learn more.hasChildBackgroundboolean prop (defaults to false) toEuiFlyout(#9056)EuiFlyoutwith newonActivecallback and enable stack managed history controls. (#9003)EuiFlyoutMenuwith new prophistoryItemsand refactored props for back button. (#9003)resizable(boolean) prop toEuiFlyout. Resizability can now be controlled dynamically without the need to useEuiFlyoutResizable. (#8999)EuiFlyoutMenucomponent that provides a standardized top menu bar for flyouts. (#8851)Breaking changes
@elastic/eui-theme-borealisv5.2.0euiAnimSlightResistancefor a smoother animation (#9202)