[Fabric] Get Modal to host RN components in new hwnd
Description
Adds a very basic Modal that can host UI.
Limitations:
- Modal has a default height/width of 500px
- Modal is still missing onDismiss/onShow events
- Need to implement closing Modal with window's "X" button
Screenshot
Modal in rnTester
Another question, I don't see anything in here that actually disables the outer window. So, this isn't really a modal dialog at all, but just a window? This probably needs more thought too.
We likely need some kind of notification back to the app so that they can disable any other windows that they own if they want to.
Another question, I don't see anything in here that actually disables the outer window. So, this isn't really a modal dialog at all, but just a window? This probably needs more thought too.
We likely need some kind of notification back to the app so that they can disable any other windows that they own if they want to.
My memory from when we looked at the RN core expectations around Modal is that it's not a true modal in that sense. It's just a layering mechanism. I think for deep Win32 clients there is more we can/should do here. But for a first pass on compatibility with the cross-platform expectation... UI in another window is the bar?
@acoates-ms should be ready for another review! I added some updated screenshot to the PR description and listed out some future work for Modal. Let me know what you think!
For the modal sizing, I was thinking more along the lines of where we would control the size of the modal dialog window based on the size of the content within the dialog.
See m_sizeToContent in Playground-Composition.cpp. (You can turn on this mode in the settings dialog of the playground app). Having said that, it maybe that we need both options. Providing an initial size on the show modal call, and having an option to instead size the modal based on content.
We can probably hold off on doing the 2nd on for an initial checkin.