-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Fabric] Use PopupWindowSiteBridge for Modal when USE_EXPERIMENTAL_WINUI3 is true #14284
Conversation
// get the root hwnd | ||
m_prevWindowID = | ||
winrt::Microsoft::ReactNative::ReactCoreInjection::GetTopLevelWindowId(view.ReactContext().Properties()); | ||
|
||
m_parentHwnd = | ||
view.as<::Microsoft::ReactNative::Composition::Experimental::IComponentViewInterop>()->GetHwndForParenting(); | ||
|
||
#ifdef USE_EXPERIMENTAL_WINUI3 | ||
m_bridge = winrt::Microsoft::UI::Content::DesktopChildSiteBridge::Create( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I'm trying to understand what the DesktopChildSiteBridge "m_bridge" is for.
When USE_EXPERIMENTAL_WINUI3 is false: it looks like this is parented to the AppWindow's HWND, which is the new top-level HWND for the popup.
When USE_EXPERIMENTAL_WINUI3 is true: it looks like we parent this to the existing HWND, and don't hook up any content to it. I'm guessing we're doing this b/c it's the only way right now to create a PopupWindowSiteBridge.
is that correct? Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! It's currently the only way to create a PopupWindowSiteBridge, then I just used PopupWindowSiteBridge for the navigation host.
but I did realize I wasn't setting the TopLevelWindowID here, just fixed that!
vnext/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp
Outdated
Show resolved
Hide resolved
…NUI3 is true (microsoft#14284) * add modal implementation with PopupWindowSiteBridge * Change files * add conditional * feedback
… factor (#14318) * Fix crash when currently focused element gets marked as enableFocusRing=false (#14306) * Fix crash when currently focused element gets marked as enableFocusRing=false * Change files * [Fabric] Use PopupWindowSiteBridge for Modal when USE_EXPERIMENTAL_WINUI3 is true (#14284) * add modal implementation with PopupWindowSiteBridge * Change files * add conditional * feedback * Initial support for UIA and tab navigation for a child Island (#14305) * Basic support for stitching the UIA tree for a ContentIslandComponentView's child * Updated comment * Change files * Support shift+tab, and move Automation event handlers to ContentIslandComponentView * Allow portals to have independent layout constraints and scale factor (#14315) * Allow portals to have independent layout constraints and scale factor * format * change files * fix * Round Focus visuals by default, fix nudge rendering (#14312) * Round Focus visuals by default, fix nudge rendering * Change files * change files * fix * fix * fix --------- Co-authored-by: Tatiana Kapos <[email protected]> Co-authored-by: JesseCol <[email protected]>
Description
Implements Modal using PopupWindowSiteBridge when USE_EXPERIMENTAL_WINUI3 is true
Type of Change
Why
ADO Deliverable 54612062
What
Changes Modal to use PopupWindowSiteBridge when USE_EXPERIMENTAL_WINUI3 is set to true. Also fixed an error in ReactNativeIsland where when closing a Modal, it would unmount the actual rootView instead of modal's rootView due to an extra call in m_islandDisconnectedToken.
Screenshots
Playground-composition_R25E8qPsLx.mp4
Testing
tested locally
Changelog
no
Microsoft Reviewers: Open in CodeFlow