Closed srenault-meeds closed 1 year ago
@margondicco Ready for review
Hello perfect Go Fonc
@boubaker ready for spec tech. Tell me if you need further information
Ready for tech review by DAO Members (eXo: @rdenarie )
:+1: go tech
PRs and ACCs is ready for review by DAO Members (eXo: @rdenarie )
All PR validated
All PR validated
Thanks, merged to develop.
Rationale
Since we have provided a way to identify unread activities in the stream and in the left menu, end-users report quite the same feeling:
In fine, they are not confident with this option. They are worried to miss information or they have the feeling to lose time.
1. Functional Requirements
Top User Stories
When browsing activities in the general stream page or in a space, Users can filter their activities thanks to the current filter. Indeed, a new filter is added "Unread activities"
To help users knowing that unread activities are identified in the stream, the filter display the same red dot we have at the top-right of activity when unread.
Once they filter the stream that way, only unread activities are listed, from the most recently active to the less AND an envelope icon is proposed next to the filter so users can mark all activities as read
Impacts
New filter in stream filters to filter by unread activities
Notifications
Mark as unread option from the stream
Analytics
Track usage of filter
2. Technical Requirements
Security
Each user will be able to access personal unread items. Even administrators shouldn't be able to access read/unread flags of users.
Feature Flags
No feature flag.
4. Software Architecture
Security
The REST endpoint of retrieving activity ids filtered by unread flag has to systematically use the current connected user instead of relying on identified user from designated user from REST parameters.
Access
A new
streamType
value has to be added in existingActivityRestResourcesV1
Rest endpoint to support the new filter, using the url:/portal/rest/v1/social/activities?streamType=UNREAD_SPACES_STREAM
Services & processing
Knowing that the Unread flag is added to originating application data and not to the activity itself, we will have to enhance the API to store the activity id in Unread Metadata properties as well:
Unread metadata objects:
We will have to add the
activityId
property to new unread notification only without upgrading the existing ones.By doing this, when filtering on unread activities, w will search for User personal unread Metadata items and the retrieve the newly created property to retrieve the list of activity Ids to UI which will retrieve the list of activities one by one through the already existing REST endpoint.