Skip to content

Remove RNTester's bottom padding under the iPad's floating tab bar - #60370

Merged
meta-codesync[bot] merged 1 commit into
react:mainfrom
expo:@ide/rntester-ipad-tab-bottom-inset
Nov 30, 2026
Merged

meta-codesync[bot] merged 1 commit into
react:mainfrom
expo:@ide/rntester-ipad-tab-bottom-inset

Conversation

@ide

@ide ide commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

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.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 28, 2026
@ide
ide force-pushed the @ide/rntester-ipad-tab-bottom-inset branch from dd903e4 to 419f93b Compare November 29, 2026 12:02
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, so the
content got the 65-point bottom inset, and each example page ended with
65 points of empty space.

The replaced bar is not in a window, so only count a tab bar that is.
The top inset no longer gets the bottom-bar minimum there either.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@ide
ide force-pushed the @ide/rntester-ipad-tab-bottom-inset branch from 419f93b to 501f9be Compare November 29, 2026 12:56
@ide
ide marked this pull request as ready for review November 29, 2026 13:49
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Nov 29, 2026

@chrfalch chrfalch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tabBar.window != nil check looks like the right signal for the replaced bar. Two requests:

1. Split view, Slide Over and rotation. In a compact-width window (for example half the screen in split view, or Slide Over), iPadOS brings the bottom tab bar back, so the 65-point inset has to come back with it. That depends on tabSafeAreaInsetsDidChange running at that moment and seeing the bar in a window. Could you check by hand: resize into split view and back, open in Slide Over, and rotate. The bottom inset should follow the bar each time.

2. Screenshots. The iPad case reproduces on every launch on the iPad Pro 13-inch simulator. Before/after screenshots of the end of an example page such as Button (158 vs 93 points above the bottom) would make the fix easy to see.

With those covered, this looks good and can be approved.

@meta-codesync

meta-codesync Bot commented Nov 30, 2026

Copy link
Copy Markdown

@javache has imported this pull request. If you are a Meta employee, you can view this in D135070384.

@christophpurrer christophpurrer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

@meta-codesync
meta-codesync Bot merged commit 3c04ce7 into react:main Nov 30, 2026
103 checks passed
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @ide in 3c04ce7

When will my fix make it into a release? | How to file a pick request?

@react-native-bot react-native-bot added the Merged This PR has been merged. label Nov 30, 2026
@ide
ide deleted the @ide/rntester-ipad-tab-bottom-inset branch December 1, 2026 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants