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 notification content #4662

Merged
merged 21 commits into from
Aug 18, 2021
Merged

Conversation

pixlwave
Copy link
Member

@pixlwave pixlwave commented Aug 4, 2021

Fixes #4659, #4653 and #4660. Name/Avatar changes need testing.
Depends on matrix-org/matrix-ios-kit#882.

In every case where an event's type is unclear, "Notification" will now be shown instead of "Message" with the room's name as the title when possible:

Screenshot 2021-08-03 at 17 13 57

(The one exception to this is if the extension is killed/crashes, in which case "Message" will remain as the notification sent from the server).

New body strings introduced

Alice sent a video Meme.mp4
Alice sent an audio file Singing.mp3
Alice sent a voice message
Alice sent a file Report.doc
Alice sent a reaction

Alice changed their name to Bob
Alice changed their avatar
Alice updated their details

IMG_0070
IMG_0067

Reply title strings

Alice replied
Alice replied in Room

IMG_0066

@pixlwave pixlwave requested a review from niquewoodhouse August 4, 2021 15:34
@pixlwave
Copy link
Member Author

pixlwave commented Aug 4, 2021

@niquewoodhouse All the strings I've changed/added are available in the description. What do you think about including the file name such as for

Alice sent a video Meme.mp4

It may make more sense for these to be left off or to separate them with a colon?

Alice sent a video: Meme.mp4

@niquewoodhouse
Copy link

@niquewoodhouse All the strings I've changed/added are available in the description. What do you think about including the file name such as for

File names can be really helpful because they set expectations for what you'll see when you open a file. But that depends completely on files being well named. In the proposal, if I send a video from Photos, is the name of the video shown?

@pixlwave
Copy link
Member Author

pixlwave commented Aug 6, 2021

In the proposal, if I send a video from Photos, is the name of the video shown?

Sadly, yes it will be. Just checking now, it seems we rename the file to "Video" before sending which results in this lovely notification:
video

For reference the notification for a photo from the photos library:
picture

Also, might be worth bearing in mind that the next part of #4132 is to investigate fetching thumbnails that can be attached to the notification.

@pixlwave
Copy link
Member Author

pixlwave commented Aug 6, 2021

Although thinking about this, technically that isn't us renaming the file, and more that in this instance we've chosen (on Element iOS) to include the message "Video" instead of the filename when sending a video.

@niquewoodhouse
Copy link

video

😃

@github-actions
Copy link

github-actions bot commented Aug 16, 2021

📱 Scan the QR code below to install the build for this PR.
🔒 This build is for internal testing purpose. Only devices listed in the ad-hoc provisioning profile can install Element Alpha.

QR code

If you can't scan the QR code you can install the build via this link: https://i.diawi.com/auYHgq

Copy link

@niquewoodhouse niquewoodhouse left a comment

Choose a reason for hiding this comment

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

Only suggested change:

  • Alice updated their profile instead of Alice updated their details
  • Remove File name from video and picture

@pixlwave
Copy link
Member Author

@niquewoodhouse Changes made 👍

Riot/Modules/Application/LegacyAppDelegate.m Outdated Show resolved Hide resolved
RiotNSE/NotificationService.swift Outdated Show resolved Hide resolved
RiotNSE/NotificationService.swift Outdated Show resolved Hide resolved
RiotNSE/NotificationService.swift Show resolved Hide resolved
Set notificationBodyLocalizationKey in CommonConfiguration. Remove redundant customisation. Use MXRoomMemberEventContent.
@pixlwave pixlwave merged commit 7c0b9e5 into develop Aug 18, 2021
@pixlwave pixlwave deleted the doug/4132_improve_notification_content branch August 18, 2021 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants