Skip to content

Conversation

@tsullivan
Copy link
Member

Summary

Closes #9173

Fix infinite recursion and performance issues in flyout layout mode hook

  • Only attach resize listener when child flyout is present
  • Extract specific context values instead of depending on entire context object
  • Refactor calculation logic using useMemo for better separation of concerns
  • Add new tests

This fix can be tested in a Kibana draft PR: elastic/kibana#233806. Run gh pr checkout 233806

Why are we making this change?

Resolve a blocker issue in EUI main.

Screenshots #

Impact to users

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)

Only attach resize listener when child flyout is present and fix circular dependency by extracting specific context values instead of depending on entire context object.
Add unit tests to verify resize listener is only attached when child flyout is present, preventing unnecessary event handlers and performance issues.
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

@elasticmachine
Copy link
Collaborator

💔 Build Failed

Failed CI Steps

@tsullivan
Copy link
Member Author

Closing in favor of #9178

@tsullivan tsullivan closed this Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Flyout System] Resizing the viewport to switch layout mode mode freezes the whole tab

2 participants