-
Notifications
You must be signed in to change notification settings - Fork 841
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
Add EuiWindowProvider for multi-window support #7782
base: main
Are you sure you want to change the base?
Conversation
💚 CLA has been signed |
👋 Since this is a community submitted pull request, a Buildkite build has not been started automatically. Would an Elastic organization member please verify the contents of this pull request and kick off a build manually? |
👋 Hey there. This PR hasn't had any activity for 90 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment. |
❌ We're automatically closing this PR due to lack of activity. Please comment if you feel this was done in error. |
Please reopen - I'm still working on fixes and now it's in better state than before with many bugs fixed. |
Re-opening! Apologies @stil, we hadn't even realized this PR was in the queue - we don't get automatically pinged/notified for draft PRs unless they open. |
👋 Since this is a community submitted pull request, a Buildkite build has not been started automatically. Would an Elastic organization member please verify the contents of this pull request and kick off a build manually? |
buildkite test this |
As a heads up you will need to sign the Elastic CLA with the email address associated with the git commits (use |
💚 Build Succeeded
|
@stil Any update on signing https://www.elastic.co/contributor-agreement? We cannot move forward with merging this in without it signed with the emails associated with the commits in this PR, unfortunately. |
Sorry I thought you receive a notification when signed. I have already signed the agreement. |
I'll complete rest of the steps by the end of week and mark it for review. |
Current status:
My suggestion would be to wait a bit for the 3rd party libs MRs to be merged and released, without these we cannot really merge this MR as the behavior is a bit buggy. When third party libs are fixed, I'm going to:
Anyway in the current state, the fixes for EUI, react-focus-on and react-style-singleton work great in my usecase even though it was a bit painful to track bugs across the libraries 😅 |
Summary
Closes #7778
The main idea in this PR is to enable multi-windowed React development with EUI, for example in Electron.
The change is purely bug-fixing and does not introduce any UI changes.
I want to enable multi-windowed support by using React Portals to render into different DOM windows.
The problem is that, in many places, EUI operates on global
window
ordocument
object which I aim to fix.It's not a completely novel idea, something similar can be found in FluentUI: https://github.com/microsoft/fluentui/tree/master/packages/react-window-provider
New
<EuiWindowProvider>
component is exposing current window object for its children elements.I'm marking it as draft so early-on you can have a look what's inside and perhaps immediately tell that it's not going to be merged, then I'll continue work internally.
The change is completely backwards compatible and does not introduce any behavior or UI changes.
The most important is that with these changes Flyouts work in child windows!
Let me know wheter this is something you'd consider at all for merging (assuming that all potential issues with PR are fixed).
QA
General checklist
Checked in both light and dark modesChecked in mobileChecked in Chrome, Safari, Edge, and FirefoxChecked for accessibility including keyboard-only and screenreader modes@default
if default values are missing) and playground togglesIf applicable, added the breaking change issue label (and filled out the breaking change checklist)Updated the Figma library counterpart