Open message actions menu on poll option long-press#6494
Conversation
|
@CodeRabbit review |
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
✅ Action performedReview finished.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThis PR implements long-press gesture forwarding for poll options by introducing a ChangesLong-Press Gesture Forwarding Pipeline
Sequence DiagramsequenceDiagram
participant User
participant PollOption as PollOptionVotingRow
participant Handler as combinedClickable
participant Local as LocalMessageOnLongClick
participant Actions as MessageRowActions
User->>Handler: Single tap
Handler->>PollOption: Toggle vote
Note over PollOption: State updated, vote recorded
User->>Handler: Long-press
Handler->>Local: Get long-click callback
Local->>Actions: Invoke messageOnLongClick
Note over Actions: Open message action menu
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
SDK Size Comparison 📏
|
|


Goal
Long-press on a poll option now opens the message actions menu, the same as long-press anywhere else on the message row.
Resolves AND-1220.
Implementation
MessageContainerexposes its long-press handler to descendants through a newLocalMessageOnLongClickCompositionLocal — provided when the message supports actions,nullotherwise.PollOptionVotingRowswaps thetoggleablemodifier forcombinedClickable. The newonLongClickreadsLocalMessageOnLongClick.currentso TalkBack's double-tap-and-hold opens the message actions menu instead of being intercepted by the toggle. Thetoggleable's "checked" / "not checked" announce is restored via an explicittoggleableStatesemantic.Testing
With TalkBack enabled:
Without TalkBack:
Summary by CodeRabbit
Release Notes
New Features
Improvements