nixos-search
nixos-search copied to clipboard
Remember what sorting was selected in previous sessions
Some users prefer to have items sorted alphabetically. We should preserve the choice between search sessions.
Read more on initial reported issue:
See here for an example.
Screenshots

Additional context Add any other context about the problem here.
/cc @garbas because I think you implemented the options feature
I argued for this being the default, but it's not.
There is a sort order selection at the top right

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.)
(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:

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

I've hijacked the issue and turned it into more actionable text.
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".