nixos-search icon indicating copy to clipboard operation
nixos-search copied to clipboard

Remember what sorting was selected in previous sessions

Open asymmetric opened this issue 4 years ago • 5 comments

Some users prefer to have items sorted alphabetically. We should preserve the choice between search sessions.

Read more on initial reported issue:

**Describe the glitch** NixOS options are not sorted alphabetically, which makes it hard to sort through them.

See here for an example.

Screenshots

20210525_17h43m34s_grim

Additional context Add any other context about the problem here.

asymmetric avatar May 25 '21 15:05 asymmetric

/cc @garbas because I think you implemented the options feature

asymmetric avatar May 25 '21 15:05 asymmetric

I argued for this being the default, but it's not.

There is a sort order selection at the top right

image

Which gives you a this query:

  • https://search.nixos.org/options?channel=unstable&from=0&size=50&sort=alpha_asc&query=services.prometheus

(For the record, you're not the first one to ask for this, I wonder why the sort select box is missed out by end-users.)

samueldr avatar May 25 '21 18:05 samueldr

(For the record, you're not the first one to ask for this, I wonder why the sort select box is missed out by end-users.)

I missed it too.

My hypothesis: it's because the select box doesn't render when visiting https://search.nixos.org/options with no search string:

image

Also, even on modestly wide screens the select box is rather away:

image

Necior avatar Oct 05 '21 17:10 Necior

I've hijacked the issue and turned it into more actionable text.

garbas avatar Apr 08 '22 08:04 garbas

Would it make more sense to default to "best match" for packages and alphabetical for options? (That's how I have my firefox keyword searches configured)

If you search for "nix" in packages, you probably want to see nix first, not "DisnixWebService" or "acme-sh".

ncfavier avatar Apr 08 '22 09:04 ncfavier