[aur-dev] Remove package search auto-complete
Lukas Fleischer
archlinux at cryptocrack.de
Tue Dec 31 11:53:21 EST 2013
On Mon, 30 Dec 2013 at 17:42:18, Daniel Landau wrote:
> On 30.12.2013 02:30, Callan wrote:
> > My biggest problem with it though, where is my saved time? I type a package name in, I click the unique result, I hit enter and then I still need to click a link on the result page. If this feature gets kept in it should at least automatically open the package page on a unique result.
>
>
> It seems that adding the following to the front page fixes both the
> multiple enter problem and adds direct loading of a package page on
> click of a result:
>
> $('#pkgsearch-field').keydown( function(e) {
> if (e.keyCode == 13) {
> $('#pkgsearch-form').submit();
> }
> });
>
> $('ul.pkgsearch-typeahead').click( function () {
> var pkg = $(this).find('li.active').attr('data-value');
> document.location = '/packages/'+pkg;
> });
Didn't look at the code in detail but I think that this is the best idea
that has been presented here so far (in terms of usability). From the
beginning, I have been strongly against JavaScript in the AUR but as
long as JavaScript features are helpful and don't hurt any users with
JavaScript disabled, I see no point in not adding them. The typeahead
feature helps with:
* Entering long package names.
* Searching for packages when you can only remember parts of the name.
* Finding packages with a name that is part of several other packages.
It saves at least one "hand from keyboard to mouse" movement, a point
operation and a click (and in the last case, several point operations
and clicks).
What are the real arguments against this feature (not against the
implementation)?
>
> Daniel Landau
>
More information about the aur-dev
mailing list