fix(android-navigation): restore hidden-tab bottom touches - #552
Conversation
|
The layout part of this patch addresses the same root cause as upstream callstack/react-native-bottom-tabs#557, with an existing fix in #558 (and the related startup-size fix in #556). Could we align the overlapping layout change directly with upstream #558, and keep only the Cherry-specific addition on top? In particular, #558 keeps the container listener and has both it and the The Using "upstream #558 patch + the minimal pointer-events addition" would make the behavior and provenance clearer, and make this pnpm patch easier to remove once the upstream fix ships. |
…v02' into codex/android-bottom-chrome-touch-v02
|
Thanks — addressed in the latest revision. I realigned the layout portion with upstream callstack/react-native-bottom-tabs#558:
The only Cherry-specific behavior left on top is the Validation completed with the 3 patch-guard tests, Thanks for pointing out the upstream alignment — the patch should now be much easier to compare with and eventually remove in favor of upstream. |
Summary
react-native-bottom-tabs@1.4.0on Android so hidden tab scenes report thelayoutHoldersize after layoutRoot cause
On Android, hiding the native Material bottom bar sets it to
GONE, but the view and its tab items retain their previous bounds. React Native'sTouchTargetHelpertraverses native children in reverse order and does not exclude a regular native view solely from Android visibility, so the hidden tab item subtree could win touch targeting over visible React controls at the bottom of the selected scene.The patch makes the native bar implement
ReactPointerEventsView: it returnsAUTOwhile visible andNONEwhile hidden. It also reports actual holder layout changes instead of deduplicating on the unchanged root view size.User impact
Validation
Freshly run after applying the two commits to the latest
v0.2:pnpm typecheck:appoxfmt --checkpnpm packages:build./android/gradlew -p android :app:compileDebugKotlinThe identical native patch was also regression-tested on the
Cherry_API_36Android emulator at 1080x2400. The message selection button remained at(32,2221)-(216,2342), and a tap at(124,2282)changed the state from “select all / delete disabled” to 18 selected items / delete enabled. Assistant selection, Provider model pull/detail, Assistant detail, hide/show transitions, process relaunch, and all five visible native tabs also passed. No MCP instance was created for testing.Scope
This branch is based directly on the latest
v0.2; it has no dependency on #518. The bottom white/background styling is intentionally unchanged.