Fix #5152: respect bottom safe area for picker BELOW_SPINNER buttons#5156
Merged
Conversation
The lightweight picker popup is anchored to the bottom of the screen, but nothing reserved the bottom safe-area inset. On devices with a home indicator (iPhone X family) the bottom-most row of the popup -- the BELOW_SPINNER custom buttons, or the spinner wheels when no such buttons exist -- was drawn underneath the home indicator and could activate it. Query the form safe area when building the popup and, when there is a bottom inset, add it as bottom padding. When BELOW_SPINNER buttons are present the padding goes on their bar so its background extends through the inset and the buttons stay tappable above it; otherwise it goes on the content pane so a plain picker also clears the indicator. Applied before the popup height is measured so it sizes and positions correctly, and guarded on a positive inset so non-notched devices are unaffected. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Cloudflare Preview
|
Collaborator
Author
|
Compared 122 screenshots: 122 matched. Native Android coverage
✅ Native Android screenshot tests passed. Native Android coverage
Benchmark ResultsDetailed Performance Metrics
|
Contributor
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
Collaborator
Author
|
Compared 122 screenshots: 122 matched. Benchmark Results
Detailed Performance Metrics
|
Collaborator
Author
|
Compared 86 screenshots: 86 matched. Benchmark Results
Build and Run Timing
|
Collaborator
Author
|
Compared 122 screenshots: 122 matched. Benchmark Results
Build and Run Timing
Detailed Performance Metrics
|
The bottom safe-area inset now shifts the lightweight picker popup (and its BELOW_SPINNER buttons) above the home indicator / gesture bar, so the Android and iOS UI-test references that exercise the picker change. Refreshed the new references from the CI actuals for the platforms that report a bottom inset: Android, iOS (GL) and iOS (Metal). mac-native and javascript report no inset, so their goldens are unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Fixes #5152. On devices with a home indicator (e.g. iPhone 15 Pro Max / iOS 26), buttons added to the lightweight picker popup with
LightweightPopupButtonPlacement.BELOW_SPINNERare drawn underneath the home indicator and can activate it.The popup (an
InteractionDialog) is anchored to the very bottom of the screen. Its content pane lays out as:SOUTHslot holds theBELOW_SPINNERbuttonsSo the bottom-most row of the popup is the
BELOW_SPINNERbutton bar, and nothing reserved the bottom safe-area inset for it.Fix
When building the popup, query
Form#getSafeArea()and, when there is a positive bottom inset, add it as bottom padding:BELOW_SPINNERbuttons — the padding goes on their bar, so the bar's background extends through the inset and the buttons remain tappable above the home indicator (the native iOS look, and what the reporter suggested).The inset is applied before the popup height is measured, so it sizes and positions correctly, and is guarded on
bottomInset > 0so non-notched devices/simulators are unaffected. A fresh popup is built on every open, so padding never accumulates.Testing
mvn -pl core compile -Plocal-dev-javase→ BUILD SUCCESS.Sheet. Not yet verified against a notched simulator skin / device — visual confirmation on device is welcome.🤖 Generated with Claude Code