Meeds-io / MIPs

The Meeds Improvement Proposal repository
0 stars 0 forks source link

Group Mentioning #109

Closed srenault-meeds closed 5 months ago

srenault-meeds commented 6 months ago

Rationale

When you share something in a group, you cannot mention everyone unless you mention every member of it one by one Plus, with the 'mute space' option, when posting something relevant and important, you might need to mention everyone to make sure your post is heard.

In addition to this, members of a community sometimes need to address a message to a group of people (host, redactors for example) and it cannot be done unless you mention every user you think they are host / redactors, etc.

Alternative solutions: it is basically a usage proposed in any community tool

1. Functional Requirements

Top User Stories

  1. Mention everyone or a group

Given I am in a space (or given the audience is a space - from the general stream's composer), When I send a message, a kudos, comment a task, submit a contribution Then I can use the usual [a] +

  1. Message display with group mentions

Once I post the message, the mention display follows the usual pattern: icon + label (i18n of course when translated):

  1. Mentionning impact (notification)

Once the message is posted with a group mention Then any member of that group is mentioned "Someone has mentioned you in an activity" AND even if the space is muted, these users receive the notification

  1. Access to people group

Given I click to the mentioned group Then this sends me to the members app filtered to the users-type Precision: This means that any member can filter members list of a space by host, redactor, publisher

Precision:

Impacts

Gamification

NA

Notifications

Same notification than "You have been mentioned"

Analytics

Mention usage can be tracked to study usage and UX value proposition

Unified Search

NA

2. Technical Requirements

Expected Volume & Performance

No change on stored data has to be made. As performance requirement, the suggestor component performance shouldn't be affected.

Security

No security model is required and the same Activities/Task/... security model should remain without affecting the visibility of elements where the space members has been mentioned.

Extensibility

No extension point is needed for this feature since it should be centralized in the same reusable set of components.

Configurability

No special properties are required to change the behavior of this feature.

Upgradability

No needed change on current data, since this is a new feature.

Existing Features

This change will affect:

No additional rich editor contents has to be reworked in the context of this MIP.

Feature Flags

No feature flag is needed.

Property Name Default Value Target Audience Functional Behaviour

3. Software Architecture

Access

The change has to affect global RichEditor.vue component with the suggester.js. This feature has to be enabled on RichEditor only whithout affecting other suggester based components. When the user starts typing by using @ in RichEditor, automatically the list of active roles has to be displayed right away to propose to the user those roles. When the user starts typing, the list is reduced switch the typed text and the displayed label to represent the role. By example, when starting to type @m, only Members has to remain in the list of selectable roles. (filtering should apply on Roles as well)

When the user selects a role in a designated space, same as for a user, we will have to replace the content with @member:1554 (for user case, the generated content saved in activity is @username) where:

Note that the separator : is used here to not have collision with existing contents using usernames which doesn't allow to have this character. (No username is allowed with ':').

The Task comment component has to be reworked to reuse the same directive of v-identity-provider used in Activity stream.

Services & processing

When mentioning a user in an activity or activity comment, the stored content is using @username only without html content to represent the full user data. This is on purpose to rely all time on fresh data that represents the user when displaying it in the frontend (Fullname, Avatar ...). The same behavior has to be copied/used in Task comments (which is currently not the case)

The user display processing is made using the class MentionUtils coming from social. This should be used and improved in all RichEditor content based components. In this class we will have to extract group mentions as well to be used to process content to display (converting mentions into v-identity-provider directive) and should be used as well in Notification services to extract the user for whom the notifications will be sent.

[!NOTE] In order to centralize all mention processing, the MentionUtils should hold all business logic of mentioning extracting and replacement including RDBMSActivityStorageImpl#parseMention and org.exoplatform.task.domain.Comment#parseMentionedUsers.

For the notifications, since the plugins ActivityMentionPlugin and TaskMentionedPlugin aren't mutable, no behavior change is needed in the Notification API codebase to allow notifying users notified in muted spaces.

srenault-meeds commented 6 months ago

FYI @margondicco if you can take a look at it. We have decided to make it a MIP instead of an issue Indeed, this is though a change so we need to make sure you are aware of it. Thanks

margondicco commented 6 months ago

Hello great ! Go fonc of course.

srenault-meeds commented 6 months ago

Ready for tech spec cc @boubaker

boubaker commented 5 months ago

Ready for Tech Spec Review by DAO members ( eXo : @rdenarie )

rdenarie commented 5 months ago

Go tech

boubaker commented 5 months ago

Ready for review by DAO members ( eXo : @rdenarie ). ACCs are up to date as well

boubaker commented 5 months ago

BTW, you may need adaptations @rdenarie for News and other contents where the mentioning is used

rdenarie commented 5 months ago

Can you explain which kind of adaptations ?

boubaker commented 5 months ago

The News allows to mention users (and automatically, when part of the space, allows to mention roles of the space) image

In order to interpret the roles mention, you will have to use the same adaptation made for Kudos PR by example image

When building the REST DTO of News, you can use MentionUtils.substituteUsernames in order to replace the mention by the label translated in user locale. Same for notifications content, you can use the user locale to build the content to send in email notification.

rdenarie commented 5 months ago

@boubaker I'm working on news adaptation

I see one problem : When using french, and when you have redactors in the space : typing @red find nothing typing @réd find 'Rédacteurs'

I think it should be accentued char incencitive.

It can be done in a specific issue, no pb to let as is for the moment.

Let me finish the news adaptation, and then you will be able to merge. Thanks

boubaker commented 5 months ago

@boubaker I'm working on news adaptation

I see one problem : When using french, and when you have redactors in the space : typing @red find nothing typing @réd find 'Rédacteurs'

I think it should be accentued char incencitive.

It can be done in a specific issue, no pb to let as is for the moment.

Let me finish the news adaptation, and then you will be able to merge. Thanks

ok thanks for the feedback.

rdenarie commented 5 months ago

Hello, Ok for me, you can process to the merge. The news pr is also ready, and will be merged after yours

rdenarie commented 5 months ago

@boubaker I'm working on news adaptation I see one problem : When using french, and when you have redactors in the space : typing @red find nothing typing @réd find 'Rédacteurs' I think it should be accentued char incencitive. It can be done in a specific issue, no pb to let as is for the moment. Let me finish the news adaptation, and then you will be able to merge. Thanks

ok thanks for the feedback.

Did you already create the issue ?

boubaker commented 5 months ago

@boubaker I'm working on news adaptation I see one problem : When using french, and when you have redactors in the space : typing @red find nothing typing @réd find 'Rédacteurs' I think it should be accentued char incencitive. It can be done in a specific issue, no pb to let as is for the moment. Let me finish the news adaptation, and then you will be able to merge. Thanks

ok thanks for the feedback.

Did you already create the issue ?

I let you create create it and let @srenault-meeds qualify it.

boubaker commented 5 months ago

Hello, Ok for me, you can process to the merge. The news pr is also ready, and will be merged after yours

PRs Merged to develop.