text
text copied to clipboard
Mention users
It should be possible to mention users
As discussed with @mejo- this would be relatively straight forward to implement on the frontend side now with the picker from #1961
Further steps would be:
- Clarify on markdown representation (e.g. could use the profile url as a link
[@User display name](https://cloud.example.com/u/userid)
) - Clarify individual implementation steps in detail
- Plain mentions in the document
- Notify users about mentions (with proper cleanup once a mention gets removed again)
- Enhanced UX (e.g. suggest to share if a mentioned user doesn't have access to the document yet)
Should also be aligned with the ongoing effort on the Collabora integration at https://github.com/nextcloud/richdocuments/issues/1380
- [ ] Find a fitting markdown it plugin that allows us to store both the mention
@userid
andDisplay name
of the user (could be https://github.com/quartzy/markdown-it-mentions) - [ ] Integrate with https://tiptap.dev/api/nodes/mention
- [ ] The markdown-it-mentions generates more details
<span class="mention" data-type="user" data-id="48249279">Freddie Mercury</span>
than tiptap can handle/parse - Therefore we need to extend the tiptap mentions plugin to handle that html https://github.com/ueberdosis/tiptap/blob/main/packages/extension-mention/src/mention.ts#L107-L124
- In addition we need a toMarkdown method to handle the last conversion step back to markdown
- [ ] The markdown-it-mentions generates more details
- [ ] Emit notifications for the mentioned users
Reference on how the formats are converted
- markdown document => markdown-it => html (markdown-it-mentions)
- html => tiptap => rendering editor (tiptap needs to understand the html output from the above step)
- tiptap => prosemirror-markdown => markdown (tiptap needs to generate the same markdown format that is used in the first step)