fix(android): menu icons take taps #20802
main fromrefs/pull/20802/head·merged by juliusmarminge View on GitHubOn Android, tapping the icon in a menu row did nothing. That includes a submenu's Back arrow, a row's chevron, and the check mark. Only taps on the row's text worked.
Each icon is a React Native view hosted inside the Compose menu row. @expo/ui's host view consumes every touch over its bounds (TouchDispatchingRootViewGroup.onTouchEvent always returns true), so the row's onClick never sees a tap on the glyph. The icon is now a Pressable that runs the same action as its row. It stays hidden from accessibility and from keyboard and D-pad focus, so the row remains the only focusable element, and it is inert when the row is disabled.
Patching the host view to pass touches through would change every RNHostView in the app, so the fix stays local to the menu.
Split out of #19987 by @PixPMusic, who found the bug and the fix on device. That PR is being rebuilt as smaller PRs.
Verification: mobile typecheck and lint pass. Two reviewers (Opus and Sol, two rounds) traced the touch path for both the popup and inline menus. Not yet checked on a device:
- Tap a submenu's Back arrow glyph: returns to the root menu, once.
- Tap a row's chevron glyph: opens its submenu. Tap a check mark: toggles the row.
- A disabled row's icon does nothing.
🤖 Generated with Claude Code
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
Approvability#
Verdict: Approved at
61458aaMacroscope's review found this PR approvable — This is a narrowly scoped Android UI bug fix that routes icon taps to the menu actions already used by the surrounding rows while preserving disabled and accessibility behavior. It introduces no new capability, schema, deployment, security, billing, or static-analysis changes.
Notes:
- Diff unchanged. Approvability was decided on eligibility alone.
juliusmarminge added labelsmacroscope-review
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Team
- Run ID:
61603f12-f724-4f19-a93e-517426ed36ce
📥 Commits
-
Reviewing files that changed from the base of the PR and between 144aae4d4ecd4f1ba803f7b75cfc9379b4f44957 and 61458aa1acc7455e818179fefe568c4f3cafc693.
📒 Files selected for processing: 1
-
apps/mobile/src/components/ui/MenuPopup.android.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.
-
📝 Walkthrough
-
On Android, menu icons now use pressable controls and invoke their associated back or action callbacks. The controls are excluded from accessibility and focus, and disabled icons remain disabled.
Changes: Android menu interactions
Layer / File(s) Summary Pressable icons and action callbacks
apps/mobile/src/components/ui/MenuPopup.android.tsxMenuIconuses aPressableand accepts a callback. The back icon, action icon, submenu chevron, and checked icon invoke their associated callbacks. Disabled state applies to the submenu chevron and checked icon.Priority: ⬇️ Low
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Low
Suggested reviewers:
maria-rcks
Merge Risk: ⚪ Minimal · up to
61458-
No concrete merge-blocking issue is established. Disabled menu actions remain inert; the Android touch behavior still needs the usual device verification.
Pre-merge checks:
4-
Check name Status Explanation Title check The title is concise, uses the repository's conventional commit format, and clearly describes the Android menu icon tap fix. Description check The description clearly explains the problem, technical cause, local fix, scope, and verification status. It identifies the remaining device checks, although it does not include the template-requested… Linked Issues check Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Check skipped because no linked issues were found for this pull request. Full details: Description check
-
Explanation
The description clearly explains the problem, technical cause, local fix, scope, and verification status. It identifies the remaining device checks, although it does not include the template-requested UI screenshots.
-
✨ Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
-
juliusmarminge merged this23a5c77
juliusmarminge closed this
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed