[Flyout] use container as reference for pushMinBreakpoint#9592
Open
tsullivan wants to merge 9 commits intoelastic:mainfrom
Open
[Flyout] use container as reference for pushMinBreakpoint#9592tsullivan wants to merge 9 commits intoelastic:mainfrom
tsullivan wants to merge 9 commits intoelastic:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes EuiFlyout’s pushMinBreakpoint behavior so that when a container is provided, the decision to render in “push” vs “overlay” mode is based on the container width (not the viewport), aligning responsive behavior with the available in-container space.
Changes:
- Updated
useIsPushedto optionally compute breakpoint logic against a provided container element’s width (viaResizeObserver+ theme breakpoints). - Wired
containerElementintouseIsPushedfrom both unmanaged (EuiFlyoutComponent) and managed (EuiFlyoutMain) flyout entry points. - Added an upcoming changelog entry documenting the bug fix.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| packages/eui/src/components/flyout/manager/flyout_main.tsx | Uses manager container state as the reference for pushMinBreakpoint decisions in the managed main flyout wrapper. |
| packages/eui/src/components/flyout/hooks.ts | Extends useIsPushed to support container-width-based breakpoint evaluation and react to container resizes. |
| packages/eui/src/components/flyout/flyout.component.tsx | Passes the resolved flyout container element into useIsPushed so push/overlay behavior matches container sizing. |
| packages/eui/changelogs/upcoming/9592.md | Documents the pushMinBreakpoint container-scoped bug fix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…h already computed by useApplyFlyoutLayoutMode
Collaborator
💚 Build SucceededHistory
|
Collaborator
💚 Build Succeeded
History
|
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
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
Bug fix for EuiFlyout
pushMinBreakpointwhencontainerprop is provided.Addresses elastic/kibana#258828
Fix: "push" type
EuiFlyouthaspushMinBreakpointlogic. This changes the type tooverlaywhen the viewport size is below a given breakpoint. Typically, that breakpoint is measured against the browser viewport. When thecontainerprop is passed toEuiFlyout, the breakpoint should be measured against the dimensions of the given container.API Changes
containeris set, the push/overlay breakpoint decision is now based on the container's width instead of the viewport widthScreenshots
Setup:
resizable:falseownFocus:truetype:pushpushMinBreakpoint:mBefore
After
Impact Assessment
Note: Most PRs should be tested in Kibana to help gauge their Impact before merging.
[ ] 🔴 Breaking changes — What will break? How many usages in Kibana/Cloud UI are impacted?[ ] 🧪 Test impact — May break functional or snapshot tests (e.g., HTML structure, class names, default values).[ ] 🔧 Hard to integrate — If changes require substantial updates to Kibana, please stage the changes and link them here.Impact level: 🟢 None / 🟢 Low / 🟡 Moderate / 🔴 High
Impact explained: When a flyout has both type="push" and a container, the point at which it flips between push and overlay mode changes. Previously it was based on viewport width; now it's based on container width. Since containers are typically narrower than the viewport, the flyout will switch to overlay sooner (at wider viewport sizes) than before.
Release Readiness
[ ] Documentation: {link to docs page(s)}[ ] Figma: {link to Figma or issue}[ ] Migration guide: {steps or link, for breaking/visual changes or deprecations}[ ] Adoption plan (new features): {link to issue/doc or outline who will integrate this and where}QA instructions for reviewer
Checklist before marking Ready for Review
breaking changelabel (if applicable)Reviewer checklist