-
Notifications
You must be signed in to change notification settings - Fork 159
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 default client side sort #1972
Conversation
💥 Acceptance tests webUIUpload failed. Please find the screenshots inside ...https://drone.owncloud.com/owncloud/phoenix/5084/
|
💥 Acceptance tests webUITrashbin failed. Please find the screenshots inside ...https://drone.owncloud.com/owncloud/phoenix/5084/
|
💥 Acceptance tests webUIFavorites failed. Please find the screenshots inside ...https://drone.owncloud.com/owncloud/phoenix/5084/
|
💥 Acceptance tests failed. Please find the screenshots inside ...https://drone.owncloud.com/owncloud/phoenix/5084/
|
💥 Acceptance tests failed. Please find the screenshots inside ...https://drone.owncloud.com/owncloud/phoenix/5084/
|
7367288
to
67bc56a
Compare
Sorted it out (pun intended). Sorting by folder/file and then natural sort based on OC 10's algorithm (with a weird chunkify function). I assume we'll want to keep the behavior as before so I imported said function. Next up: working on acceptance |
💥 Acceptance tests webUISharingInternalUsers failed. Please find the screenshots inside ...https://drone.owncloud.com/owncloud/phoenix/5102/
|
7311fe9
to
dba9bae
Compare
Pushed a fix for the tests. Please review! |
💥 Acceptance tests webUILogin failed. Please find the screenshots inside ...https://drone.owncloud.com/owncloud/phoenix/5107/
|
@PVince81 We could also just add one more sort after the name sort in getters which would contain the check for folder:
We'd then lose the more complex function which seems to me too complicated when we can use js sort. |
@LukasHirt for performance reasons I think it's better to only call sort once with a single comparator instead of two comparators and two set of arrays. I don't think this function is that complicated to understand. I can add code comments if it can help. |
Sorts by file type (folder or file) and then alphabetically using natural sort.
dba9bae
to
3879e1d
Compare
rebased and solved conflict |
Description
To sort by folder, file, then name using natural sort.
The utility functions were imported from OC core.
Related Issue
Ref #1854 (comment)
Motivation and Context
We need at least one default sort to make the list look less ugly when it has a mix of files and folders.
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
Open tasks: