Hide last authors
Manuel Leduc 25.1 1 = Introduction =
2
3 Mentions are a structured way to reference users in the text (e.g., comments, annotations, documents).
4
5 They are usually visually distinguishable by an (% class="mark" %)##@##(%%) prefix followed by the identifier of a user, often in hypertext form (e.g., @[[mleduc>>https://www.xwiki.org/xwiki/bin/view/XWiki/mleduc]]).
6
7
8 This document first presents the [[specifications>>||anchor="HSpecifications"]]. Then the [[discussion>>||anchor="HDiscussions"]] list some topic for which no final decision has been made. Finally, the [[tasks>>||anchor="HTasks"]] section presents a more technical and fine-grained description of the tasks required for the integration of the mentions in XWiki.
Manuel Leduc 46.1 9
Manuel Leduc 50.1 10 The [[implementation>>||anchor="HImplementation"]] section describes the implementation details of the identified use cases.
Manuel Leduc 46.1 11
Manuel Leduc 25.1 12 Additionally, [[existing discussions>>||anchor="HExistingdiscussions"]] list some discussions that are related to the topic of user mentions, and the [[comparison matrix>>||anchor="HComparisonmatrix"]] present a partial view on the integration of user mentions in other wikis and social services.
13
14 = Table of content =
15
16 {{toc numbered="true"/}}
17
18 = Specifications =
19
20 == Mentions Integration ==
21
Manuel Leduc 32.2 22 It should be possible to add mentions to users or groups wherever XWiki syntaxes are supported.
Manuel Leduc 25.1 23
Manuel Leduc 54.1 24 (% class="box warningmessage" %)
25 (((
26 Until [[https:~~/~~/jira.xwiki.org/browse/XWIKI-17315>>https://jira.xwiki.org/browse/XWIKI-17315]] is not solved, the mentions will be focused on the support of mentions to users only.
27 )))
28
Manuel Leduc 32.2 29 The list of impacted fields includes:
Manuel Leduc 25.1 30
31 * documents body
32 * comments (integrate rich editor)
33 * annotations (integrate rich editor)
34 * textarea fields in AWM (the rich editor is a user choice in the AWM settings)
35
36 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.
37
38 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.
39
40 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...).
41
Manuel Leduc 47.2 42 Mentions of removed users should still be displayed clearly, it should possibly be identifiable visually that the user has been removed with a strikethrough on the name (which is not easy to identify in the context of AP for instance).
Manuel Leduc 25.1 43
Manuel Leduc 36.2 44 (% class="wikigeneratedid" %)
45 [[image:Screenshot from 2020-05-11 14-52-05.png]]
46
Manuel Leduc 25.1 47 == Notifications ==
48
49
50 === Notifications content ===
51
52 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.
53
54 A non-comprehensive list includes:
55
56 * the user that made the mention
57 * the type of entity in which the mention occurred (document body, comment, annotation...)
58 * (((
59 a direct link to the entity, e.g.,
60
61 * the body of a document, ideally an anchor to the § where the mention occurs.
Manuel Leduc 32.2 62 * an anchor to the comment
63 * an anchor to the annotation
64 * an anchor to the AWM field in the document in read mode.
Manuel Leduc 25.1 65 )))
66
67 === Notifications answer ===
68
Manuel Leduc 48.3 69 The most basic scenario is to click on the link in the notification and to interact with the wiki as usual.
Manuel Leduc 25.1 70
71 More advanced scenarios include:
72
73 * having a form to interact with the content directly in the content of the notification created by the mention
74 * being able to answer directly to mail eventually received as a notification of a mention
75
76 === Notifications settings ===
77
78 Notifications of mentions should be integrated into the notifications settings of the wiki, using the notifications framework provided by XWiki.
79
80 Notifications must be activated by default to help users discover the new feature by receiving mentions.
81
82 [[image:image-20200507101357956.png]]
83
84 == Extensibility ==
85
86 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.
87
88 The main use case of this is the integration of user mentions on ActivityPub (see [[https:~~/~~/design.xwiki.org/xwiki/bin/view/Proposal/ActivityPub>>url:https://design.xwiki.org/xwiki/bin/view/Proposal/ActivityPub]]).
89
90 The list of extension points should include:
91
92 * users suggestions in the rich editor
Manuel Leduc 48.3 93 * user identifiers resolution
Manuel Leduc 25.1 94 * an extension point on the notifications emission.
95
Manuel Leduc 51.1 96 Besides, the core of the mentions must support unknown types of external users.
Manuel Leduc 25.1 97
98 = Discussions =
99
100 == Requesting view rights ==
101
102 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.
103
104 === Messaging ===
105
106 The most basic solution is to simply send a message to the user that triggered the mentions, asking for access to the page.
107
108 === Ad-hoc mechanism ===
109
110 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.
111
112
113 = Tasks =
114
115 |=UC#|=Depends on|=Title|=Complexity|=Priority
116 |UC1| |[[Rich editor integration>>||anchor="HUC1.Richeditorintegration"]]|Medium|High
117 |UC2|UC3|[[Adding an auto-completion on the rich editor>>||anchor="HUC2.Addinganauto-completiononthericheditor"]]|Medium|High
Manuel Leduc 55.1 118 |UC3 |UC13|[[Mention macro>>||anchor="HUC3.Mentionmacro"]]|Medium|High
Manuel Leduc 25.1 119 |UC4 |UC3|[[Mention macro settings>>||anchor="HUC4.Mentionmacrosettings"]]|Easy|Low
120 |UC5.1 | |[[Mentions in XWiki/2.2>>||anchor="HUC5.1.XWiki2F2.2"]]|Hard|Low
Manuel Leduc 39.3 121 |UC6 |UC3|[[New mentions identification>>url:https://design.xwiki.org/xwiki/bin/view/Proposal/UserMentions#HUC6.Newmentionsidentification]]|Hard|Medium
122 |UC7.1|UC6|[[Notifications integration>>||anchor="HUC7.1Notificationsintegration"]]|Medium|High
Manuel Leduc 25.1 123 |UC7.2|UC7.1|[[Notifications settings>>||anchor="HUC7.2Notificationssettings"]]|Medium|Medium
Manuel Leduc 56.1 124 |UC7.3| |Notification linking to anchor|Medium|Medium
125 |UC7.4| |Mention summary on the notification|Medium|Medium
Manuel Leduc 25.1 126 |UC8|UC7.1|[[Answering to a notification from the notification>>||anchor="HUC8.Answeringtoanotificationfromthenotification"]]|Medium|Low
127 |UC9|UC7.1|[[Answer to a notification by email>>||anchor="HUC9.Answertoanotificationbyemail"]]|Hard|Low
Manuel Leduc 48.3 128 |UC10| |[[Integration of browser notifications>>url:https://design.xwiki.org/xwiki/bin/view/Proposal/UserMentions#HUC10.IntegrationofbrowserA0notifications]]|TBD|Medium
129 |UC11|UC7.1|[[Integration of answers from external source>>url:https://design.xwiki.org/xwiki/bin/view/Proposal/UserMentions#HUC11.Integrationofanswersfromexternalsource]]|Medium|Low
Manuel Leduc 49.3 130 |UC12| |[[Auto page watch>>url:https://design.xwiki.org/xwiki/bin/view/Proposal/UserMentions#HUC12.Autopagewatch]]|Easy|Low
Manuel Leduc 55.1 131 |UC13| |[[User or group picker>>url:https://design.xwiki.org/xwiki/bin/view/Proposal/UserMentions#HUC14.Userorgrouppicker]]|Hard|Medium
Manuel Leduc 25.1 132
Manuel Leduc 20.1 133 == UC1. Rich editor integration ==
Manuel Leduc 17.6 134
Manuel Leduc 26.1 135 The mention feature must be eased by the generalization of the integration of the rich editor.
Manuel Leduc 12.1 136
Manuel Leduc 51.1 137 This is currently not the case and multiple places where it would be interesting to have user mentions (i.e., comments and annotations) support XWiki syntax without being supported by a rich editor.
Manuel Leduc 12.1 138
Manuel Leduc 26.1 139 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.
Manuel Leduc 12.1 140
Manuel Leduc 26.1 141
Manuel Leduc 29.1 142 {{gallery}}
Manuel Leduc 31.1 143 [[image:Screenshot from 2020-05-11 10-16-28.png]]
144 [[image:Screenshot from 2020-05-11 10-17-44.png]]
Manuel Leduc 29.1 145 {{/gallery}}
146
Manuel Leduc 26.1 147
Manuel Leduc 25.1 148 == UC2. Adding an auto-completion on the rich editor ==
Manuel Leduc 12.1 149
Manuel Leduc 25.1 150 Typing @ in the rich editor must present an auto-completion of available users and groups and automatically insert the corresponding macro in the text.
Manuel Leduc 12.1 151
Manuel Leduc 39.1 152
153
154 (% class="wikigeneratedid" %)
155 [[image:Untitled.png]]
156
Manuel Leduc 25.1 157 == UC3. Mention macro ==
Manuel Leduc 24.1 158
Manuel Leduc 25.1 159 The mention macro must allow declaring a mention. This macro has one field pointing to a single user or group.
Manuel Leduc 24.1 160
Manuel Leduc 25.1 161 The macro must be displayed in a distinctive and identifiable way.
Manuel Leduc 24.1 162
Manuel Leduc 25.1 163 Mentions to the current user and/or a group in which the current is must be highlighted in specific colors.
Manuel Leduc 24.1 164
Manuel Leduc 25.1 165 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)
166
167 == UC4. Mention macro settings ==
168
169 Variations points of the mention macro must be configurable in the skins administration
170
171 [[image:image-20200507110127020.png]]
172
173 == UC5. Mention in the syntax ==
174
175 Mentions could be integrated as first-class entities in some syntaxes supported in the wiki if those syntaxes have build-in support for it.
176
177 === UC5.1. XWiki/2.2 ===
178
179 (% class="wikigeneratedid" %)
180 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>>||anchor="HLinksextensibility"]].
181
182 === UC5.x. Other syntaxes ===
183
184 TBD
185
Manuel Leduc 32.5 186 == UC6. New mentions identification ==
Manuel Leduc 25.1 187
188
189
Manuel Leduc 34.1 190 A user must only be notified on the first save after the introduction of a mention. That does not prevent the user to be notified several times (eventually for a single document save) if her name is newly introduced in several places of a text at once.
Manuel Leduc 32.5 191
Manuel Leduc 33.1 192 See the [[Implementation>>||anchor="HImplementation"]] for more details of the realization of this feature.
Manuel Leduc 32.5 193
Manuel Leduc 25.1 194 == UC7. Notifications ==
195
196 === UC7.1 Notifications integration ===
197
198 The notifications must be integrated and triggered from the relevant places and must rely on the mentions history to avoid duplicates.
199
200 Multiple templates must be defined, for each place where mentions can be defined.
201
202 === UC7.2 Notifications settings ===
203
Manuel Leduc 40.1 204 Integrate settings in the configuration to activate mentions at the level of the administration and at the level of individual users.
Manuel Leduc 25.1 205
206 [[image:image-20200507101630235.png]]
207
Manuel Leduc 56.1 208 (% class="wikigeneratedid" %)
209 === UC7.3 Notification linking to anchor ===
210
211 Notification must be improve to link to the most precise point where the mention occurred:
212
213 * document body: anchor to the paragraph of the mention
214 * comments/annotations: anchor to the comment in the comment section of the page
215 * AWM field: anchor to the AWM field
216
217 === UC7.4 Mention summary on the notification ===
218
219 The notification must include a extract of the text surrounding the mention, in the form "... some text @user some more text ..." allowing the mentioned user to have a quick overview of the context in which the mention occurred.
220
Manuel Leduc 25.1 221 == UC8. Answering to a notification from the notification ==
222
223 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.
224
Manuel Leduc 51.1 225 The way the answer is integration depends on the place where the mention originates from.
Manuel Leduc 32.4 226
227 |=Origin|=Answer
228 |Document body|The answer is integrated as an annotation around the user's mention in the document.
229 |Comment|The answer is integrated as a comment answering the originating comment.
Manuel Leduc 51.1 230 |Annotation|The answer is integrated as a comment answering the originating annotation (which are actually handled as a comment, so the UX is similar to the comment case).
231 |AWM textarea|As of today no mechanism allows a text to be attached to a specific text. Consequently, answering an AWM textarea is not supported and no answer should be proposed to the mentioned user in this case.
Manuel Leduc 32.4 232
Manuel Leduc 25.1 233 == UC9. Answer to a notification by email ==
234
235 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.
236
237 The answer is then integrated as an answer in the web interface.
238
Manuel Leduc 32.4 239 Answering by email follows the same logic as UC8. Answering to a notification from the specifications.
240
Manuel Leduc 32.2 241 == UC10. Integration of browser notifications ==
242
243 Notifications can currently be displayed to the user through the notification menu and by email.
244
Manuel Leduc 51.1 245 It should be possible to receive notifications using the [[Browser notification API>>https://notifications.spec.whatwg.org/]] integrated into [[most major browsers>>https://caniuse.com/#search=notifications]].
Manuel Leduc 32.2 246
247 The browser notification can be activated in the same way as other notification methods, either globally in the administration, or for a user in her notification settings.
248
249 [[image:Screenshot from 2020-05-11 11-00-39.png]]
250
Manuel Leduc 51.1 251 This feature is orthogonal to the integration of the user mentions, but allow better integration of the user's notifications in her browser (and eventually in the underlying OS).
Manuel Leduc 32.2 252
Manuel Leduc 32.4 253 == UC11. Integration of answers from external source ==
254
Manuel Leduc 51.1 255 If the mentions are notified to an external user using an extension mechanism (for instance in the context of an integration of the user mentions with ActivityPub), answers to the notification (for instance by a comment on Mastodon), should be gracefully integrated into the UI.
Manuel Leduc 32.4 256
257 In summary, answering to mentions should be open to extensions.
258
Manuel Leduc 49.2 259 == UC12. Auto page watch ==
Manuel Leduc 36.3 260
Manuel Leduc 51.1 261 Whenever a user is mentioned in a document, he is automatically added to the watchers of the document.
Manuel Leduc 49.2 262
263 This feature must be deactivated by default and could be activated by a setting in the user profile (section Watched Pages of the notification preference section, along with the Automatic page watching setting).
264
Manuel Leduc 55.1 265 == UC13. User or group picker ==
Manuel Leduc 49.2 266
Manuel Leduc 54.2 267 A picker suggesting users and groups is currently missing and is required for a seamless UX of the user mentions macro (UC3)
Manuel Leduc 49.4 268
Manuel Leduc 25.1 269 == Tasks on Jira ==
270
271 {{jira url="https://jira.xwiki.org" source="jql"}}
272 labels = mentions ORDER BY priority DESC
273 {{/jira}}
274
Manuel Leduc 32.5 275 = Implementation =
Manuel Leduc 25.1 276
Manuel Leduc 32.5 277 This section details further the implementation details of the user mention integration.
278
279 == General guidelines ==
280
Manuel Leduc 51.1 281 The business logic triggered by the introduction of a mention must be asynchronous and must not impact the reactiveness of  the UX.
Manuel Leduc 32.5 282
Manuel Leduc 40.1 283 == Rich editor integration ==
284
285
286
287 (% class="wikigeneratedid" %)
288 Activating the rich editor is simply added using {{code language="javascript"}}CKEDITOR.replace('identifier'){{/code}}.
289
Manuel Leduc 40.2 290 (% class="box warningmessage" %)
291 (((
292 Is placing this operation enough?
293 )))
Manuel Leduc 40.1 294
Manuel Leduc 40.3 295 == Mentions auto-completion ==
Manuel Leduc 40.2 296
297
298 (% class="wikigeneratedid" %)
299 The mechanism is the same as for [[links autocompletion>>https://github.com/xwiki-contrib/application-ckeditor/blob/4f6f909f91681d00793b9f08b7419445f569ab82/ui/src/main/resources/CKEditor/EditSheet.xml#L342]] the main differences being:
300
301
302
303 * The itemTemplate, which inject a mention macro instead
304 * The feed, which should point to a page which returns a list of matched users and group according to the substring currently typed by the user. This page is technically similar to CKEditor.LinkSuggestions.
305 * The marker: '@'
306 * Cached: yes
307
308 == Mentions macro ==
309
310
311 (% class="wikigeneratedid" %)
312 The mention macro is a macro which has the following properties:
313
314
315
316 * Macro Id: mention
317 * Macro Name: Mention
Manuel Leduc 48.1 318 * Macro description: Insert a user mention
Manuel Leduc 40.2 319 * Support inline mode: yes
320 * macro visibility: current wiki
321 * macro content availability: no content
322
Manuel Leduc 40.3 323 (% class="wikigeneratedid" %)
Manuel Leduc 47.3 324 The macro has two parameters which have the following properties:
Manuel Leduc 40.3 325
Manuel Leduc 47.3 326 Identifier:
Manuel Leduc 40.3 327
328 * id: identifier
Manuel Leduc 48.2 329 * description: The identifier of the mentioned user or group.
Manuel Leduc 40.3 330 * Mandatory: yes
331
Manuel Leduc 47.3 332 Display choice:
333
334 * id: displayChoice
Manuel Leduc 48.2 335 * description: The display choice of the mention (this is only supported for user mention).
Manuel Leduc 47.3 336 * Mandatory: yes
337 * Choices:
338 ** First name + last Name
339 ** First name
340 ** User login
341
Manuel Leduc 40.3 342 (% class="wikigeneratedid" %)
343 The parameter takes a single fully qualified user or group identifier (e.g., xwiki:XWiki.U1, xwiki:XWiki.MyGroup, [email protected]).
Manuel Leduc 51.1 344 The identifier is later resolved as a local or external user following a chain of resolvers by calling the components that implement the MentionUserResolver roles, ordered by their priority.
Manuel Leduc 40.3 345
346 (% class="wikigeneratedid" %)
Manuel Leduc 51.1 347 That way, extensions can be added to resolve new kinds of users (for instance, using webfinger for activitypub).
Manuel Leduc 40.3 348
349
Manuel Leduc 36.2 350 == Mentions style ==
351
352 === Html ===
353
354 {{code language="html"}}
355 <a class="mention user self">@Admin</a> <a class="mention user">@OtherUser</a> <a class="mention group self">@XWikiAdminGroup</a> <a class="mention group">@OtherGroup</a>
356 {{/code}}
357
358 === CSS ===
359
Manuel Leduc 36.3 360 Of course the actual colors used in the style must be retrieved from the value configured in the skin settings.
361
Manuel Leduc 36.2 362 {{code language="css"}}
363 a.mention {
364 background-color: #c2c2c25e;
365 border-radius: 8px;
366 padding: 2px 5px 2px 5px;
367 }
368
369 a.mention.user.self {
370 background-color: #ff00005e;
371 }
372
373 a.mention.group.self {
374 background-color: #00ff005e;
375 }
Manuel Leduc 47.2 376
377 a.mention.removed {
378 text-decoration: line-through;
379 }
Manuel Leduc 36.2 380 {{/code}}
381
Manuel Leduc 34.2 382 == Mention creation ==
383
Manuel Leduc 51.1 384 Mentions are identified by listening to XWiki existing events. The events listed below are listened to using a class implementing org.xwiki.observation.AbstractEventListener.
Manuel Leduc 34.2 385
386 |=Type|=Events|=Content
Manuel Leduc 53.1 387 |Document/AWM textarea| org.xwiki.bridge.event.DocumentCreatedEvent, org.xwiki.bridge.event.AnnotationAddedEvent|XDOM/Fields of type LargeStringProperty of the objects of the document.|
388 |Comment|org.xwiki.bridge.event.CommentAddedEvent, org.xwiki.bridge.event.AnnotationAddedEvent|XDOM|
389 |Annotation|org.xwiki.bridge.event.AnnotationAddedEvent, org.xwiki.bridge.event.AnnotationAddedEvent|XDOM|
Manuel Leduc 34.2 390
Manuel Leduc 52.5 391 To make the event handling asynchronous, the only task of this event listener is to create a job executor request ({{{MentionRequest}}}) later handled by a dedicated {{{org.xwiki.contrib.activitypub.internal.async.jobs.AbstractPageNotificationJob<MentionRequest, MentionStatus>}}} implementation, in charge of the identification of actual mentions in the content.
Manuel Leduc 52.4 392
Manuel Leduc 52.5 393 In the case of content initial creation ({{{DocumentCreatedEvent, CommentAddedEvent, AnnotationAddedEvent}}}), all occurrences of the mention macro found in the content trigger a mention.
Manuel Leduc 34.2 394
Manuel Leduc 52.5 395 In case of content update ({{{AnnotationAddedEvent, AnnotationAddedEvent, AnnotationAddedEvent}}}), a comparison is realized against the previous version of the document, only newly introduced mention macro triggers a mention.
Manuel Leduc 51.1 396 Newly identified mention are realized by counting the number of occurrences of the mentions to a given user in the updated XDOM, and to do the same task on the initial XDOM. A notification is sent to a given user if her number of mentions has increased.
Manuel Leduc 34.2 397
Manuel Leduc 52.2 398 (% class="box infomessage" %)
399 (((
400 This mechanism might be refined later to improve the accuracy of the user mentions notifications.
401 )))
402
Manuel Leduc 51.1 403 Note that this count must be realized after the resolution of the mentions macro's identifiers because there might be more than one way to identify the same user.
Manuel Leduc 41.1 404
Manuel Leduc 52.5 405 In practice, triggering a mention is realized by emitting a new event called {{{org.xwiki.bridge.event.MentionCreatedEvent}}}.
Manuel Leduc 34.3 406
Manuel Leduc 51.1 407 One event is created for each mentioned user. If a mention refers to a group, an event is created for each member of the group.
Manuel Leduc 43.2 408
Manuel Leduc 35.1 409 == MentionCreatedEvent handling ==
Manuel Leduc 34.3 410
Manuel Leduc 52.5 411 This event can be freely listened to using a class implementing {{{org.xwiki.observation.AbstractEventListener}}}.
Manuel Leduc 35.1 412
Manuel Leduc 52.5 413 We provide a default implementation that is in charge to identify if the mentioned user is a local user of the XWiki, and if so, send a notification using the {{{org.xwiki.observation.ObservationManager}}} component.
Manuel Leduc 35.1 414
415 Dedicated events must be created, for each type of notification:
416
Manuel Leduc 52.5 417 * {{{DocumentMentionEvent}}}: for mentions from a document body
418 * {{{AnnotationMentionEvent}}}: for mentions from an annotation
419 * {{{CommentMentionEvent}}}: for mentions from a comment
420 * {{{AWMFieldMentionEvent}}}: for mentions from an AWM textarea field
Manuel Leduc 35.1 421
422 == Notifications integration ==
423
424 This component is dedicated to the handling and display of the mentions event.
425
426 A specific template is to be defined for each type of mention.
427
Manuel Leduc 52.3 428 The sections below present drafts of the content of the mentions according to the origin (document body, commment...) and the type of the entity mentioned (user/group).
429
Manuel Leduc 44.1 430 === User ===
431
432 ==== Document body ====
433
Manuel Leduc 44.2 434 You are mentioned by ~_~_USER_NAME~_~_ (+ link to user) on ~_~_DOCUMENT_NAME~_~_. (link to the document view + anchor to the mention).
435
436 (citation) ~_~_100 char before and 100 chars after the mentions~_~_
437
Manuel Leduc 49.1 438 Answer button
Manuel Leduc 44.2 439
Manuel Leduc 44.1 440 ==== Document comment ====
441
Manuel Leduc 44.2 442 You are mentioned by ~_~_USER_NAME~_~_ (+ link to user) on ~_~_DOCUMENT_NAME~_~_ comments. (link to the document view + anchor to the comment).
Manuel Leduc 44.1 443
Manuel Leduc 44.2 444 (citation) ~_~_100 char before and 100 chars after the mentions~_~_
445
Manuel Leduc 49.1 446 Answer button
Manuel Leduc 44.2 447
Manuel Leduc 44.1 448 ==== Document annotation ====
449
Manuel Leduc 44.2 450 You are mentioned by ~_~_USER_NAME~_~_ (+ link to user) on an annotation on ~_~_DOCUMENT_NAME~_~_. (link to the document view + anchor to the annotation on the comments section).
Manuel Leduc 44.1 451
Manuel Leduc 44.2 452 (citation) ~_~_100 char before and 100 chars after the mentions~_~_
453
Manuel Leduc 49.1 454 Answer button
Manuel Leduc 44.2 455
Manuel Leduc 50.2 456 ==== Document AWM textarea field ====
Manuel Leduc 44.1 457
Manuel Leduc 44.2 458 You are mentioned by ~_~_USER_NAME~_~_ (+ link to user) on the field ~_~__FIELD_NAME~_~_ of  ~_~_DOCUMENT_NAME~_~_ (link to the document view + anchor to the field).
Manuel Leduc 44.1 459
Manuel Leduc 44.2 460 (citation) ~_~_100 char before and 100 chars after the mentions~_~_
461
Manuel Leduc 44.1 462 === Group ===
463
464 ==== Document body ====
465
Manuel Leduc 44.2 466 The group ~_~_GROUP_NAME~_~_ (+ link to group) is mentioned by ~_~_USER_NAME~_~_ (+ link to user) on ~_~_DOCUMENT_NAME~_~_. (link to the document view + anchor to the mention).
467
468 (citation) ~_~_100 char before and 100 chars after the mentions~_~_
469
Manuel Leduc 49.1 470 Answer button
Manuel Leduc 44.2 471
Manuel Leduc 44.1 472 ==== Document comment ====
473
Manuel Leduc 44.2 474 The group ~_~_GROUP_NAME~_~_ (+ link to group) is mentioned by ~_~_USER_NAME~_~_ (+ link to user) on ~_~_DOCUMENT_NAME~_~_ comments. (link to the document view + anchor to the comment).
Manuel Leduc 44.1 475
Manuel Leduc 44.2 476 (citation) ~_~_100 char before and 100 chars after the mentions~_~_
477
Manuel Leduc 49.1 478 Answer button
Manuel Leduc 44.2 479
Manuel Leduc 44.1 480 ==== Document annotation ====
481
Manuel Leduc 44.2 482 The group ~_~_GROUP_NAME~_~_ (+ link to group) is mentioned by ~_~_USER_NAME~_~_ (+ link to user) on an annotation on ~_~_DOCUMENT_NAME~_~_. (link to the document view + anchor to the annotation on the comments section).
Manuel Leduc 44.1 483
Manuel Leduc 44.2 484 (citation) ~_~_100 char before and 100 chars after the mentions~_~_
485
Manuel Leduc 49.1 486 Answer button
Manuel Leduc 44.2 487
Manuel Leduc 50.2 488 ==== Document AWM textarea field ====
Manuel Leduc 44.1 489
Manuel Leduc 44.2 490 The group ~_~_GROUP_NAME~_~_ (+ link to group) is mentioned by ~_~_USER_NAME~_~_ (+ link to user) on the field ~_~__FIELD_NAME~_~_ of  ~_~_DOCUMENT_NAME~_~_ (link to the document view + anchor to the field).
Manuel Leduc 44.1 491
Manuel Leduc 44.2 492 (citation) ~_~_100 char before and 100 chars after the mentions~_~_
493
Manuel Leduc 49.1 494
495 === Answering ===
496
Manuel Leduc 51.1 497 Clicking the "Answer button" opens a modal window that provides a larger preview around the mentions and presents a textarea supporting XWiki syntax and rich editing.
Manuel Leduc 49.1 498
Manuel Leduc 51.1 499 Filling and submitting this textarea send an answer for the mention.
Manuel Leduc 49.1 500
Manuel Leduc 43.1 501 == Integration of browser notifications ==
502
503 See [[https:~~/~~/developer.mozilla.org/en-US/docs/Web/API/Notifications_API/Using_the_Notifications_API>>https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API/Using_the_Notifications_API]] .
504
Manuel Leduc 51.1 505 Note that the notification cannot be rendered as html, so their body and title must eventually be converted to plain text before being sent through this API.
Manuel Leduc 43.1 506
Manuel Leduc 49.1 507 Another important point is the management and activation of the notification user rights.
Manuel Leduc 43.1 508
Manuel Leduc 51.1 509 Indeed, using Firefox, the pop-up below is only displayed to the user following and user action (e.g., a click event), otherwise, the query is proposed but not displayed to the user, who has to go activate the feature by himself.
Manuel Leduc 43.1 510
511 (% class="box warningmessage" %)
512 (((
513 Define how to trigger this popup on firefox
514 )))
515
516 [[image:05-15-54-58-Screenshot-2019-04-01-at-11.00.42-600x247.png_Ima.jpg]]
517
Manuel Leduc 25.1 518 = Existing discussions =
519
520 This section collects discussions that are related to user mentions.
521
522 Mentions in CKEditor https://forum.xwiki.org/t/user-mention-in-ck-editor/843
523
524 == Links extensibility ==
525
526 * Proposal [[https:~~/~~/jira.xwiki.org/browse/XRENDERING-290>>https://jira.xwiki.org/browse/XRENDERING-290]]
527 ** Discussion [[https:~~/~~/xwiki.markmail.org/thread/vw3derowozijqalr>>https://xwiki.markmail.org/thread/vw3derowozijqalr]] / Vote + Discussion: [[http:~~/~~/markmail.org/message/t2wb2xq7534qsshg>>http://markmail.org/message/t2wb2xq7534qsshg]]
528 ** Second vote [[http:~~/~~/markmail.org/message/colazwowt2lcpm5y>>url:http://markmail.org/message/colazwowt2lcpm5y]]
529 ** PoC [[https:~~/~~/github.com/xwiki/xwiki-rendering/compare/82958ceb6d78%5E...fcdc93e75ed0>>https://github.com/xwiki/xwiki-rendering/compare/82958ceb6d78%5E...fcdc93e75ed0]]
530
531 = Comparison matrix =
532
533 |=Product|=Documentation|=ActivityPub?|=Details
534 |Mastodon| |yes|Webfinger ids or user login for the local instance, prefixed with @.
535 |Twitter| |no|User login prefixed with @
536 |Wordpress|[[https:~~/~~/wordpress.com/support/user-mentions/>>https://wordpress.com/support/user-mentions/]]|yes (by extension)|User login prefixed with @
537 |Discourse| |no|User login prefixed with @
538 |Jira| |no|User login prefixed with @
539 |MediaWiki| | |Special link format (##~[~[User:Username]]##)
540 |Drupal|[[https:~~/~~/www.drupal.org/project/mentions>>https://www.drupal.org/project/mentions]]| |Special link format ([@userlogin]). Displayed with the user login prefixed with @
541 |Confluence|[[https:~~/~~/confluence.atlassian.com/doc/mentions-251725350.html>>https://confluence.atlassian.com/doc/mentions-251725350.html]]| |User login prefixed with @

Get Connected