Skip to content

Add mark as read / unread in room details#6818

Merged
bmarty merged 5 commits into
developfrom
feature/bma/markAsUnreadInRoomDetails
May 21, 2026
Merged

Add mark as read / unread in room details#6818
bmarty merged 5 commits into
developfrom
feature/bma/markAsUnreadInRoomDetails

Conversation

@bmarty
Copy link
Copy Markdown
Member

@bmarty bmarty commented May 19, 2026

Content

Add "Mark as read" and "Mark as unread" in the room detail screen so that users can see this action without having to long click on a room in the room list.

When user selects "Mark as unread" from this screen, the application navigates back to the room list.

Motivation and context

Mitigate accessibility issue per this comment: #6398 (comment)

Closes #6398

Screenshots / GIFs

"Mark as unread" demo:

Screen_recording_20260520_093228.mp4

Tests

Mark as unread

  • Open a room
  • Open the room details
  • Observe the new "Mark as unread" action
  • Click on it
  • The application navigate back to the room list and the room is marked as unread

Mark as read

  • Open a room
  • Open the room details
  • Observe the new "Mark as unread" action
  • From another account, send a message
  • The new "Mark as unread" action become "Mark as read"
  • Click on "Mark as read"
  • The room is marked as read

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • This PR was made with the help of AI:
    • Yes. In this case, please request a review by Copilot.
    • No.
  • Changes have been tested on an Android device or Android emulator with API 24
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly defines what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • You've made a self review of your PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 19, 2026

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/McC5rW

@bmarty
Copy link
Copy Markdown
Member Author

bmarty commented May 20, 2026

Hello @mxandreas , I have implemented a first version of #6398 (this comment: #6398 (comment)), but the problem is that if the user selects "Mark as unread" then navigates back to the room, the room will be marked as read. To mitigate this, I propose to automatically navigate back to the room list when the user selects "Mark as unread". Here is a demo, but you can also test it using the QR code above:

Screen_recording_20260520_093228.mp4

This behavior is quite similar to mail clients: when you open a mail then mark it as unread, the application navigate back to the list of mails.

Please let me know if it's OK for you, then I can finalize the PR (add tests, etc.)

@mxandreas
Copy link
Copy Markdown
Member

To mitigate this, I propose to automatically navigate back to the room list when the user selects "Mark as unread". Here is a demo, but you can also test it using the QR code above:

Thanks. Yes, this looks good and indeed, this what the mail apps do as well. cc @americanrefugee

@americanrefugee
Copy link
Copy Markdown

LGTM as well. And we're sure we're happy with the position of this new menu item in the list?

@bmarty bmarty changed the title Feature/bma/mark as unread in room details Add mark as read / unread in room details May 20, 2026
@bmarty bmarty added the PR-Bugfix For bug fix label May 20, 2026
@bmarty bmarty marked this pull request as ready for review May 20, 2026 09:15
@bmarty bmarty requested a review from a team as a code owner May 20, 2026 09:15
@bmarty bmarty requested review from jmartinesp and removed request for a team May 20, 2026 09:15
Copy link
Copy Markdown
Member

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM once the new screenshots are recorded and the lint issues fixed.

@bmarty bmarty added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label May 20, 2026
@github-actions github-actions Bot removed the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label May 20, 2026
@bmarty bmarty enabled auto-merge May 20, 2026 12:58
@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

❌ Patch coverage is 86.27451% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.27%. Comparing base (5af5790) to head (260ea4a).
⚠️ Report is 4 commits behind head on develop.

Files with missing lines Patch % Lines
.../features/roomdetails/impl/RoomDetailsPresenter.kt 81.48% 0 Missing and 5 partials ⚠️
...droid/features/roomdetails/impl/RoomDetailsView.kt 88.88% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #6818   +/-   ##
========================================
  Coverage    81.27%   81.27%           
========================================
  Files         2648     2648           
  Lines        74169    74218   +49     
  Branches      9619     9628    +9     
========================================
+ Hits         60281    60324   +43     
- Misses       10341    10342    +1     
- Partials      3547     3552    +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bmarty bmarty disabled auto-merge May 21, 2026 07:01
@bmarty bmarty merged commit dea808c into develop May 21, 2026
36 checks passed
@bmarty bmarty deleted the feature/bma/markAsUnreadInRoomDetails branch May 21, 2026 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR-Bugfix For bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A11y: [Chats] Context menu (long-press) not accessible via exter...

5 participants