~sircmpwn/sr.ht-discuss

8 7

todo.sr.ht search: reversing order, other sort orders

Details
Message ID
<20200828013514.6bb33e81@sparrow.localdomain>
DKIM signature
pass
Download raw message
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?
Details
Message ID
<C265A283-6391-4860-BC1A-74E57473912F@augendre.info>
In-Reply-To
<20200828013514.6bb33e81@sparrow.localdomain> (view parent)
DKIM signature
fail
Download raw message
DKIM signature: fail
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?
Details
Message ID
<20200828133500.GA14756@porcellis>
In-Reply-To
<C265A283-6391-4860-BC1A-74E57473912F@augendre.info> (view parent)
DKIM signature
pass
Download raw message
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.
Details
Message ID
<20200828151308.3687cfa3@sparrow.localdomain>
In-Reply-To
<20200828133500.GA14756@porcellis> (view parent)
DKIM signature
pass
Download raw message
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.
Details
Message ID
<C58VBO7B8Y6U.1I5P2NWFDM04B@homura>
In-Reply-To
<20200828151308.3687cfa3@sparrow.localdomain> (view parent)
DKIM signature
pass
Download raw message
What about sort:comments & rsort:comments?
Details
Message ID
<c43fc3ac-d278-f850-285c-79f2f6b46ab4@laxalde.org>
In-Reply-To
<C58VBO7B8Y6U.1I5P2NWFDM04B@homura> (view parent)
DKIM signature
missing
Download raw message
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.
Zlatko Duric
Details
Message ID
<3800f50a-7fd5-fcc6-5668-450fd0a1f90f@mailbox.org>
In-Reply-To
<c43fc3ac-d278-f850-285c-79f2f6b46ab4@laxalde.org> (view parent)
DKIM signature
pass
Download raw message
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
Details
Message ID
<b9cc10af-84d9-4928-9c73-1689e987fb2b@www.fastmail.com>
In-Reply-To
<c43fc3ac-d278-f850-285c-79f2f6b46ab4@laxalde.org> (view parent)
DKIM signature
pass
Download raw message
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
Details
Message ID
<20200909224431.47269336@sparrow.localdomain>
In-Reply-To
<b9cc10af-84d9-4928-9c73-1689e987fb2b@www.fastmail.com> (view parent)
DKIM signature
pass
Download raw message
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.
Reply to thread Export thread (mbox)