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

Add warning message to 'mentions and keywords only' notification option #2028

Conversation

jmartinesp
Copy link
Member

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other : add warning message.

Content

  • Adds NotificationSettingsService. canHomeServerPushEncryptedEventsToDevice() method to check if the home server can filter notifications for encrypted events containing mentions and keywords (the naming in Rust is a bit weird).
  • Add displayMentionsOnlyDisclaimer parameter to all notification screens and components.
  • Replace custom components for notification setting options with ListItem.

Motivation and context

Closes #1794 .

Screenshots / GIFs

Inside the PR.

Tests

  • Log into an account in matrix.org.
  • Open the global notification settings screen, check this warning is displayed.
  • Do the same for the notification settings of a room.

Tested devices

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

Checklist

@jmartinesp jmartinesp requested a review from a team as a code owner December 14, 2023 14:33
@jmartinesp jmartinesp requested review from bmarty and removed request for a team December 14, 2023 14:33
Copy link
Contributor

github-actions bot commented Dec 14, 2023

📱 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/keDoAW

Copy link

codecov bot commented Dec 14, 2023

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (e725747) 67.70% compared to head (94be166) 67.67%.

Files Patch % Lines
...fications/edit/DefaultNotificationSettingOption.kt 63.63% 1 Missing and 3 partials ⚠️
...ficationsettings/RoomNotificationSettingsOption.kt 69.23% 1 Missing and 3 partials ⚠️
...tificationsettings/RoomNotificationSettingsView.kt 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2028      +/-   ##
===========================================
- Coverage    67.70%   67.67%   -0.03%     
===========================================
  Files         1329     1329              
  Lines        33418    33413       -5     
  Branches      7192     7202      +10     
===========================================
- Hits         22626    22613      -13     
- Misses        7384     7385       +1     
- Partials      3408     3415       +7     

☔ 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.

Thanks for the PR. 2 remarks, else LGTM!

Copy link
Member

Choose a reason for hiding this comment

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

This is the UI displayed for a room, so maybe the disclaimer message can be more accurate like:
Your homeserver does not support this option for this room, you may not get notified.
instead of reusing the wording for the global setting.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's the same string we use on iOS. I guess we can iterate on this later, since there is already an UI polishing planned?

Copy link
Member

Choose a reason for hiding this comment

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

ok

@jmartinesp jmartinesp added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Dec 14, 2023
@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 Dec 14, 2023
@jmartinesp jmartinesp force-pushed the misc/jme/1794-add-mentions-and-keywords-only-disclaimer-if-not-supported branch from 88711bc to 94be166 Compare December 14, 2023 15:17
Copy link

sonarcloud bot commented Dec 14, 2023

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@jmartinesp jmartinesp added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Dec 14, 2023
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Dec 14, 2023
@jmartinesp jmartinesp enabled auto-merge (squash) December 14, 2023 15:55
@jmartinesp jmartinesp merged commit d27e9e5 into develop Dec 14, 2023
17 of 18 checks passed
@jmartinesp jmartinesp deleted the misc/jme/1794-add-mentions-and-keywords-only-disclaimer-if-not-supported branch December 14, 2023 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mentions: Add a warning on servers where MSC 4028 is not supported
2 participants