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

Autocomplete username improvements #874

Closed
geekgonecrazy opened this issue Sep 24, 2015 · 39 comments
Closed

Autocomplete username improvements #874

geekgonecrazy opened this issue Sep 24, 2015 · 39 comments

Comments

@geekgonecrazy
Copy link
Contributor

Related to #848

@dbussert @rodrigok follow up from #848

I just tried this on slack and typing @ only matched on username. Am I missing something?

I keep running into it..

image

image

To me this is important to get right. Because in a multi person conversation its good to mention them so they see your message and it doesn't get lost. So i'm doing this constantly. When the wrong name pops up... it gets pretty irritating.

It was mentioned in #848 that we want to be able to @person NAME I don't see slack / github or any other platform doing this..

Does it really make sense to include name when we never actually see their name but only their username?

@RocketChat/owners

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@marceloschmidt
Copy link
Member

I think usernames only should be enough! 👍 for that!

@dbussert
Copy link

@geekgonecrazy I think your slack image proves the point. The user sun only shows up because their first name is Mars, which matched the @Mar. Same for xzil3d. Trello also does matching by real name or username. I just tested out my team's Gitlab and it matches by both real name and username (we use Google Apps OAuth login).

image

@geekgonecrazy
Copy link
Contributor Author

@dbussert btw my screens are from Rocket.Chat. But I just tried it and it is case sensitive. That alone would solve part of the problem..

Because if I were to type a persons name i'd start off with a Capital letter in their name. A username I would not.

@dbussert
Copy link

@geekgonecrazy I retested our gitlab and it is not case sensitive fwiw.

@geekgonecrazy
Copy link
Contributor Author

@dbussert so on github / gitlab that wouldn't bother me at all. But the speed I type / carry multiple conversations is greatly decreased. It doesn't bother me the least bit to stop and search through and tag the appropriate person.

But when i'm carrying on a conversation with a person and mentioned them i'm used to IRC client style auto complete. I type @ + first few letters and carry on with my sentence. This is realtime, so we need to be efficient.

I also kind of feel like the people that are going to be referring to each other by first name are likely going to be using their name in their username...

@graywolf336
Copy link
Contributor

Putting my two cents....some communities won't even use the first and last names. I know mine won't, as we're a gaming server and people go by their usernames instead of their real names. So, if they put something false in there I wouldn't really want that showing up. Not sure how much this adds, but maybe add it to be configurable in someway.

@marceloschmidt
Copy link
Member

I say we should remove the name from the search, and see what comes out of it... if people miss it, we may add that as an admin settings later on. @RocketChat/owners ?

@rodrigok
Copy link
Member

Slack matches username and name, but sort results better.
If you prefer we can change to match only username and see what happens

captura de tela 2015-09-24 as 10 01 38

@engelgabriel
Copy link
Member

Can it be an option on the settings?

@geekgonecrazy
Copy link
Contributor Author

@rodrigok maybe if we used index score? Been a while since i've done it. But I know you can have mongo score based on match.

@engelgabriel yeah even if an option. That'd be cool :)

@gwillen
Copy link

gwillen commented Nov 19, 2015

Is this an appropriate place for me to ask: what's up with 'all' showing up randomly as a match in some autocompletes but not others? E.g. on our Rocket, "@ALL" is the first autocomplete hit for @A, @c, @g, but no other letters. This is weird when trying to autocomplete people with those initials.

@marceloschmidt
Copy link
Member

It's not really random... @ALL will show for @ALL, @channel and @group. That's why it shows up as first on @A, @c and @g.

@ninja-
Copy link

ninja- commented Nov 21, 2015

can we do this client-side and cache team members to avoid this ugly loading screen after typing every letter after "@"?

@sampaiodiego
Copy link
Member

doing client-side cache could be a problem for large teams.

@geekgonecrazy
Copy link
Contributor Author

@sampaiodiego I don't think the issue is really the fact that it shows up. If you type fast and hit tab it'll often times autocomplete to @all, even though the first letter is anything other then an a.

@gwillen
Copy link

gwillen commented Nov 23, 2015

A team would have to be extremely large for client-side caching to be a problem. Google has something like 50,000 employees; if they were all on the same slack instance, and it took 10 bytes apiece to store their names in a trie, that would be 500k of RAM, in a pretty extreme case -- in this day and age that's really not much at all. And speeding up autocompletion would be pretty nice.

@sampaiodiego
Copy link
Member

@gwillen I made an export of users on the demo server (27k users), only with the fields _id, name and username. the file size gets 1.9MB

@gwillen
Copy link

gwillen commented Nov 23, 2015

@sampaiodiego Ooh, didn't think about the need to include the 'name' field. Perhaps that could be elided in the case of large installations? I guess you'd also have to disable the ability to autocomplete on it to get much benefit (otherwise it's going to be present in the trie even if you don't display it.) If you do that, I imagine the memory burden goes down a lot, since names tend to be longer than usernames?

@geekgonecrazy
Copy link
Contributor Author

Caching is great.. but i'd honestly be happy with it showing the proper name suggested and have a slight delay of it talking to the server to do a db query. Especially in large instances. If the last spoke in the channel was just bumped up in the stack of suggested, that alone would help

@gwillen
Copy link

gwillen commented Nov 23, 2015

Regarding showing the proper name, I have a bug open for what seems to be the cause of that at #1446 -- the client just doesn't wait for the autocomplete list to finish loading the latest results before it completes when you hit 'TAB' or 'ENTER'. That shouldn't be too bad to fix, independent of any client-side caching; the client just has to wait, after you hit 'TAB', for the autocomplete results to come back, BEFORE picking the first one.

@Sing-Li
Copy link
Member

Sing-Li commented Nov 23, 2015

Yes. I tend to agree with @gwillen and @geekgonecrazy

Perhaps we should make it actually usable, useful, without chance of constant mistake FIRST; then deal with improvements LATER.

I'm saying this primarily because, EVERY day, I continue to send @ALL messages when typing fast with autocomplete.

@fabiomontefuscolo
Copy link
Contributor

Is it possible to search user using '^' + selector.username at https://github.com/RocketChat/Rocket.Chat/blob/develop/server/publications/userAutocomplete.coffee#L18?

I'm looking for this file at my docker instance, but I can't find.

@marceloschmidt
Copy link
Member

I don't know why this issue was still open, since now we search usernames only. Though @fabiomontefuscolo suggestion is a good one too, IMHO. What do you think, @RocketChat/core ? Have you ever used the autocomplete to select a user and instead of typing their initials, you typed something in the middle? If you have, do you think that's expendable?

@engelgabriel
Copy link
Member

We are still planning to enable full names back in the system, so lets wait for that to be completed before we make any decision.

@pescobar
Copy link

pescobar commented May 20, 2016

in case it helps to take a decision...in our rocket chat instance we use ldap for authentication and we automatically assign the ldap uid as rocketchat username. The problem is that ldap uid is not always descriptive enough to know who is who in the rocketchat channels. Being able to autocomplete also on name (which we also get automatically from ldap) and not only on username is really convenient in our setup.

It would be nice to have name autocompletion feature at least as an option which can be enabled/disabled. This was working in previous releases and it was really convenient for us.

There is some more discussion about this topic in this other issue #2785

@marceloschmidt
Copy link
Member

As commented on #2129, I think we should search for users that start with what's typed and then do another search for contains, removing the former results from this search. This way, users that start with the text would show up first in results, but we'd still show the contained ones.

@rodrigok
Copy link
Member

@marceloschmidt IMHO we should search only from the start, not containing.

@pescobar We can't use search for names right now, we are working to improve the cache of data on the client side, after that we will be able to do that. For your LDAP setup, you can change the username field to be generated using other fields from LDAP like the first and last name.

@pescobar
Copy link

pescobar commented May 26, 2016

What will happen If we change this in a production env? all chats for the old usernames will be lost? or it will be linked automatically to the new users?

I have exactly the same concern.

I also have ldap accounts with same name.lastname . The only field which is unique for sure is uid and that's why we use it as username. Using name.lastname could be a temporary workaround now that we only have few accounts active in rocketchat but I think this workaround would bring us troubles in the future when more users start using the chat

@rodrigok
Copy link
Member

@iojeda @pescobar well, it depends, we have some configurations, one of is for unique fields, so users are linked between LDAP and Rocket.Chat by the unique field and not by the username field, so in theory you can go to the chat account settings and change your username and keep the link with LDAP.

In fact we need to test this behavior, I can't do that right now, will be awesome if you guys could clone your DB and start a new instance to test these ideas.

@rodrigok
Copy link
Member

rodrigok commented Jun 6, 2016

@iojeda are you sure # {} GivenName. # {Sn} is working? The correct value should be #{givenName}.#{sn}

I already fixed the translation here ebcc80c

@geekgonecrazy geekgonecrazy added this to the Mooc milestone Jun 9, 2016
@geekgonecrazy geekgonecrazy removed this from the Mooc milestone Jul 10, 2016
@SpencerCarstens
Copy link

Has there been any movement on this issue? It's a serious hinderance for my whole team.

I'm willing to throw some cycles at helping solve any blocking issues to help this along.

😃

@aventrax
Copy link

aventrax commented Oct 5, 2016

I'd want too an option to be able to search @ displayName

@rodrigok
Copy link
Member

rodrigok commented Oct 5, 2016

@SpencerCarstens Can you explain what exactly you want? We have a lot o subjects in this thread.

@aventrax We will release a new cache system for RC soon, then we can work to bring display name to messages and auto complete.

@aggregat4
Copy link

It is great that we can now (0.41.0) show real names in messages but we can now no longer search for people by their real name. If you switch with CTRL+P or try to mention someone this only matches the username. This reduces usability enormously. The usernames are technical artifacts that are in LDAP and not that what people can use to easily find someone.

@TwizzyDizzy
Copy link

@rocket-cat close

I cannot confirm the initial issue to be true in 0.61.0. I just verified that I can mention thotest which is my LDAP handle as well as my username, which is thomas.test. Also independant of case. If you still see this, please describe all the surrounding aspects, maybe post a screenshot of your profile and a little GIF of you trying to mention yourself.

Cheers
Thomas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

17 participants