Description
(chris edit: added screenshot and "Related issues" and "Implementation" sections)
When a channel message appears in a multi-channel narrow (like the combined feed), the recipient header has the channel name as well as topic.
Expected: Tapping anywhere in the channel part of the header (highlighted below) should lead to the channel narrow:

Actual: Tapping directly on the text of the channel name leads to the channel narrow. But tapping slightly above or below leads instead to the topic narrow.
Related issues
This will also be relevant for the channel action sheet, which will be offered on long-press in this area:
- UI for channel muting/unmuting #347
- UI for channel subscription settings other than muted/unmuted #1223
- Offer subscribe/unsubscribe in channel action sheet #1224
- Offer "Mark channel as read" in channel action sheet #1226
- Offer "Copy link to channel" in channel action sheet #1227
Implementation
I believe the bug can be fixed by adding a line to the relevant GestureDetector
:
diff --git lib/widgets/message_list.dart lib/widgets/message_list.dart
index 48c0d70b5..7d51d6fbd 100644
--- lib/widgets/message_list.dart
+++ lib/widgets/message_list.dart
@@ -1080,6 +1080,7 @@ class StreamMessageRecipientHeader extends StatelessWidget {
?? zulipLocalizations.unknownChannelName; // TODO(log)
streamWidget = GestureDetector(
+ behavior: HitTestBehavior.opaque,
onTap: () => Navigator.push(context,
MessageListPage.buildRoute(context: context,
narrow: ChannelNarrow(message.streamId))),
We also need a widget test for the fix; we won't merge a PR without this. The test should pass after the fix and fail before the fix.
Metadata
Metadata
Assignees
Type
Projects
Status
No status