Skip to content

combined feed: Tap behavior inconsistent in the channel portion of recipient headers #1368

Closed as duplicate of#1179
@chrisbobbe

Description

@chrisbobbe

When you tap anywhere in the channel part of a recipient header—

Image

it should take you to the channel feed. If your tap is in that area but not on the channel icon "#", the channel name, or the ">", then we actually take you to the page for the specific topic. That's confusing, because you meant to go to the channel.

This will also be relevant for the channel action sheet, which will be offered on long-press in this area:

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

No one assigned

    Labels

    a-msglistThe message-list screen, except what's label:a-content

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions