Repository navigation
Commit 3c04ce7
authored
Remove RNTester's bottom padding under the iPad's floating tab bar
## Summary:
On iPad a floating tab bar along the top replaces the bottom tab bar. RNTester's tabs still counted the replaced bar as a bottom bar, because it is not hidden and keeps a full-width frame at the bottom edge (`{{0, 1312}, {1032, 64}}` on an iPad Pro 13-inch). The content got the 65-point bottom inset meant to clear a bottom bar, which example pages use as bottom padding, so each ended with 65 points of empty space. The home list is unaffected either way: its footer is at least 80 points tall.
The replaced bar is not in a window, so this change counts a tab bar as a bottom bar only when it is in one. With no bottom bar the bottom inset is 0, not the iPad's 20-point bottom safe area, as it already is for the iPhone Duo's side tab bar. The top inset also leaves the bottom-bar branch, so it loses that branch's 50-point minimum.
## Changelog:
[INTERNAL] [FIXED] - Remove the bottom padding from RNTester's content on iPad
## Test Plan:
RNTester builds (Xcode 27.1). Run in Debug on an iPad Pro 13-inch (M5) and an iPhone 18 Pro simulator (iOS 27.0). A local UI test measures how far the Button example page's lowest text, scrolled to the end, sits above the bottom of the window:
- iPad: 158 points on `main`, 93 on this branch.
- iPhone: 176 points on both. Its tab bar is a bottom bar, and the content still ends above it.
The home list's last row is at y = 1291 in a 1376-point window on both builds, so the change of top inset does not move the layout. A local log in `tabSafeAreaInsetsDidChange` shows the iPad's `tabBar.window` is nil in every call.
Differential Revision: D135070384
Pull Request resolved: #603701 parent e72be4b commit 3c04ce7
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
221 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
222 | 223 | | |
223 | 224 | | |
224 | 225 | | |
| |||
0 commit comments