Closed Bug 719404 Opened 12 years ago Closed 12 years ago

Adding a contributor to the author list of an article should allow free form, and should contain more than 10 names

Categories

(support.mozilla.org :: Knowledge Base Software, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: atopal, Unassigned)

Details

(Whiteboard: u=contributor c=wiki s=2012.3 p=2)

Currently, when I try to add someone as an author of a wiki document, I get a nice search, but unfortunately it is limited to the first 10 search results. Anything beyond that is not displayed, and I have to choose from that result list or the name won't be added to the list of authors.

Please allow free form names and extend the list, the viewport can stay and show only 10 names, but it has to be scrollable, to show all names that match the search.
This also applies to private messaging and other areas this widget is used.

I think we should allow the user to type a comma and that forces the selection to a username (or something along those lines).

Also, I am not sure if showing all the matches is going to be realistic if there are 1000s of matches (searching for 'smo' in the admin returns 1029 results, who can scroll through that?). I guess it needs some fiddling.
Hmm, that is true, we should solve this issue holistically indeed. I filed a bug: 

In this one we should just go ahead with the free form list, and listing something more than 10 names, let's display 100 for now.

One bug that we should fix here as well: Match full names directly. When I type "smo" that user should be selected not "smorisi". 

I'm not sure what pattern it follows currently when sorting; I can't make any sense of it.
Sorry, that's bug 719838
Whiteboard: u=contributor c=wiki s=2012.3 p= → u=contributor c=wiki s=2012.3 p=2
That is a good question. I don't think trying to find a similar match is the way to go in this case, there are too many that look similar and you could easily pick the wrong one by mistake. In that case getting an error message is better than posting to the wrong person without realizing it.

Let's go with "username not found".
Making the list of users scrollable is a limitation of jQuery Tokeninput (meaning we can't do it without modifying the library itself).

However, it seems like we can make it scrollable in Firefox (and only firefox). In other browsers, it has the scrollbar, but trying to scroll with it results in the box disappearing (it thinks the onblur even triggers). So, if this feature is intended for contributors/firefox users, I think we may be able to do it. However, non-firefox users won't be able to go beyond the top 10 users or whatever.
(In reply to Tanay Gavankar [:tgavankar] from comment #6)
> However, it seems like we can make it scrollable in Firefox (and only
> firefox).

That sounds like a bug in Firefox. We shouldn't rely on aberrant behavior without documentation from a released spec saying that it's correct.
Yeah, let's not go so far as to modify the library or use a potential bug in Firefox. Tanay, can you tell me what our options are here? We want to be able to choose from up to 100 usernames as long as our username search is suboptimal. Would it be easier to implement bug 719838 and continue limiting to 10-20 usernames?
It seems like with the combination of the jquery tokeninput library's limitations as well as the scrollbar thing being a firefox bug, we don't really have any options in regards to giving more usernames. Also, the tokeninput lib doesn't seem to allow freeform names, although we can set a delimiter so that (for example if it's set to ",") if you type the beginning of a name and a comma, it will automatically add the first result to the list. This comes back to the fact that we'd still need better search results/ordering because I didn't see any way to force it to pick the _exact_ name given (rather than just the first result). Our best bet (and seemingly only option, at least at the moment) would just be to go ahead and implement bug 719838.
Marking this as WONTFIX and moving focus over to bug 719838 due to all the issues brought up in previous comments.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
Tanay, how about only matching the beginning of the username? searching for kadir
would not start showing aaaakadir first and fill the list up, but start with kadir.
You need to log in before you can comment on or make changes to this bug.