Let the room list avatar be tapped to see it larger - #7573
Open
hayaksi1 wants to merge 3 commits into
Open
Conversation
Tapping a room's avatar anywhere else in the app opens it full screen - in the timeline top bar, in the room details and on a user's profile. In the room list it did nothing of its own; the tap fell through to the row and opened the room. The room list avatar now opens the same media viewer, through a new AvatarPreview target on the home flow. It is only clickable when the room actually has an avatar to show, so a room with a generated letter avatar, and an invitation whose avatar is being hidden, still open the room as before. Part of element-hq#6970
Contributor
|
Thank you for your contribution! Here are a few things to check in the PR to ensure it's reviewed as quickly as possible:
|
The room list search results reuse the same row without an avatar callback. Making the avatar clickable regardless meant a tap there was swallowed and the room no longer opened. The callback is nullable now, and the avatar is only clickable when there is something to open it with.
bmarty
reviewed
Aug 26, 2026
A nullable callback made the row read `enabled = onAvatarClick != null` and left the caller free to forget it, which is how the search results ended up swallowing taps on the avatar in the first place. The callback is required now. The search results pass the same one the room list does, so tapping an avatar there opens the media viewer too, and the row only decides whether there is an avatar worth opening. AGENTS.md gains the rule, as suggested in review.
Contributor
|
As a person that is predominantly left-handed: I absolutely detest this "feature" in WhatsApp. I often click the avatar to open the room because that's where my finger happens to land on the left-hand side of the screen. If anything I'd argue this is right-hand-preferential and as such am not a fan. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Content
Tapping a room's avatar opens it full screen everywhere else in the app — in the timeline top bar, in
the room details, and on a user's profile. In the room list it had no meaning of its own: the tap fell
through to the row and opened the room.
The room list avatar now opens the same media viewer, through a new
AvatarPreviewtarget on the homeflow, reusing
MediaViewerEntryPoint.createParamsForAvatarexactly as the other three screens do.It is only clickable when there is an avatar to show. A room with a generated letter avatar, and an
invitation whose avatar is being hidden, still open the room on a tap as before, so the row keeps its
whole tap target in the cases where a larger view would show nothing.
Motivation and context
Part of #6970
Tests
RoomListViewTest.clicking on the avatar of a room that has one invokes the avatar callbackRoomListViewTest.the avatar of a room that has none is not clickableScreenshots / GIFs
The only golden that moved is
features.home.impl_HomeViewA11y_en.png: the accessibility overlaydraws the avatar's new click action. Every ordinary snapshot is byte-identical, since nothing about
the row's layout or colours changed.
Tested devices
Checklist