I'd like todo.sr.ht's search to handle order:updated and order:comments
(i.e. sort by number of comments, most to least). I wonder what syntax
to use for reversing the order, and what other sort orders to offer.
Other approaches I saw for reversing the order:
- GitHub: sort:comments-asc, sort:comments-desc
- GitLab, Gitea: sorting gets its own dropdown menu separate from the
search field
- Some image boards: order:comments sorts most to least,
order:comments_asc sorts least to most. Or sometimes
order:comments_desc sorts most to least instead.
I also briefly considered !order:foo, but it's slightly inconsistent
with the existing use of the "!" prefix. I will default to foo and
foo-asc.
The set of sort orders I'm thinking of is created, commented, and
updated (same as GitHub).
Thoughts?
I’ve often seen and used the minus sign to reverse
search order, like so:
sort:comments
sort:-comments
But I don’t know what sourcehut currently uses for
its own ordering.
--
Gabriel Augendre
Sent from a mobile device
/ Envoyé depuis un appareil mobile
> Le 28 août 2020 à 07:36, Enterprisey <apersonwiki@gmail.com> a écrit :> > I'd like todo.sr.ht's search to handle order:updated and order:comments> (i.e. sort by number of comments, most to least). I wonder what syntax> to use for reversing the order, and what other sort orders to offer.> > Other approaches I saw for reversing the order:> > - GitHub: sort:comments-asc, sort:comments-desc> - GitLab, Gitea: sorting gets its own dropdown menu separate from the> search field> - Some image boards: order:comments sorts most to least,> order:comments_asc sorts least to most. Or sometimes> order:comments_desc sorts most to least instead.> > I also briefly considered !order:foo, but it's slightly inconsistent> with the existing use of the "!" prefix. I will default to foo and> foo-asc.> > The set of sort orders I'm thinking of is created, commented, and> updated (same as GitHub).> > Thoughts?
On Fri, Aug 28, 2020 at 08:08:57AM +0200, Gabriel Augendre wrote:
> I’ve often seen and used the minus sign to reverse> search order, like so:> sort:comments> sort:-comments
I think this way is easier to write, but hard to understand.
I would suggest something like `comments:desc` or `comments:asc`. Even
though it's more verbose but I see as more simple to understand what
output you will get.
On Fri, 28 Aug 2020 10:35:00 -0300
Pedro Lucas Porcellis <porcellis@eletrotupi.com> wrote:
> I would suggest something like `comments:desc` or `comments:asc`. Even> though it's more verbose but I see as more simple to understand what> output you will get.
I like the syntax, and it's terse, which is great, but we might want to
do `comments:>=2020-08-28` or `created:yesterday` at some point (and
have those be applied at the same time as some sort order), and "one
meaning per key (part before colon)" seems to be a desirable property
for me. I'm fine with either of comments/-comments,
comments/comments_asc, or comments_desc/comments_asc.
In the multi-field sort I've been working with, the +comments, -comments
worked out well.
There's also an option to split it up: sort=comments&sort_order=reverse.
--
Zlatko
On Fri, 28 Aug 2020, at 21:23, Denis Laxalde wrote:
> It might also be nice to support more than one parameter. E.g.> "sort=-creation_date,title", meaning sort by creation_date reversed,> then title.
It might be simpler to specify sort multiple times, e.g.
`sort=-creation_date sort=title`, or whatever syntax is agreed upon.
I actually have a WIP patch for sorting, could finish it up.
Ivan
On Tue, 1 Sep 2020 09:21:18 +0200
"Ivan Habunek" <ivan@habunek.com> wrote:
> I actually have a WIP patch for sorting, could finish it up.
Yeah, that would be cool - or if you wanted to send it to me or
otherwise put it up somewhere, that would be nice too. Just today I
found myself wishing again that we could sort by oldest first.