User Mentions
Description
Introduction
Mentions are a structured way to reference users in the text (e.g., comments, annotations, documents).
They are usually visually distinguishable by an @ prefix followed by the identifier of a user, often in hypertext form (e.g., @mleduc).
This document first presents the specifications. Then the discussion list some topic for which no final decision has been made. Finally, the tasks section presents a more technical and fine-grained description of the tasks required for the integration of the mentions in XWiki.
Additionally, existing discussions list some discussions that are related to the topic of user mentions, and the comparison matrix present a partial view on the integration of user mentions in other wikis and social services.
Table of content
- Introduction
- Table of content
- Specifications
- Discussions
- Tasks
- Existing discussions
- Comparison matrix
Specifications
Mentions Integration
It should be possible to add mentions to users or groups wherever XWiki syntaxes are supported.
A comprehensive list includes:
- documents body
- comments (integrate rich editor)
- annotations (integrate rich editor)
- textarea fields in AWM (the rich editor is a user choice in the AWM settings)
In the rich editor, it should be easy to include a mention using only the keyboard, and without having to use the macro section of the rich editor menu.
Mentions must be visually identifiable in the text, for instance, the user name or group could have a specific background color. Similarly, mentions to the current user and/or a group in which the current user is must be highlighted in specific colors.
The default content of the display mention should be the first name + last name of the user. It should be possible to change the content to first name only, or to the login of the user. I don't know if it's a good idea to be able to allow to change the text of the mention for a free text (confusing, risk of link scamming...).
Mentions of removed users should still be displayed clearly, eventually identified visually that the user has been removed (which is not easy to identify in the context of AP for instance).
Notifications
Notifications rules
Mentioning a user of a group must trigger an event, eventually leading to the notification of the concerned users.
Nonetheless, users should not be notified several times for the same mention (e.g., when a document is edited and a mention to a given user was already in the document).
Notifications content
The content of a notification message must include as much content as possible regarding the context in which the mention occurred. This content must be as specific as possible according to the type of entity in which the mention occurred.
A non-comprehensive list includes:
- the user that made the mention
- the type of entity in which the mention occurred (document body, comment, annotation...)
a direct link to the entity, e.g.,
- the body of a document, ideally an anchor to the § where the mention occurs.
- an anchor to a comment
- an anchor to an annotation
Notifications answer
The most basic scenario is to click on the link in the notification and to interact with the wiki as usual
More advanced scenarios include:
- having a form to interact with the content directly in the content of the notification created by the mention
- being able to answer directly to mail eventually received as a notification of a mention
Notifications settings
Notifications of mentions should be integrated into the notifications settings of the wiki, using the notifications framework provided by XWiki.
Notifications must be activated by default to help users discover the new feature by receiving mentions.
Extensibility
While the nominal scenario is the integration of mentions inside an XWiki instance (and its sub-wikis). The mentions features must be extensible to let extensions add new features on tops of the mentions.
The main use case of this is the integration of user mentions on ActivityPub (see https://design.xwiki.org/xwiki/bin/view/Proposal/ActivityPub).
The list of extension points should include:
- users suggestions in the rich editor
- an extension point on the notifications emission.
In addition, the core of the mentions must support unknown types of external users.
Discussions
Requesting view rights
If a user tries to access a document for which she does not have the read right (for instance, after being mentioned inside the given document), an action should allow requiring access to the page.
Messaging
The most basic solution is to simply send a message to the user that triggered the mentions, asking for access to the page.
Ad-hoc mechanism
A more advanced solution could be to present a button that would send a query to whoever has the right to set the read right for this page.
Tasks
UC# | Depends on | Title | Complexity | Priority |
---|---|---|---|---|
UC1 | Rich editor integration | Medium | High | |
UC2 | UC3 | Adding an auto-completion on the rich editor | Medium | High |
UC3 | Mention macro | Medium | High | |
UC4 | UC3 | Mention macro settings | Easy | Low |
UC5.1 | Mentions in XWiki/2.2 | Hard | Low | |
UC6 | UC3 | Mentions history | Hard | Medium |
UC7.1 | UC6 | Notifications integration | Medium | High |
UC7.2 | UC7.1 | Notifications settings | Medium | Medium |
UC8 | UC7.1 | Answering to a notification from the notification | Medium | Low |
UC9 | UC7.1 | Answer to a notification by email | Hard | Low |
UC1. Rich editor integration
The mention feature must be eased by the generalization of the integration of the rich editor.
This is currently not the case and multiple places where is would be interesting to have user mentions (e.g., comments, annotations, AWM textareas) support XWiki syntax without being supported by a rich editor.
The rich editor must be integrated on every textarea supporting the XWiki syntax and be activated by default for users that choose wysiwyg as by default.
The places where the rich editor is not currently integrated are the comments and the annotations textareas.
UC2. Adding an auto-completion on the rich editor
Typing @ in the rich editor must present an auto-completion of available users and groups and automatically insert the corresponding macro in the text.
UC3. Mention macro
The mention macro must allow declaring a mention. This macro has one field pointing to a single user or group.
The macro must be displayed in a distinctive and identifiable way.
Mentions to the current user and/or a group in which the current is must be highlighted in specific colors.
The text of the mention should be first name + last name, first name only or user login (the user defining the mention should be able to choose)
UC4. Mention macro settings
Variations points of the mention macro must be configurable in the skins administration
UC5. Mention in the syntax
Mentions could be integrated as first-class entities in some syntaxes supported in the wiki if those syntaxes have build-in support for it.
UC5.1. XWiki/2.2
In the specific context of xwiki/2.2, user mentions could be built around the notions of links to users. See the discussions on Link extensibility.
UC5.x. Other syntaxes
TBD
UC6. Mentions history
A user must not be notified of a mention several times for the same entity (document, comment, annotation...).
A mapping between mentioned users (members of a group must be resolved to their individual users) and entities must be stored and used to identify the relevant notifications.
Similarly, only members present in a group prior to the group mentions should be notified.
A mapping between mentioned groups and entities must also be stored.
A notification is only sent to individual users that have not already be notified, and to groups that have not already been notified. Only group members who have not already been notified are notified.
UC7. Notifications
UC7.1 Notifications integration
The notifications must be integrated and triggered from the relevant places and must rely on the mentions history to avoid duplicates.
Multiple templates must be defined, for each place where mentions can be defined.
UC7.2 Notifications settings
integrate settings in the configuration to activate mentions at the level of the administration and at the level of individual users.
UC8. Answering to a notification from the notification
When a mention links to an entity to which a user can answer (e.g., mentions and notifications), the mention must include a textarea allowing to quickly answer to the mention.
UC9. Answer to a notification by email
When a notification from a mention which a user can answer (e.g., mentions and notifications) is received by email, it should be possible to answer the email directly.
The answer is then integrated as an answer in the web interface.
Tasks on Jira
Existing discussions
This section collects discussions that are related to user mentions.
Mentions in CKEditor https://forum.xwiki.org/t/user-mention-in-ck-editor/843
Links extensibility
Comparison matrix
Product | Documentation | ActivityPub? | Details |
---|---|---|---|
Mastodon | yes | Webfinger ids or user login for the local instance, prefixed with @. | |
no | User login prefixed with @ | ||
Wordpress | https://wordpress.com/support/user-mentions/ | yes (by extension) | User login prefixed with @ |
Discourse | no | User login prefixed with @ | |
Jira | no | User login prefixed with @ | |
MediaWiki | Special link format ([[User:Username]]) | ||
Drupal | https://www.drupal.org/project/mentions | Special link format ([@userlogin]). Displayed with the user login prefixed with @ | |
Confluence | https://confluence.atlassian.com/doc/mentions-251725350.html | User login prefixed with @ |