Listing the Mentions

The Goal here:

What we want to achieve is to have a mentions feature in our hand, which enables us to use a highlighter like an @ or ! to trigger a dropdown of items which are supposed to show us the nearst mentioned user & project & issue.

What is the worst flow for the mentions I can possibly think of ?

Fetch when stop typing ⌨️

Here the ideal flow would be that as soon as the user stops typing we get a text that the user has types yet, we search for the users & projects & issues, in parallel, combine the result and return it to the users.

BUT this approach will grow slower with time, the more the number of assets, the more the time of the search. It’s proportional here

In this case there are two options that I can see,

  1. Either I think of something performant, and work on querying the assets faster. or
  2. I make the user realise less about how much the performance is slow by showing him some already cached data.

Notifications to the mentions

The goal here:

We will be given a html text, we have to parse that html text and we have to get the mentioned by their ID provided, and we have to send them the notifications.

Send Assigned Notification Only ONCE!

What if I edit the issue, the assignees will be there forever, and we don’t have to send them assigned notification twice? But there are two patterns of notifications here,

  1. Assignee Notification, which is sent only once when a person is assigned an issue
  2. Watcher Notification, which will be send on any activity of the notification

What are the cases we are going to encounter?

There can be primerily two events that we have to handle from the issue description, we can get to know about these events after comparing the previous and the current state of the issue, we need to parse the previous state and the current state to get the exactly new or deleted mentions.