Design/UX #4212
closed'Send To' suggested drop down load
0%
Description
The ‘Send To’ box recognizes the usernames and offers a drop down with suggestions, but it loads slowly and only if the user pauses during typing.
Drop down should load faster if possible.
Updated by Boone Gorges over 9 years ago
- Target version set to 1.9
See #774. I assume that the fix implemented there is half-broken - `str_replace()` run on SQL clauses is pretty much a recipe for a good time. At minimum, the lookup can probably be a bit faster by making a direct query (maybe with some clever caching). A fancier solution would be to somehow preload the user's friends.
Updated by Boone Gorges over 9 years ago
- Category name changed from User Experience to BuddyPress Messages
- Status changed from New to Assigned
Updated by Boone Gorges about 9 years ago
- Status changed from Assigned to Testing Required
I rewrote the autocomplete to be more efficient for use on the Commons: https://github.com/cuny-academic-commons/cac/commit/a63e5380ec3a6f3f1861d71786d0dd2174bd0904
I had to sneak it onto the production site because of some errors I was getting on cdev and locally. Sam, would you give it a spin on the Commons to see if you notice a difference? I'm getting between 1/2 and 1 second response times for common searches, which feels acceptable (definitely snappier than before).
Updated by Samantha Raddatz about 9 years ago
It looks to be a little bit faster, yes -- thanks for rewriting that, Boone.
After testing this out again, I'm thinking that maybe the larger concern is that users are able to enter names in the "send to:" field that aren't available within the Commons. For instance, I typed 'Anna Raddatz' (my sister who definitely isn't in our user list) into the field and was able to tab to the next field and send a message without error. So, if you're a fast enough typer that you don't see the autocomplete, and you enter a name that doesn't exist/match in the Commons, it's hard to know whether or not a message was sent. Can we add some feedback to alert users that the person they've entered in the "send to" field doesn't match anyone in the system?
Updated by Boone Gorges about 9 years ago
Good idea, Sam. In https://github.com/cuny-academic-commons/cac/commit/2ac061f27fca6a43707fa88d3254aaeeb1361b65 I built some simple validation. Give it a spin on cdev and see what you think.
Updated by Samantha Raddatz about 9 years ago
Definitely better!
It currently says, "The following usernames are not valid: Jane, Doe", but I think 'not valid' is a little too vague to describe the error. A rephrase the error message to read: "No matches for the name: Jane, Doe" or "The following user: Jane, Doe is not active in our system" would be clearer. Thanks!
Updated by Boone Gorges about 9 years ago
Good call. https://github.com/cuny-academic-commons/cac/commit/312ebfbeb738f330af3871ce6a6f595597b51b0f I have changed the message to "No matches found for the name foo" or "No matches found for these names: foo, bar". On cdev if you want to check it out.