Closed Bug 608937 Opened 14 years ago Closed 9 years ago

Username autocomplete should use localStorage

Categories

(Bugzilla :: Creating/Changing Bugs, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: gerv, Unassigned)

Details

Username autocomplete should save in HTML5 localStorage, or some other persistent mechanism, the data it gets back, and use it to make the box of options appear much quicker than the server round-trip time. You could do it one of two ways:

1) Save it along with a record of what letters were typed, and simply redisplay the same list if the same letters were typed; or

2) Save each piece of user data individually, and do a new client-side search over all the local data as well as the server-side search.

(Yes, you might want to do the server-side search at the same time, and update the list when the results come back if the user has not already started choosing from it.) 

Gerv
That's a reasonable idea, but this would more be a bug to file against YUI than against Bugzilla.

FWIW, there already is a cache that's used if you do the same search twice on the same page.
Is the autocomplete box _all_ YUI's work? Surely we are fetching and giving YUI data to display? My suggestion then is that we give it some default data immediately, and give it more data later when we have it.

Gerv
Oh, hang on, no, sorry, that's my suggestion in the other bug!

Yes, you are right, this could be a YUI feature.

Gerv
If I double-click on an empty user name-enabled field, it would be cool if it would offer at least myself (bug 608936), better anyone I did enter in a field at some point already. This is functionality we actually _lost_ by switching to auto-completed user fields, as previously, the in-browser web form / text field autocomplete feature did cover that (at least in Mozilla browsers).
AFAICT from https://www.devbridge.com/sourcery/components/jquery-autocomplete/, cache is enabled by default.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.