-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add sorting capabilities to mail #8231
Conversation
1c07a48
to
04e0fb9
Compare
Why do we need to clear the cache for a changed sort order? |
@hamza221 what is the state of this? We discussed using the existing concept of envelope lists for sorting as well so that each sorting attribute and order goes into the ID of the list and when the attribute/order is changed a new list is used. This eliminates the need to clear any previous data/cache. |
@ChristophWurst I did try that yesterday and it worked, but this method of loading envelopes on sort order changing works too and I think it's more scalable. can you please give it a test? It works fully now, I'm just cleaning the code and UI and fixing tests |
e7e1784
to
625dd2b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorting works.
However, the page freezes when syncing a large mailbox. We investigated it and it seems that all mails are returned by the sync route right away leading in a very large response. The UI freezes for some time when inserting/updating all envelopes at once.
The checkbox radio switch also lacks some context but that is an issue of nc-vue as there are not local overrides.
lib/Service/Search/MailSearch.php
Outdated
@@ -155,7 +158,8 @@ public function findMessagesGlobally(IUser $user, | |||
} | |||
|
|||
return $this->messageMapper->findByIds($user->getUID(), | |||
$this->getIdsGlobally($user, $query, $limit) | |||
$this->getIdsGlobally($user, $query, $limit), | |||
'newest' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'newest' | |
'DESC' |
Is that still the case after adjusting the database change logic to understand the current sort direction?
&
Was this reported upstream and is anyone working on getting this resolved? |
899395e
to
cf886a2
Compare
Front-end freeze with the first sync fixed. The logic for new messages needed the sort order adjustment ref https://github.com/nextcloud/mail/pull/5495/files#diff-b7813cb4b4ca97c9ade82b289273c11f6ffda6283e960b8cc29a1fffda83e131 for the earlier attempt that had the trick already |
Same small comments:
|
@nimishavijay @ChristophWurst would we want the thread to stay open after sort order change? |
b0c6a4f
to
c969a22
Compare
Missing Test updates and Ui fixes but ready for review I hope |
Unfortunately this still doesn't fully work for me
|
when I navigate between mailboxes that have not been synced before, e.g. on a fresh account |
Testing in an individual mailbox with some test email seems to work just as expected 😎 The leftover bugs might be specific to the unified inbox and background syncs |
|
That is all I can find that the moment. Otherwise this now works for me 👍 and kudos |
26c44a7
to
f6fa141
Compare
Frontend and backend tests still need some care 👍 otherwise. let's get this in. we'll figure out any remaining issues |
I don't get why the unit test is failing, It's passing locally and it is called exactly 7 time :/ |
Newely merged Pr caused it, after rebase I was able to reproduce and fix |
Signed-off-by: hamza221 <[email protected]>
507a06c
to
87f81dc
Compare
Woah. How? |
I probably did something wrong during the first rebase, or something wrong with the job. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Showtime 😎
Fixes #679