-
-
Notifications
You must be signed in to change notification settings - Fork 829
Custom notification sounds for rooms #2928
Custom notification sounds for rooms #2928
Conversation
In general, settings should use the SettingsStore instead of going direct. |
dbd7cc3
to
d33df45
Compare
@turt2live I forgot that existed. Updated. |
Co-Authored-By: Half-Shot <will@half-shot.uk>
I've updated the description with a list of issues and corners cut when doing the PR for transparency. I suppose we want to fix some of them before merging but I believe some are quite minor. |
…react-sdk into hs/custom-notif-sounds
A solution to this could be to give every room its own tag and change the I don't think this is really an edge case; the odds of a user changing a notification sound for a room several times as they test different sounds and see which they'd prefer seems high. |
Honestly we could just keep a counter of which rooms use which tags and reference count it, and just remove them on 0. The reason I've not done this is that I'm not convinced that it's going to cause a great impact to Riot if you do have lots of audio tags open. It may leave a few extra KB in memory, but it would be cleared on next restart anyway. |
is it possible to get a quick review on this? |
I have added it to the team queue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a great first start, but there's more to do before we can safely merge this for labs. On top of the comments in the review, please also:
- Get a "this looks ok for now" review from @nadonomy (we can always iterate more finely later)
- Get a "this seems like something we want" checkmark from @lampholder to ensure it's in the product's vision
- Add a description to https://github.com/vector-im/riot-web/blob/develop/docs/labs.md as we're starting a trend of doing that.
- Create an epic issue to track what remaining bits would need to be done to get it out of labs. The list in the PR description seems like things we can avoid doing right this moment, but would be good out-of-labs candidates (minus those explicitly referenced in my prior points here).
src/components/views/settings/tabs/room/NotificationSettingsTab.js
Outdated
Show resolved
Hide resolved
src/components/views/settings/tabs/room/NotificationSettingsTab.js
Outdated
Show resolved
Hide resolved
src/components/views/settings/tabs/room/NotificationSettingsTab.js
Outdated
Show resolved
Hide resolved
Thanks for the comprehensive feedback @turt2live, will get to it :) |
@turt2live I believe I have done everything I can my side now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm although you'll probably have to be the one to ask Tom and Nad to take a look
@Half-Shot nice! I know you're scratching a personal itch and this is in labs, but there's some 2 trivial UI changes that would be good to see:
We use similar styles in modals and elsewhere already.
|
@nadonomy Thanks, these seem like good ideas. I'll go make the changes :) |
This is done again. I've moved the reset button next to information about the current sound in the room, because I realise the reset button is slightly misleading if it's moved near the upload box. Default sound, no upload: Pending upload: Uploaded: |
Great, thanks! |
Tagging @ara4n |
I've had a play and it LGTM :) |
Thanks :), does that mean I have met the criteria for labs now 😇 ? |
The remaining steps as I understand it are:
Almost there! 😁 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise lgtm
Co-Authored-By: Travis Ralston <travpc@gmail.com>
@turt2live all good to merge now? :3 |
Fixes element-hq/element-web#2105
This PR mainly exists so my alert noise for infrastructure breaking isn't the same noise as friendly PMs, which is probably heathy for my emotional state.
This is a very barebones feature for setting custom sounds for notifications within Riot. Riot reads for a room's "m.notification.sound" event and tries to load a mxcurl into a new audio element if ones doesn't already exist.
It does not support multiple sources for a sound.
Epic for this feature can be found at: element-hq/element-web#9687
Riot-web labs.md PR can be found at: element-hq/element-web#9688