Bug 461049 - Component is hard to select in list box with thousands of choices
Summary: Component is hard to select in list box with thousands of choices
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Bugzilla
Classification: Community
Component: Creating/Changing Bugs
Version: 3.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
URL:
Whiteboard:
: 477924 481080 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-09-03 16:59 UTC by John Reiser
Modified: 2009-05-21 17:19 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-05-21 17:19:22 UTC
Embargoed:


Attachments (Terms of Use)
Patch to add filter text box for component drop down in enter_bug.cgi (v1) (2.67 KB, patch)
2009-05-06 04:35 UTC, David Lawrence
no flags Details | Diff
Patch to add filter text box for component drop down in enter_bug.cgi (v2) (2.71 KB, patch)
2009-05-06 18:27 UTC, David Lawrence
no flags Details | Diff
Patch to add filter text box for component drop down in enter_bug.cgi (v3) (9.68 KB, patch)
2009-05-13 20:51 UTC, David Lawrence
nelhawar: review+
Details | Diff
Patch to add filter text box for component drop down in enter_bug.cgi (v4) (2.86 KB, patch)
2009-05-18 18:59 UTC, David Lawrence
nelhawar: review+
Details | Diff

Description John Reiser 2008-09-03 16:59:24 UTC
Description of problem: When filing a bugzilla report against Fedora, then selecting the Component is difficult and tedious.  There are several thousand choices.  The list box displays only 5 lines.  Typing a letter moves the alphabetical list to the section which begins with that letter, but that restarts for every letter; so for the "kde-..." or "gnome-..." or "python-..." choices (or ones that are alphabetically following) you have not made much progress.  Scrolling by dragging the slider is much too sensitive: the list moves too far even for tiny mouse movements.  Scrolling by press-and-hold of the arrows is too slow for large distances, too fast to read, and too fast when you get near the one you want.  Scrolling by single click on the arrows is too slow.  Scrolling by clicking (or press-and-hold) in the gray part of the sider column is too slow because it jumps only by the height of the entire box (5 lines) each time.

It should be much easier to select the Component when filing a bug report against a Component of Fedora.

For instance, why not something like the Firefox URL bar, where typing multiple letters performs an incremental search through the list, where <Backspace> goes backward in the search, etc.  Or, something like Firefox's intra-page Find command <Ctrl>F.  Forcing the user to select one of the components that is already in the list is fine; just make it a lot easier to do so.


Version-Release number of selected component (if applicable):
bugzilla-3.0.4-2.fc10.noarch
(There is no version number displayed on the pages of https://bugzilla.redhat.com *itself*, so I am guessing here.  Also, perhaps the problem is "merely" the way in which Fedora Support has set up the tool.  Anyway, there is a real problem.)

How reproducible: always


Steps to Reproduce:
1.https://bugzilla.redhat.com
2.Navgigate to submit a New bug against Fedora.
3.Try to select the Component.
  
Actual results: It is difficult and tedious to select the proper Component from a list box of thousands of choices.


Expected results: It is easy to select the Component, particularly with incremental search like the URL bar, or the Firefox intra-page Find command <ctrl>F.


Additional info:

Comment 1 Bug Zapper 2008-11-26 02:57:07 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Fedora Admin XMLRPC Client 2009-02-11 19:25:14 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 3 cje 2009-02-20 01:31:26 UTC
i think this bug needs to be moved to _product_ 'Bugzilla' (which is in
classification "other").

Comment 4 Itamar Reis Peixoto 2009-03-01 04:09:15 UTC
*** Bug 477924 has been marked as a duplicate of this bug. ***

Comment 5 Emmanuel Seyman 2009-04-08 11:58:12 UTC
Re-assigning to the 'Bugzilla' product.

Comment 6 David Lawrence 2009-05-06 04:35:18 UTC
Created attachment 342594 [details]
Patch to add filter text box for component drop down in enter_bug.cgi (v1)

Attaching patch that creates a filter box above the component select list on enter_bug.cgi. When someone starts typing 2 or more letters in the text field, the select box will shrink or expand to only show the components which contain the typed letters. So someone looking for 'anaconda' can find it by typing as little as 'an'.

I have this running internally on https://bz-web2-test.devel.redhat.com for Red Hat people to look at to try it out and let me know what you think.

Dave

Comment 7 Noura El hawary 2009-05-06 14:10:35 UTC
Comment on attachment 342594 [details]
Patch to add filter text box for component drop down in enter_bug.cgi (v1)

Hey Dave,

Patch looks good to me, I like the design, it works perfect in most products in bugzilla including RHEL5 which has a large component list but when it comes to Fedora it is very slow and the page hangs a lot, Also one thing i noticed that component names that has a separator between its words like an underscore or a dash cazes the filtering not to work properly, for example if you go to RHEL5 and type 'perl' the filtering will produce list starting with compnenets that has perl in its second part of the name, same think if you typed 'mod' also just to give you an example. Other than that I really like the idea.

Thanks,
Noura

Comment 8 David Lawrence 2009-05-06 17:58:37 UTC
(In reply to comment #7)
> (From update of attachment 342594 [details])
> Hey Dave,
> 
> Patch looks good to me, I like the design, it works perfect in most products in
> bugzilla including RHEL5 which has a large component list but when it comes to
> Fedora it is very slow and the page hangs a lot, Also one thing i noticed that
> component names that has a separator between its words like an underscore or a
> dash cazes the filtering not to work properly, for example if you go to RHEL5
> and type 'perl' the filtering will produce list starting with compnenets that
> has perl in its second part of the name, same think if you typed 'mod' also
> just to give you an example. Other than that I really like the idea.
> 
> Thanks,
> Noura  

Noura. I am not see any issue with components with either '_' or '-' on the names. And since the javascript code is using basic regular expressions searching, if you type a string in the field with first using ^, it will find that string in any part of the component name. So if you just type "perl" it will find the perl components plus also things like mod_perl, etc. If you type "mod" it should of course find mod_perl but also names like gfs-kmod, etc. It is cool that if you know what you are doing you can be specific since it uses regex. So i I only wanted to see perl-* components, I would just type "^perl-" and this gives the proper list.

I do admit that it is slower on the Fedora product enter_bug.cgi page. It is having to process the large list of select entities each time you type another letter. Partly becuase the variable called 'list' is empty when the page first loads, and when you type characters in the filter field, it will first have to pre-populate that js var with all components. I could pre-populate the var on the server side but that will increase the page download size which is bad too. I will see if I can optimize some more but not sure if it will ever be speedy for Fedora at least.

Dave

Comment 9 David Lawrence 2009-05-06 18:27:01 UTC
Created attachment 342695 [details]
Patch to add filter text box for component drop down in enter_bug.cgi (v2)

New patch which is slighty faster in the javascript looping. Calculating list.length in a for loop is expensive so I first  put the length in variable and then use the variable for the for loop check.

I also changed the wording alittle next to the filter field to be more descriptive. Let me know how this works for you.

Dave

Comment 10 David Lawrence 2009-05-06 18:31:04 UTC
Just a thinking out loud but if we can get this to a suitable point for enter_bug.cgi, I could also see something like this being useful for the component select on query.cgi. But this technique may not work as well for components where multiple values can be selected. Unless for example when you select a component then start a new filter search, the search results are displayed along with your currently selected components from a previous search. That may be intuitive enough. Anyway, one problem at a time.

Dave

Comment 11 David Lawrence 2009-05-13 20:51:00 UTC
Created attachment 343873 [details]
Patch to add filter text box for component drop down in enter_bug.cgi (v3)

This patch builds more on the last one in that it still offers the autocomplete field for filtering component lists down based on a few characters. It also adds the additional functionality in that if someone passes in a form variable for the component, then it only loads the select with the one component, hides it and then adds a (edit) link that a user can click on. When clicking the (edit) link, it uses ajax to load the rest of the components. This is similar to how it works currently on the show_bug.cgi page.

See if this works for you and also if you see how it can be improved.

Dave

Comment 12 Noura El hawary 2009-05-14 05:03:01 UTC
Comment on attachment 343873 [details]
Patch to add filter text box for component drop down in enter_bug.cgi (v3)

Patch looks good to me Dave, The idea of the edit link is brilliant I think and it will make people happy specially the fedora people as now if they know the component they want they can save the time of loading the entire list and searching it for what they want. also the search for fedora components is faster than the previous patch and doesn't hang. 

Thanks,
Noura

Comment 13 David Lawrence 2009-05-18 16:35:45 UTC
*** Bug 481080 has been marked as a duplicate of this bug. ***

Comment 14 David Lawrence 2009-05-18 18:59:40 UTC
Created attachment 344501 [details]
Patch to add filter text box for component drop down in enter_bug.cgi (v4)

Turns out that the ajax feature when only one component is selected did not speed thing up in any significant way. I was trying to revise the code to avoid whenever possible calling products.components since it loads all 6000+ component objects into memory even though you do not need all of the data. I tried in enter_bug.cgi to pull in just the component name directly from the db to speed things up. But later in the create.html.tmpl template, product.flag_types is being called which in turns calls product.components anyway. And I didn't see at first glance how to easily update it not to have to call that function.

So in this patch I pulled out the single component ajax feature and am strictly adding the text box filter only for now. I also add a check to make sure the component list is greater than 50 otherwise do not show the filter field as it is not needed for comp list that small.

Please review
Dave

Comment 15 Noura El hawary 2009-05-21 10:59:19 UTC
Comment on attachment 344501 [details]
Patch to add filter text box for component drop down in enter_bug.cgi (v4)

Patch looks good to me Dave, and working as expected.

Noura

Comment 16 David Lawrence 2009-05-21 17:19:22 UTC
Thanks Noura. Committed and will be in the next update.


Note You need to log in before you can comment on or make changes to this bug.