Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the text for mentions and replies in notifications #3328

Conversation

jmartinesp
Copy link
Member

@jmartinesp jmartinesp commented Aug 22, 2024

Content

When we receive a notification with a message that either mentions or replies to the current user - since we can't know if it mentioned or replied to, it's either both or none - instead of setting its text to Foo mentioned you: actual message we'll create a fake Person to display in the MessagingStyle for the notification, similar to what WhatsApp does.

Any other messages will be using the normal Person as they did until now, so they'll be grouped together.

Motivation and context

Counterpart of element-hq/element-x-ios#2397 for Android.

Screenshots / GIFs

image

Tests

  • In some room, send a message that mentions or replies to some other account of yours where you have EXA installed.
  • The notification should display as in the screenshot.
  • If any other non-mention/reply messages are sent they should keep the current style.

Tested devices

  • Physical
  • Emulator
  • OS version(s): 14

Checklist

  • Changes have been tested on an Android device or Android emulator with API 23
  • 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 define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • Pull request includes a sign off
  • You've made a self review of your PR

@jmartinesp jmartinesp added the PR-Change For updates to an existing feature label Aug 22, 2024
@jmartinesp jmartinesp requested a review from a team as a code owner August 22, 2024 13:36
@jmartinesp jmartinesp requested review from bmarty and removed request for a team August 22, 2024 13:36
Copy link
Contributor

github-actions bot commented Aug 22, 2024

📱 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/95MH8o

@jmartinesp jmartinesp force-pushed the misc/jme/improve-notification-style-for-mentions-and-replies branch from 9953cbd to ca174f6 Compare August 22, 2024 14:03
Copy link

sonarcloud bot commented Aug 22, 2024

Copy link

codecov bot commented Aug 22, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 5 lines in your changes missing coverage. Please review.

Project coverage is 82.74%. Comparing base (a942fd4) to head (ca174f6).
Report is 6 commits behind head on develop.

Files Patch % Lines
...mpl/notifications/factories/NotificationCreator.kt 44.44% 2 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3328      +/-   ##
===========================================
- Coverage    82.74%   82.74%   -0.01%     
===========================================
  Files         1680     1680              
  Lines        39380    39388       +8     
  Branches      4778     4779       +1     
===========================================
+ Hits         32585    32590       +5     
- Misses        5117     5119       +2     
- Partials      1678     1679       +1     

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

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

Nice, thanks!

@jmartinesp jmartinesp added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Aug 22, 2024
@jmartinesp jmartinesp enabled auto-merge (squash) August 22, 2024 17:04
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Aug 22, 2024
@jmartinesp jmartinesp merged commit 7859526 into develop Aug 22, 2024
28 of 29 checks passed
@jmartinesp jmartinesp deleted the misc/jme/improve-notification-style-for-mentions-and-replies branch August 22, 2024 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Change For updates to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants