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

🐛 [Bug] Some users with short usernames missing on mention menu and cannot be mentioned #2635

Closed
Tirokk opened this issue Oct 5, 2020 · 8 comments · Fixed by #4296
Closed
Assignees
Labels
bug Something isn't working Github Import good first issue Good for newcomers service: webapp

Comments

@Tirokk
Copy link
Member

Tirokk commented Oct 5, 2020

sushidave Authored by sushidave
Dec 30, 2019


🐛 Bugreport

Some users with a short username are missing on mention menu. Consequently, they can't be mentioned in a post or comment. Example: Username "tj" (@tj)

Steps to reproduce the behavior

  1. Create a post or a comment
  2. Type the "at" sign (@) and the letters "tj".
  3. Username tj is missing on the mention menu. The number of usernames on the menu is limited.
  4. User cannot be mentioned.
  5. Abort process

Expected behavior

Username should be visible and selectable.

Version & Environment

  • Type: [Desktop]
  • OS: [macOS]
  • Browser: [Firefox]
  • Version [71.0]
  • Device: [MacBook]

Additional context

@Tirokk
Copy link
Member Author

Tirokk commented Oct 7, 2020

roschaefer Authored by roschaefer
Dec 31, 2019


I can reproduce the problem with user @tj. The graphql request to the backend returns the user tj:

2019-12-31-002329_1920x1080_scrot

I believe it's a problem on the client and I guess the suggestion menu is lacking capabilities to browse the list of suggestions without typing. You cannot press space, you have to choose a search result from the list to continue. So if you have a large number of results and you can only put in two letters you have a problem because the desired search result does not show up.

I would suggest that you could always use your arrow keys to browse the whole list. Also, the search should be better. Right now it's just checking if a user handle contains a character combination. A 100% match should always be the top search result.

@Tirokk
Copy link
Member Author

Tirokk commented Oct 7, 2020

Tirokk Authored by Tirokk
Jan 15, 2020


I agree in general with @roschaefer .
The problem is how the suggestions in the suggestion menu are filtered. That happens in the file Editor.vue in the function filterSuggestionList. This is not optimal.

  1. The start of the typed hashtag should be the start of the suggestions as well I would say and not only a part somewhere in a hashtag.
  2. The already typed part of the hashtag should be always in the suggestion list at the end (or beginning?) as full hashtag if this hits an entire existing hashtag. Think about that more than one entirely existing hashtags can fulfil this since the suggestions in the list are not searched case sensitive.

(Clearyfied @DennisHack )

@Tirokk
Copy link
Member Author

Tirokk commented Oct 7, 2020

Tirokk Authored by Tirokk
May 4, 2020


Is this maybe something for you @rbeer ?

@Mogge Mogge added bug Something isn't working service: webapp Github Import good first issue Good for newcomers labels Oct 8, 2020
@ulfgebhardt
Copy link
Member

related ? #2800

@Mogge
Copy link
Contributor

Mogge commented Dec 14, 2020

No relation to #2800

@ulfgebhardt ulfgebhardt added this to the The Sprint after that... milestone Jan 7, 2021
@ashleysylvialee
Copy link
Contributor

Hello! I would like to work on this. :)

@ulfgebhardt
Copy link
Member

I assigned you @ashleysylvialee - please contact us on discord if you need help <3

@ashleysylvialee
Copy link
Contributor

For a quick fix, could we simply sort the results by length before returning? We could also implement or find and use a more sophisticated sorting algorithm that finds the closest match. match-sorter seems like it would be relevant here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Github Import good first issue Good for newcomers service: webapp
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants