lemmy icon indicating copy to clipboard operation
lemmy copied to clipboard

Alphabetical sorting

Open rado84-github opened this issue 3 years ago β€’ 4 comments

Hi. Can you make the list of communities (https://lemmy.ml/communities) to be able to be sorted alphabetically? I wanted to view all of them alphabetically but when I clicked β€œName”, nothing happened. Alphabetical sorting should include ascending and descending order and that applies for the other options too - number of subscribers, users per month, posts and comments.

rado84-github avatar May 19 '21 11:05 rado84-github

Hi @dessalines , I want to implement this feature. Two options:

  1. I add two different SortType, NameAsc and NameDesc for each sorting(like sorting by name).
  2. I create another Enum which takes SortOrder: pub enum SortOrder { Asc, Desc, }

Which one would you prefer? I feel in the first approach we would end up making too many Asc Desc pairs.

anujmax avatar Feb 15 '24 04:02 anujmax

Option 1 for now. And also is alphabetically descending really necessary? Seems like just 1 Alphabetical sort is enough.

Adding additional sort params (especially time) is something that needs worked out first. #4340

dessalines avatar Feb 15 '24 13:02 dessalines

I think it would be no problem to add a param sort_order to CommunityQuery.

#4340 is not relevant here, it is only a problem for computing post/comment scores but communities dont have any score.

Nutomic avatar Feb 15 '24 15:02 Nutomic

And also is alphabetically descending really necessary? Seems like just 1 Alphabetical sort is enough.

I was thinking about the case where the use clicks the "Name" column again after clicking once, generally data tables support sorting asc and desc.

anujmax avatar Feb 15 '24 17:02 anujmax