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

[FEATURE] Enabled User @mentions in tiptap editor component #2352

Closed
wants to merge 21 commits into from

Conversation

henit-chobisa
Copy link
Collaborator

@henit-chobisa henit-chobisa commented Oct 3, 2023

Description

The current pull request enables the usage of user-mentions in the tiptap editor, with features such as self highlighting, redirection and sending notifications from the backend.
image

Features

Sending Notification on being mentioned with context of being mentioned

Irrespective of a person being a subscriber of the issue or not, if he's mentioned in a particular issue, he will be sent a notification for being mentioned, along with that he will be added as a subscriber to the issue, to receive further updates on the issue. For testing the possible set of cases and scenarios please go through https://henit.notion.site/feat-mentions-c96dc6cfe53a4e2eafb0acb252cb80c4?pvs=4

image

Redirecting on the user profile, when clicked on the mention

The mention acts as a button, hence if you have provided the redirect_uri in the underlying data structure IMentionSuggestion[], you can see it redirecting to the user's profile. In future we can use this for redirecting to specific sets of views such as cycles or issues itself.

Screen.Recording.2023-10-03.at.5.36.15.PM.mov

Dynamic Highlights of entities in an issue

The mention feature also come with highlightin, which makes it extremely easy to spot a particular highlight, which can be anything from highlighting the current user from the content or highlighting a set of issues from a query of "Show me all the issues where a particular set of issues are mentioned". Currently the highlighting works only in the issues/form.tsx, and in side-peak-view.
image

For Example: : If the highlight group is for the current user, which means that in every issue, if the current user is mentioned he must be highlighted, in this case it's dynamic because for an issue where @crew and @captain both are mentioned, if @crew is signed in, he must be highlighted and so as captain, which makes us dynamically update the values. Below is the picture of the implementation, which show how dynamic highlights work for two different highlight groups.

Issue View of the Captain
image

Issue View for the Crew
image

@vercel
Copy link

vercel bot commented Oct 3, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

6 Ignored Deployments
Name Status Preview Comments Updated (UTC)
plane ⬜️ Ignored (Inspect) Visit Preview Oct 27, 2023 5:22am
plane-dev ⬜️ Ignored (Inspect) Visit Preview Oct 27, 2023 5:22am
plane-sh ⬜️ Ignored (Inspect) Visit Preview Oct 27, 2023 5:22am
plane-sh-dev ⬜️ Ignored (Inspect) Visit Preview Oct 27, 2023 5:22am
plane-sh-stage ⬜️ Ignored (Inspect) Visit Preview Oct 27, 2023 5:22am
plane-staging ⬜️ Ignored (Inspect) Visit Preview Oct 27, 2023 5:22am

apiserver/plane/bgtasks/issue_activites_task.py Outdated Show resolved Hide resolved
mention_notifications.append(
Notification(
workspace=project.workspace,
sender="in_app:issue_activities",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here can we add an addtional identifier in_app:issue_activities:mention

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've modified it ✌🏼

@pablohashescobar
Copy link
Collaborator

Closing this PR as updated changes are already merged

@sriramveeraghanta sriramveeraghanta deleted the feat/tiptap-mentions branch November 10, 2023 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants