-
Notifications
You must be signed in to change notification settings - Fork 862
Restore Flyout System feature in EUI #9178
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
Open
tsullivan
wants to merge
8
commits into
elastic:feat/flyout-system
Choose a base branch
from
tsullivan:feat/flyout-system-ii
base: feat/flyout-system
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Restore Flyout System feature in EUI #9178
tsullivan
wants to merge
8
commits into
elastic:feat/flyout-system
from
tsullivan:feat/flyout-system-ii
Conversation
This file contains hidden or 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
Co-authored-by: Clint Andrew Hall <[email protected]> Co-authored-by: Weronika Olejniczak <[email protected]> Co-authored-by: Tomasz Kajtoch <[email protected]> Co-authored-by: Arturo Castillo Delgado <[email protected]> Co-authored-by: Paulina Shakirova <[email protected]>
14 tasks
Resize listener always runs, but expensive layout calculations only run when needed.
3e0d623 to
fe52040
Compare
e966888 to
34690cd
Compare
This was referenced Nov 6, 2025
14 tasks
Collaborator
💚 Build SucceededHistory
|
Collaborator
💚 Build Succeeded
History
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Closes #9173
Re-closes https://github.com/elastic/kibana-team/issues/2060
The EUI Flyout System was reverted a short time ago because of a blocking performance issue. This PR restores the feature and introduces a fix for the performance bug. The details of the performance bug fix are below.
This fix can be tested in a Kibana draft PR: elastic/kibana#233806.
Run
gh pr checkout 233806Why are we making this change?
Restoring a feature that had to be temporarily pulled out of EUI, and including a performance fix to resolve the issue that caused it to be reverted.
Performance improvement #
The previous implementation had inefficient code for adding the window resize event listeners: there was a circular dependency problem in
src/components/flyout/manager/layout_mode.ts:windowWidthstate variableuseEffectrecalculates the layout mode and calls the reducersetModeaction, which updates the Flyout Manger's statesetModewould be re-created because it depends oncontextsetMode, theuseEffecttriggers again and performs the layout mode calculation: this is a return back to Step 2 -> INFINITE LOOPThe fix was to refactor code to depend on stable references rather than the entire context. Primarily: the
setModecallback now just depends ondispatch, which never changes. Secondarily, the largeuseEffectwas broken up to re-run only when the specific values we care about are changed.page becomes unresponsive after brief window resizing:
page stays responsive after extensive window resizing:
NOTE: after the fix, when testing in Kibana, we still see the "JS Event Listeners" metric go up in Kibana after window resize, but this doesn't happen when testing the EUI storybook in isolation.
Screenshots #
The original EUI Flyout System screenshots can be found in #9068 (comment)
Impact to users
The original "Impact to users" and description of the breaking change can be found in #9068 (comment)
QA
Remove or strikethrough items that do not apply to your PR.
General checklist
Browser QA[ ] Checked in both light and dark modes[ ] Checked in both MacOS and Windows high contrast modes(emulate forced colors if you do not have access to a Windows machine.)[ ] Checked in mobile[ ] Checked in Chrome, Safari, Edge, and Firefox[ ] Checked for accessibility including keyboard-only and screenreader modesDocs site QA[ ] Added documentation[ ] Props have proper autodocs (using@defaultif default values are missing) and playground toggles[ ] Checked Code Sandbox works for any docs examples[ ] Updated visual regression testsRelease checklist[ ] A changelog entry exists and is marked appropriately[ ] If applicable, added the breaking change issue label (and filled out the breaking change checklist)[ ] If the changes unblock an issue in a different repo, smoke tested carefully (see Testing EUI features in Kibana ahead of time)Designer checklist[ ] If applicable, file an issue to update EUI's Figma library with any corresponding UI changes. (This is an internal repo, if you are external to Elastic, ask a maintainer to submit this request)