Skip to content

Natural media viewer swiping order#6431

Open
bxdxnn wants to merge 1 commit intoelement-hq:developfrom
bxdxnn:misc/reverse-media-order
Open

Natural media viewer swiping order#6431
bxdxnn wants to merge 1 commit intoelement-hq:developfrom
bxdxnn:misc/reverse-media-order

Conversation

@bxdxnn
Copy link
Copy Markdown
Contributor

@bxdxnn bxdxnn commented Mar 21, 2026

Content

Change the swiping order in the media viewer and update tests:

  • Swipe from right to left goes to a newer media
  • Swipe from left ro right goes to an older media

Motivation and context

Fixes #6350
Fixes #4296

Right now, the swiping order in the media viewer is wrong:

  • Swiping from right to left goes to an older media
  • Swiping from left to right goes to a newer media

The new bevahior in this PR is more natural and a standard behavior in most of the apps.

Screenshots / GIFs

Tests

  • Swipe from right to left goes to a newer media
  • Swipe from left ro right goes to an older media

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

@bxdxnn bxdxnn requested a review from a team as a code owner March 21, 2026 20:40
@bxdxnn bxdxnn requested review from jmartinesp and removed request for a team March 21, 2026 20:40
@github-actions
Copy link
Copy Markdown
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:

  • Your branch should be based on origin/develop, at least when it was created.
  • The title of the PR will be used for release notes, so it needs to describe the change visible to the user.
  • The test pass locally running ./gradlew test.
  • The code quality check suite pass locally running ./gradlew runQualityChecks.
  • If you modified anything related to the UI, including previews, you'll have to run the Record screenshots GH action in your forked repo: that will generate compatible new screenshots. However, given Github Actions limitations, it will prevent the CI from running temporarily, until you upload a new commit after that one. To do so, just pull the latest changes and push an empty commit.

@github-actions github-actions bot added the Z-Community-PR Issue is solved by a community member's PR label Mar 21, 2026
@jmartinesp
Copy link
Copy Markdown
Member

I think this addresses #6350 or #4296, right? I'm not sure if reversing the order is the right call when opening the media viewer from both the timeline and the gallery though.

@bmarty I see you assigned to one of these issues, WDYT?

@bxdxnn
Copy link
Copy Markdown
Contributor Author

bxdxnn commented Mar 23, 2026

I think this addresses #6350 or #4296, right? I'm not sure if reversing the order is the right call when opening the media viewer from both the timeline and the gallery though.

@bmarty I see you assigned to one of these issues, WDYT?

Correct, this PR fixes these issues. Just added.

@jmartinesp
Copy link
Copy Markdown
Member

I wanted some feedback from @bmarty since it seems like he planned to work on a related task, but maybe I should ask @mxandreas or @americanrefugee instead: should we just reverse the order of items in the media viewer, or maybe change it conditionally depending on where this screen is started from?:

  • From selecting a media item in the timeline: items to the left are older, items to the right are newer.
  • From opening some media in the gallery of a room: items to the left are newer, items to the right are older.

Looking at other clients:

  • Whatsapp keeps a consistent order: left is older, right is newer. It's what's done in this PR.
  • Telegram on the other hand does what I proposed above. This makes more sense to me, but it's a subjective preference.

@jmartinesp jmartinesp added X-Needs-Design X-Needs-Product Issue needs input from Product team labels Mar 27, 2026
@americanrefugee
Copy link
Copy Markdown

This is a tricky one...

I agree that when viewing media from the timeline that right=newer / left=older makes total sense for both platforms.

The sticky bit is when viewing the Media Browser on iOS vs. Android.

  • On iOS, the gallery shows the most recent at the bottom of the list. Therefore, right=newer / left=older still makes sense
  • But on Android, the gallery list items are reversed - the most recent is at the top of the list. Therefore, right=older / left=newer would be more natural

So my personal opinion is:

  • Both platforms have a common swipe before for viewing media from the timeline (right=news / left=older)
  • When viewing from the Media Browser, the swipe pattern depends on whether most recent items are at the bottom of the list (iOS) vs. the top (Android)

Would love to get thoughts from @mxandreas

@americanrefugee
Copy link
Copy Markdown

To clarify, when I say for example "right=newer / left=older" I mean...

If viewing an image, the image to the right is newer and the image to the left is older. To see the image to the right you swipe left. To see the image to the left you swipe right.

Hopefully that makes sense 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

X-Needs-Design X-Needs-Product Issue needs input from Product team Z-Community-PR Issue is solved by a community member's PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent swipe navigation in media gallery: left swipe should go forward, right swipe backward Strange swipe direction between media in room

3 participants