Skip to content

Conversation

@bmarty
Copy link
Member

@bmarty bmarty commented Oct 7, 2025

Content

This PR takes the sound from element-hq/element-web#30804 and the spec and design from element-hq/element-x-ios#4572

I had to update the migration codebase to be able to migrate differently in the case of app install of app upgrade.

I also had to set a new notification channel id since setting a new sound has no effect on already registered channels.

Motivation and context

All Element clients have the same notification sound.

Screenshots / GIFs

See recorded one. May include unrelated change due to the sync of strings.

Tests

  • Fresh install the app and login: the new notification sound banner is not displayed and will never be
  • Install a previous version and login
  • Install a build from this PR
  • observe that a new notification sound banner is displayed and can be dismissed forever.
  • ensure the device has notification sound volume is high enough
  • receive a message which would trigger a noisy notification
  • enjoy the new notification sound.

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

@bmarty bmarty requested a review from a team as a code owner October 7, 2025 10:43
@bmarty bmarty removed the request for review from a team October 7, 2025 10:43
@bmarty bmarty added the PR-Change For updates to an existing feature label Oct 7, 2025
@bmarty bmarty requested a review from ganfra October 7, 2025 10:43
}

var securityBannerDismissed by rememberSaveable { mutableStateOf(false) }
val showNewNotificationSoundBanner by appPreferencesStore.showNewNotificationSoundBanner().collectAsState(false)
Copy link
Member

Choose a reason for hiding this comment

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

Would be great to use the Announcement feature no?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, maybe, but here it's more embedded in the UI so it's probably easier like this.

Copy link
Member

Choose a reason for hiding this comment

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

Can we find a more explicit name than message.mp3 ?

Copy link
Member Author

Choose a reason for hiding this comment

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

I kept the original name from ElementWeb for consistency: https://github.com/element-hq/element-web/tree/develop/res/media

@bmarty bmarty force-pushed the feature/bma/newSound branch from b139ab9 to 98637b8 Compare October 7, 2025 13:55
@bmarty bmarty added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Oct 7, 2025
@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 Oct 7, 2025
@ElementBot
Copy link
Collaborator

ElementBot commented Oct 7, 2025

Warnings
⚠️

libraries/ui-strings/src/main/res/values-da/translations.xml#L285 - For locale "da" (Danish) the following quantity should also be defined: one (e.g. "1 dag")

⚠️

libraries/ui-strings/src/main/res/values-fr/translations.xml#L7 - For locale "fr" (French) the following quantity should also be defined: many (e.g. "1000000 de jours")

⚠️

libraries/ui-strings/src/main/res/values-fr/translations.xml#L35 - For locale "fr" (French) the following quantity should also be defined: many (e.g. "1000000 de jours")

⚠️

libraries/ui-strings/src/main/res/values-fr/translations.xml#L237 - For locale "fr" (French) the following quantity should also be defined: many (e.g. "1000000 de jours")

⚠️

libraries/ui-strings/src/main/res/values-fr/translations.xml#L241 - For locale "fr" (French) the following quantity should also be defined: many (e.g. "1000000 de jours")

⚠️

libraries/ui-strings/src/main/res/values-fr/translations.xml#L270 - For locale "fr" (French) the following quantity should also be defined: many (e.g. "1000000 de jours")

⚠️

libraries/ui-strings/src/main/res/values-fr/translations.xml#L285 - For locale "fr" (French) the following quantity should also be defined: many (e.g. "1000000 de jours")

⚠️

libraries/ui-strings/src/main/res/values-fr/translations.xml#L297 - For locale "fr" (French) the following quantity should also be defined: many (e.g. "1000000 de jours")

⚠️

libraries/ui-strings/src/main/res/values-fr/translations.xml#L325 - For locale "fr" (French) the following quantity should also be defined: many (e.g. "1000000 de jours")

⚠️

libraries/ui-strings/src/main/res/values-fr/translations.xml#L431 - For locale "fr" (French) the following quantity should also be defined: many (e.g. "1000000 de jours")

⚠️

libraries/ui-strings/src/main/res/values-nb/translations.xml#L283 - For locale "nb" (Norwegian Bokmål) the following quantity should also be defined: one (e.g. "1 dag")

Generated by 🚫 dangerJS against c059e40

@github-actions
Copy link
Contributor

github-actions bot commented Oct 7, 2025

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

@bmarty bmarty enabled auto-merge October 7, 2025 14:26
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 7, 2025

@bmarty bmarty merged commit fab2639 into develop Oct 7, 2025
28 of 29 checks passed
@bmarty bmarty deleted the feature/bma/newSound branch October 7, 2025 15:20
@codecov
Copy link

codecov bot commented Oct 7, 2025

Codecov Report

❌ Patch coverage is 90.56604% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.94%. Comparing base (6cc7f6d) to head (c059e40).
⚠️ Report is 8 commits behind head on develop.

Files with missing lines Patch % Lines
...eferences/impl/store/DefaultAppPreferencesStore.kt 0.00% 4 Missing ⚠️
...home/impl/components/NewNotificationSoundBanner.kt 90.90% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #5469   +/-   ##
========================================
  Coverage    81.93%   81.94%           
========================================
  Files         2369     2371    +2     
  Lines        67151    67200   +49     
  Branches      8111     8115    +4     
========================================
+ Hits         55021    55066   +45     
- Misses        9156     9160    +4     
  Partials      2974     2974           

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

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.

4 participants