Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add user mentions feature #2748

Merged
merged 16 commits into from
Aug 25, 2022
Merged

Add user mentions feature #2748

merged 16 commits into from
Aug 25, 2022

Conversation

luka-nextcloud
Copy link
Contributor

@luka-nextcloud luka-nextcloud commented Jul 23, 2022

Signed-off-by: Luka Trovic [email protected]

Summary

It should be possible to mention users.

ToDo

Follow up tickets

Dependencies added (in case needed during rebase):

npm install --save @quartzy/markdown-it-mentions @tiptap/extension-mention

@luka-nextcloud

This comment was marked as outdated.

@susnux
Copy link
Contributor

susnux commented Jul 24, 2022

From a user perspective:

If this is about the markdown file, I would expect everything I type to be saved in the markdown file.
E.g. if I write meeting minutes and mention users (for example assign a task) I want that user to be informed so they get remembered but I also do not want a hole in the minutes.

@John volunteered to take the night shift

Or maybe with linking like

[@John](/u/johns_username) volunteered to take the night shift

@juliusknorr
Copy link
Member

I wanted to know if we need to put the @mention in the registered file?

Yes, it should be put into the file. As mentioned we need to store the user id, but would also want the user display name as a readable representation so I tend to use the format that https://github.com/quartzy/markdown-it-mentions#quartzymarkdown-it-mentions parses already: @[Freddie Mercury](mention://user/48249279)

Notifications would be a second step then, which we could however handle in the backend when the file is actually saved.

@juliusknorr
Copy link
Member

Regarding the UI, we should stick to how Talk and comments do it. See https://nextcloud-vue-components.netlify.app/#/Components/RichContenteditable for a reference on the UI, we cannot reuse that component however.

@juliusknorr juliusknorr added enhancement New feature or request 2. developing labels Jul 28, 2022
@juliusknorr juliusknorr mentioned this pull request Jul 28, 2022
20 tasks
@luka-nextcloud luka-nextcloud force-pushed the feature/mention-users branch 2 times, most recently from 403c2fa to 72c98c5 Compare August 5, 2022 15:14
@luka-nextcloud

This comment was marked as outdated.

Copy link
Member

@juliusknorr juliusknorr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very nice on the UI already, I've left some comments inline.

lib/Controller/UserApiController.php Outdated Show resolved Hide resolved
lib/Controller/UserApiController.php Outdated Show resolved Hide resolved
src/extensions/Mention.js Outdated Show resolved Hide resolved
@juliusknorr
Copy link
Member

As a next step we may want to discuss how we issue notifications to the mentioned users. I'd say the best might be to do this on the save of the document (which might be a bit delayed), but then we can easily parse the full content and ensure that only notifications which are present are still active.

@juliusknorr
Copy link
Member

juliusknorr commented Aug 14, 2022

@luka-nextcloud Pushed a few commits split by what they do when working on using the vue component for rendering. Let's move this to a mergeable state tomorrow. Missing points would be:

Moved to top post.

@luka-nextcloud
Copy link
Contributor Author

@juliushaertl With the integration of the VueNodeViewRenderer, it seems that the content can not be rendered once we read the file after saving it. Do you have any idea why is behaving like that?

@luka-nextcloud
Copy link
Contributor Author

@juliusknorr juliusknorr self-requested a review August 25, 2022 06:08
@luka-nextcloud luka-nextcloud changed the title WIP: Add user mentions feature Add user mentions feature Aug 25, 2022
@juliusknorr
Copy link
Member

/compile

@juliusknorr juliusknorr merged commit 242de46 into master Aug 25, 2022
@delete-merged-branch delete-merged-branch bot deleted the feature/mention-users branch August 25, 2022 15:05
@max-nextcloud
Copy link
Collaborator

whoohoo... so cool this landed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mention users
5 participants