Tony/257 notification#266
Conversation
Hi @jesscmoore, thank you very much for the feedback. The current notification mechanism works like this: When a sender sends a notification to a receiver, the system creates an unencrypted JSON file inside the receiver’s app/notification directory. After the receiver logs in, and also during runtime every 10 seconds, the app will check this folder for new messages automatically. If new notifications are found, the user is alerted through a badge on the appbar notification icon. The notification folder is a newly introduced directory under the app folder. During POD initialisation, an .acl file also needs to be created inside this folder. If the user does not already have this folder, a Setup Wizard will appear. By clicking the Resources button on the bottom-right of the wizard, the user can see that this initialisation step only creates the notification folder and its corresponding .acl file. This is why there will be a setup wizard after login. But before the test, please back up all the notes on the POD or use a test account. |
There was a problem hiding this comment.
Thanks @tonypioneer, I've now tested this well with notepod. Works nicely. It would be good to have a little tuning of this branch in solidui. Otherwise works really nicely!! Is the notification centre all internal to the app, or is there integration with the platform notification system?
- With the notification icon in appbar, on iphone17 (simulator running iOS26.4 in debug mode), there is not space for 7 icons between the hamburger and the 'more' dots icons. The number of icons in the middle should probably be limited to 5 with others moved to 'more' in very narrow screens.
- The list item notification text can be briefer. Suggest change the text to:
'Shared to you: [fileTitle]'
[Keep the subtitle as is]
Maybe use the info icon rather than email icon.
Suggest that the delete icon, and new symbol on email icon, and number badge on notification icon in app bar are grey rather than red.
- Suggest also make the notification message more succinct, to something like below. It will need to have a scrollbar so that it displays when the expanded tile is shown.
[Date time]
(Next bit in bold, where id is the username part of their webid]
[id] shared the
[title]
file to you
[next bit in normal font]
with [permissions] permission
[horizontal line]
Expanding tile with label 'Details' and content in smaller text:
Date: [date time]
File: [fileUrl]
Title: [fileTitle]
Shared by: [permission granter]
Owner: [resource owner]
Permissions: [permissions]
The Delete icon should be an elevated button like the close button, but in red.
|
Thanks @jesscmoore. The notification centre is in |
…_notification # Conflicts: # lib/src/widgets/solid_scaffold_appbar_actions.dart # lib/src/widgets/solid_scaffold_appbar_builder.dart # lib/src/widgets/solid_scaffold_appbar_ordered_actions.dart # lib/src/widgets/solid_scaffold_helpers.dart # lib/src/widgets/solid_scaffold_widget_builder.dart
jesscmoore
left a comment
There was a problem hiding this comment.
Approved - thanks Tony. Noting suggest use intl for date processing
There was a problem hiding this comment.
One more thing to consider:
On press 'delete' button on notification, it is calling deleteFile(). This has a revocation step before the file is deleted on the pod, which is triggering an error. It looks to be failing because there is no acl for the notification. It raises the question of whether the notification should be stored on the sender's pod or recipient's pod.
@gjwgit @anushkavidanage @tonypioneer - thoughts?
Noting that it is writing a provided file title field to ttl, where the title could be sensitive information.
Are there design precedents that we've adopted?
flutter: Error revoking permissions to recipients of user' note: Exception: Failed to get resource https://pods.solidcommunity.au/jesscmoore/notepod/data/notepod/notification/1776147344814.json.acl
flutter: Warning: could not revoke permissions for "notepod/notification/1776147344814.json" (ACL may not exist): Exception: Failed to get resource https://pods.solidcommunity.au/jesscmoore/notepod/data/notepod/notification/1776147344814.json.acl
flutter: Individual key for "notepod/notification/1776147344814.json" does not exist, do nothing.|
There is a design question impacting transparency. Should solidui call sendNotifications() to send a notification when permission has been revoked? My preference is for yes. Currently solidui only sends a notification when permission is granted. My preference is sending notifications on permission revocations as well as grants. As it is useful to know. Comparisons: social apps - facebook doesn't tell you if you are unfriended, other apps will remove a group chat, or just not update you group chat, if you've been removed from the group. They don't send you a notification. With Solid based apps with file sharing, a file that you loose access to disappears from your app file lists. Which would seem odd if you did not have any notice that it was happening. |
|
solidui notifications has raised an architectural design question. Tony's great work on the notification centre has created a publicly append-able notification folder in pod's of people using solidui based apps with a folder level ACL, or will once merged. Notifications are unencrypted, using POST via createResource() to write to the recipients appName/data/notification folder. This architecture makes it easier for app to check for new notifications by reading the user's notification folder every 10-30sec. In this PR, notifications are being written to the pods of recipients of permission granting operations, however the design should work for other types of notification applications which may have higher or lower sensitivity. Should our apps design for writing to other people's pods without a negotiation and their consent? The exceptions are edge cases with accepted consent so do not really break that design model:
The current architectural design for notifications raises 2 issues:
There are alternate ways that Tony's user friendly design could be implemented.
|
|







Pull Request Details
What issue does this PR address
Associated Issue
Type of Change
How Has This Been Tested?
Build and run the app.
Please modify the pointed branches of SolidUI and SolidPod in pubspec.yaml to dev before merge.
Checklist
Complete the check-list below to ensure your branch is ready for PR.
make preporflutter analyze lib)dart testoutput or screenshot included in issue #Finalising
Once PR discussion is complete and reviewers have approved: