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

@-mention doesn't autocomplete display names #6782

Closed
turt2live opened this issue May 22, 2018 · 14 comments · Fixed by matrix-org/matrix-react-sdk#2212
Closed

@-mention doesn't autocomplete display names #6782

turt2live opened this issue May 22, 2018 · 14 comments · Fixed by matrix-org/matrix-react-sdk#2212
Labels
P1 S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect

Comments

@turt2live
Copy link
Member

Description

Trying to autocomplete someone by the name "James" doesn't work because their username is "jchaulk".

image
image

Version information

  • Platform: web (in-browser)
  • Browser: Chrome 66
  • OS: Windows 10
  • URL: riot.im/develop
@tmursch
Copy link

tmursch commented May 26, 2018

Definitely would be nice to have this feature.

@lampholder
Copy link
Member

As far as I can tell @-mentions do complete display names - is this something specific to the 'ja' != 'jc' case?

@lampholder lampholder added the X-Needs-Info This issue is blocked awaiting information from the reporter label May 30, 2018
@turt2live
Copy link
Member Author

I suspect it's related to the deviation happening too early in the string, so the autocomplete can't find a high-scoring match.

ie: autocompleting @travisr despite the username being travis is possible because the match score is high enough, however ja doesn't have enough characters to have a high scoring match on James.

@t3chguy
Copy link
Member

t3chguy commented Jun 26, 2018

fwiw @travisr TAB does not work for me to autocomplete you @turt2live

@turt2live
Copy link
Member Author

That's just mean of Riot then :(

It used to, so maybe one of the autocomplete fixes made it different?

@t3chguy
Copy link
Member

t3chguy commented Jun 26, 2018

autocomplete fixes (mine) haven't been released yet and I tested in /app :(

turt2live

@xfalcox
Copy link

xfalcox commented Aug 1, 2018

@t3chguy this change will use display names for autocomplete even when the matrix_id doesn't match?

Use case is:

  • Matrix ID: @x12345678:matrixhomeserver.com
  • Display Name: John Smith

So typing @Joh will autocomplete this user?

@t3chguy
Copy link
Member

t3chguy commented Aug 1, 2018

No, joh<TAB> would though

@bwindels
Copy link
Contributor

bwindels commented Aug 8, 2018

Doesn't work for me either on Riot 0.16. I don't think it ever has. You need to remember the user ids of people if they diverge from their display name AFAIK.

@bwindels bwindels added T-Defect P1 S-Major Severely degrades major functionality or product features, with no satisfactory workaround and removed X-Needs-Info This issue is blocked awaiting information from the reporter labels Aug 8, 2018
@dbkr
Copy link
Member

dbkr commented Aug 13, 2018

From experimentation, it appears that autocompleting by typing '@' will only match user IDs. Typing part of the display hame and pressing tab works though (ie. in this case, typing @jame gives no matches, but jame<tab> will complete to that user.

This is probably where the confusion is coming from.

@dbkr dbkr self-assigned this Aug 13, 2018
@bwindels
Copy link
Contributor

@dbkr right, but that still doesn't allow you to cycle through users, so it only works when the part you typed is the unambiguous start of a display name. When I try to complete t3chguy on riot-dev by typing "@ mi" (ignore the space) I can't get it to work for example.

@dbkr
Copy link
Member

dbkr commented Aug 13, 2018

@bwindels typing @mi into riot-dev doesn't give t3chguy as an option though, because it only matches usernames and his username doesn't match that query. It gives some people whose usernames do though, and you can cycle through them with tab / down arrow / cursor?

@t3chguy
Copy link
Member

t3chguy commented Aug 13, 2018

/me is @x:riot.ovh ftr

@dbkr
Copy link
Member

dbkr commented Aug 13, 2018

This shouldn't be too hard to fix: I suggest just stripping the @ from the start of the query in UserProvider.js if the query starts with @. (since it's only used for trigger the autocompletion) and then stripping the @ from the start of all the usernames we feed into the matcher to match. The kicker is that the matcher can only take keys from an object. I'm thinking the best thing would be to rewrite the matcher so you can just feed in search strings and matching objects, making it a lot simpler.

Leaving this for now as I was hoping it would be a quick fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants