Repository navigation
Conversation
cipolleschi
left a comment
There was a problem hiding this comment.
left some questions and nits
| // UIAlertController on iOS 27.1. | ||
| static CGFloat RCTDevLoadingViewAlertCenterOffset(UIEdgeInsets safeAreaInsets) | ||
| { | ||
| return 0.2818 * (safeAreaInsets.left - safeAreaInsets.right) / 2; |
There was a problem hiding this comment.
what is this number?? it is oddly specific! xD
Also, safeAreaInsets.left - safeAreaInsets.right in most case will end up being 0... Problably only for the Duo it does return something that is not 0.
| ((RCTDevLoadingWindow *)self->_window).layoutHandler = ^{ | ||
| [weakSelf _updatePlacementAnimated:NO]; | ||
| }; |
There was a problem hiding this comment.
rather then this ugly casting.. can we create the right window in a variable at line 211:
RCTDevLoadingWindow * devLoadingWindow = windowScene != nil ? [[RCTDevLoadingWindow alloc] initWithWindowScene:windowScene]
: [[RCTDevLoadingWindow alloc] init];
self->_window = devLoadingWindowso that here we only have to:
devLoadingWindow.layoutHandler = ^{
[weakSelf _updatePlacementAnimated:NO];
};|
Thanks Riccardo ❤️ Let me see how I can tidy those bits up :) There's a fair amount of new positioning logic but I hope it's basically agent-maintainable in this age. Basically commented sections / encapsulated in the Duo-related preprocessor flag blocks where we progressively enhance. Will probably reuse this logic too for an equivalent touch-up to the Paused Debugger overlay. |
Summary
The dev loading banner spans the full width under the status bar. On iPhone Duo it collides with the rail and camera cutout, and it straddles the hinge when the device is partly folded.
On top of wider out-of-tree platform support since it was created (desktop, iPad, visionOS and more), this UI component was due a visual refresh.
This diff
Redesigns
<DevLoadingView>as a floating pill at the center-top of the screen.Key changes:
iPhone Duo platform nuances:
Why so much attention?
These updates + details help reinforce that React Native is maintained and high quality, and supports the iOS platform completely. Delighting the user (e.g. avoiding the iPhone Duo hinge like other system elements) is a goal.
Changelog:
[iOS][Changed] - Dev loading banner: Redesign in-app Loading/Fast Refresh banner
Test Plan
App states, iPhone 18 Pro
Note: This is RNTester's non-native header — regular headers sit a bit lower and generally align a bit better with the loading view vertically.
Disconnected
(Largest existing variant, stays visible until dismissed)
🎬 End to end app load, Fast Refresh
ios-pill-e2e-load-refresh-3.mov
🎬 Dynamic fold avoidance, iPhone Duo
Screen.Recording.2026-10-05.at.20.50.31.mov