Meeds-io / MIPs

The Meeds Improvement Proposal repository
0 stars 0 forks source link

Unread activities Stream filter #96

Closed srenault-meeds closed 1 year ago

srenault-meeds commented 1 year ago

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 existing ActivityRestResourcesV1 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:

Object Type Object Id Activity Id
notes 5 10
rules 55 12

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.

srenault-meeds commented 1 year ago

@margondicco Ready for review

margondicco commented 1 year ago

Hello perfect Go Fonc

srenault-meeds commented 1 year ago

@boubaker ready for spec tech. Tell me if you need further information

boubaker commented 1 year ago

Ready for tech review by DAO Members (eXo: @rdenarie )

rdenarie commented 1 year ago

:+1: go tech

boubaker commented 1 year ago

PRs and ACCs is ready for review by DAO Members (eXo: @rdenarie )

rdenarie commented 1 year ago

All PR validated

boubaker commented 1 year ago

All PR validated

Thanks, merged to develop.