You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor Redbox, Logbox, and DevLoadingView as Sheets (#2151)
* fix(iOS): adjust RCTRedBox to work for iPad and support orientation changes (facebook#41217)
Summary:
When opening `RCTRedBox` on an iPad (and also visionOS) there was an issue with buttons width going out of screen. When changing screen orientation, RedBox wasn't recalculating view positions.
**Root cause**: Getting frame of root view to display this modal and basing all calculations on it.
**Solution**: Use Auto Layout to build UI that responds to orientation changes and device specific modal presentation.
I've also tested it with adding custom buttons to RedBox and it works properly.
[IOS] [FIXED] - adjust RCTRedBox to work for iPad and support orientation changes
Pull Request resolved: facebook#41217
Test Plan:
Launch the app without metro running and check out RedBox that's shown there. Also change screen orientation to see proper recalculation of view positions.
https://github.com/facebook/react-native/assets/52801365/892dcfe7-246f-4f36-be37-12c139c207achttps://github.com/facebook/react-native/assets/52801365/dfd0c3d8-5997-462d-97ec-dcc3de452e26
Reviewed By: GijsWeterings
Differential Revision: D50734569
Pulled By: javache
fbshipit-source-id: 51b854a47caf90ae46fcd32c4adcc64ec2ceb63f
* refactor: use less verbose API for RCTRedBox constraints (facebook#42261)
Summary:
This PR is a continuation of my previous PR where I refactored RCTRedBox to use Auto Layout (facebook#41217). This PR uses less verbose API for defining constraints.
## Changelog:
[IOS] [CHANGED] - use less verbose Auto Layout API for RCTRedBox constraints
Pull Request resolved: facebook#42261
Test Plan:
Launch the app without metro enabled to see the RCTRedBox


Reviewed By: NickGerleman
Differential Revision: D52730458
Pulled By: javache
fbshipit-source-id: dc7227e7b6e3238c195342cb0460850b57eb75c3
* refactor Redbox on macOS and present as a sheet
* present RCTDevLoadingView as a sheet
* refactor Logbox and present as a sheet
* change RCTRootView.loadingView to RCTPlatformView
* update Podfile.lock
* PR feedback
---------
Co-authored-by: Oskar Kwaśniewski <[email protected]>
0 commit comments