Skip to content

Conversation

@tsullivan
Copy link
Member

@tsullivan tsullivan commented Nov 11, 2025

Summary

This fix makes push padding conditional for managed push flyouts: padding is only applied when the flyout is active in its session. When a flyout becomes active, it updates push padding data in the Flyout Manager's state. When a flyout becomes inactive, it explicitly clears the padding.

Unmanaged push flyouts continue to behave as before, always applying padding.

Why are we making this change?

Closes #9159

Screenshots #

  • Before

    push padding fix - before

  • After

    push padding fix - after

Impact to users

Higher quality UX when multiple flyout sessions are used and they are configured differently.

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
    • Checked in mobile
    • Checked in Chrome, Safari, Edge, and Firefox
    • Checked for accessibility including keyboard-only and screenreader modes
  • Docs site QA
  • Code quality checklist
  • Release 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)

@tsullivan tsullivan changed the title Flyout system/fix overlay subsequent [Flyout System] Ensure the push padding for managed flyout does not remain Nov 11, 2025
@tsullivan tsullivan changed the title [Flyout System] Ensure the push padding for managed flyout does not remain [Flyout System] Ensure the push padding for managed flyout does not remain for subsequent non-push flyouts Nov 11, 2025
* before child components render. This prevents RemoveScrollBar from measuring the body
* in an inconsistent state during flyout transitions.
*/
useLayoutEffect(() => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving the padding logic into useLayoutEffect ensures the body is updated before paint and before any measurement by scroll-lock utilities

const managerSide = side === 'left' ? 'left' : 'right';

// EUI doesn't use this css variable, but it is useful for consumers
if (shouldApplyPadding) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code inside the if and else handle where padding should be set or cleared based on a push flyout being active in its session

@tsullivan tsullivan marked this pull request as ready for review November 11, 2025 20:36
@tsullivan tsullivan requested a review from a team as a code owner November 11, 2025 20:36
@tsullivan tsullivan added the skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation) label Nov 11, 2025
@tsullivan tsullivan changed the title [Flyout System] Ensure the push padding for managed flyout does not remain for subsequent non-push flyouts [Flyout System] Ensure the push padding for managed flyout does not remain for other session Nov 11, 2025
@tsullivan
Copy link
Member Author

/ci

@tkajtoch
Copy link
Member

Changes look good and work as expected. I see that the branch history is a bit broken - @tsullivan would you be able to discard the old merge commits and rebase/merge the latest feat/flyout-system?

@tsullivan tsullivan force-pushed the flyout-system/fix-overlay-subsequent branch from 416f2b2 to 1b725ae Compare November 13, 2025 19:16
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

Copy link
Member

@tkajtoch tkajtoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚢

@tsullivan tsullivan merged commit cbb5862 into elastic:feat/flyout-system Nov 13, 2025
4 checks passed
@tsullivan tsullivan deleted the flyout-system/fix-overlay-subsequent branch November 13, 2025 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants