mail icon indicating copy to clipboard operation
mail copied to clipboard

Add possibility to change sort attribute and order

Open Friptick opened this issue 6 years ago • 13 comments

As a user I want to change how my emails are sorted


Original report

There does not seem to be an option to change the mail sort order.

True?

Some users like to read mail in the order it was received.

Mail app version: 0.7.6

Friptick avatar Dec 17 '17 21:12 Friptick

True!

ChristophWurst avatar Dec 18 '17 07:12 ChristophWurst

Some users like to read mail in the order it was received.

That’s the way mails are sorted, no? And the great thing is that if you delete the current message, it goes to the next newest one.

As soon as there’s threading #2125, you can also read threads in order.

Hence closing because we de facto have it, and also cause of lots of overhead vs little interest during 2 years since the issue is open.

jancborchardt avatar Feb 29 '20 03:02 jancborchardt

Some users like to read mail in the order it was received.

That’s the way mails are sorted, no?

NO. it is absolutely not the way they are sorted. They are sorted anti-chronologically, like a blog. Not chronologically, AKA "in the order in which they were received".

Meaning that if you deal with incoming mail chronologically (which is logical and polite), you are constantly reading from bottom to top. Ridiculous. And why I still do not use Nextcloud Mail.

As soon as there’s threading #2125, you can also read threads in order.

That will be great, but it is absolutely not the same thing.

Hence closing because we de facto have it

But we do not.

and also cause of lots of overhead vs little interest during 2 years since the issue is open.

This is a better reason. Unfortunately it is a deal-breaker for me, but I guess that's my problem. Seemed like an easy fix. Oh well.

Friptick avatar Feb 29 '20 04:02 Friptick

Re-opening because I see how this is an important feature for some people.

Historically it was a close to impossible to implement as we had to rely on server sorting (often not there because of missing IMAP capabilities) or doing client-side sorting, which is very inefficient as we have to fetch the full mailbox, sort it, and just take a small chunk.

As of #2064 we have the messages and their important attributes locally. We can thus quickly and efficiently change the sort order. Of course right now lots of logic just assumes that we have sort by date, but that should be okay to change. Then we can allow sorting by more fields and also changing descending/ascending.

ChristophWurst avatar Mar 02 '20 08:03 ChristophWurst

can someone change the title of this issue to "sort by date asc/desc, read/unread, starred/unstarred, has/no attachment" Cause I think this is what is needed in the long run, and it includes the original request. If not, I will open a new issue with that title.

If sort by date ascending/descending is implemented first, it would be good to keep the other development things in the back of the mind for coding/design decisions.

Personally I need sort by read/unread most, thats the main reason I cannot use the Mail app at the moment cause I let unimportant mails sit in my inbox until I have some more time, but then the unread mails are so far down that they are hard to find without sorting.

agree/disagree?

anybody think we need filtering also or is sorting enough? (I think sorting is enough)

alexanderdd avatar Mar 18 '20 21:03 alexanderdd

also relevant: Filtering https://github.com/nextcloud/mail/issues/2433

alexanderdd avatar Mar 18 '20 21:03 alexanderdd

Yes, perhaps "make inbox sortable" would be a better title. It should always be possible to sort a table by any column ASC-DESC. This could even be done on the front-end in theory, but it is important that the setting is persistent.

This thread shows that people use inboxes in different ways. So sortability in general would be a real improvement.

Friptick avatar Mar 19 '20 04:03 Friptick

Please see https://help.nextcloud.com/t/call-for-testers-mail-v1-3/75825. We'd appreciate if you could help us test the upcoming release :v:

ChristophWurst avatar Mar 30 '20 08:03 ChristophWurst

Then design-wise, we would need user settings (in the bottom-left general settings) like so:

Sorting

  • Newest first / Oldest first (as radio switch, newest first default)
  • Unread first (checkbox, off by default)
  • Messages with attachments first (checkbox, off by default)

All other things are e.g. handled by priority inbox.

The basic thing would be Newest/oldest switching, and the others I will leave up to @ChristophWurst to decide – remember every setting increases complexity and the testing matrix.

jancborchardt avatar Nov 17 '20 15:11 jancborchardt

Messages with attachments first (checkbox, off by default)

As sorting has to be done on the back-end primarily, we can't do this right now. The information about whether a message has an attachment will only be queried when the message is shown in the list. It's possible to do but there are caveats. We should do the other ones first and leave this as follow-up. We'll always have the sent date and the seen flag for those.

ChristophWurst avatar Nov 17 '20 17:11 ChristophWurst

Then design-wise, we would need user settings like so:

Sorting

  • Newest first / Oldest first (as radio switch, newest first default)
  • Unread first (checkbox, off by default)
  • Messages with attachments first (checkbox, off by default)

I think filtering is more powerful than sorting, because you can have multiple filters at once, for example filter for unread messages with attachments. Sorry if I am repeating myself, but this is a big design decision.

alexanderdd avatar Nov 18 '20 18:11 alexanderdd

Filtering is powerful. Yet changing of sort order and attribute is valuable to some. So I suggest we do both: https://github.com/nextcloud/mail/issues/5489

ChristophWurst avatar Aug 30 '21 07:08 ChristophWurst

Question: if you look at your messages oldest to newest, do you expect background synchronization to pull in the newest emails? I guess not. Because before you get there you have to potentially load many pages. So the background sync should possibly only look for new messages when we are at the end of the list … but I don't know how to determine that

Edit: we'll for now not pull in new messages for the sync when oldest first is selected.

ChristophWurst avatar Aug 31 '21 06:08 ChristophWurst

Unimplemented

  • [ ] Unread first (checkbox, off by default)
  • [ ] Messages with attachments first (checkbox, off by default)

hamza221 avatar Nov 08 '23 20:11 hamza221