Skip to content
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

Incorrect sort when you use pagination #5687

Closed
ScharfViktor opened this issue Aug 17, 2021 · 7 comments · Fixed by #6136
Closed

Incorrect sort when you use pagination #5687

ScharfViktor opened this issue Aug 17, 2021 · 7 comments · Fixed by #6136
Labels
Category:Defect Existing functionality is not working as expected Early-Adopter:CERN Priority:p1-urgent Consider a hotfix release with only that fix Type:Bug Something isn't working

Comments

@ScharfViktor
Copy link
Contributor

Sort when file more than 100:

  1. Open subfolder "Check Sort/CheckPagination"
  2. Choose the sort by name
  3. Go to page 2

Expected behaviour:
files on page 2: 101, 102, 103, 104

Actual behaviour:
files on page 2: the last 4 files from the response (random)

Screenshot 2021-08-03 at 11 53 17
Screenshot 2021-08-03 at 11 56 52

Server configuration

branch: release-4.0.0
backend: ocis 1.9.0 with docker reachable at https://host.docker.internal:9200/
browser: chrome Version 92.0.4515.107

@kulmann
Copy link
Contributor

kulmann commented Aug 17, 2021

Urgh. we're sorting inside OcTableFiles (ownCloud Design System). Since we're handing only the paginated data to the OcTableFiles component we're only sorting the data of the current page. :-(

@kulmann
Copy link
Contributor

kulmann commented Aug 17, 2021

We should remove the sort logic from the design system and only emit events for sorting. Sorting needs to happen within web (and later on server side).

@kulmann kulmann added the Category:Defect Existing functionality is not working as expected label Aug 17, 2021
@individual-it
Copy link
Member

probably same problem:

  1. upload many files, so that pagination is needed
  2. navigate to the first page
  3. create a folder
    => folder is selected, but not viewed on the first page. After a page reload the folder is listed at the top of the list like all folders

@kulmann kulmann added Priority:p2-high Escalation, on top of current planning, release blocker and removed Priority:p3-medium Normal priority labels Dec 2, 2021
@kulmann kulmann added Priority:p1-urgent Consider a hotfix release with only that fix and removed Priority:p2-high Escalation, on top of current planning, release blocker labels Dec 3, 2021
@kulmann
Copy link
Contributor

kulmann commented Dec 7, 2021

Wait with fixing until #4893 is merged

@dschmidt
Copy link
Member

dschmidt commented Dec 11, 2021

Wait with fixing until #4893 is merged

You probably meant:
owncloud/owncloud-design-system#1817
#6106

We should remove the sort logic from the design system and only emit events for sorting. Sorting needs to happen within web (and later on server side).

What would sorting in web look like?
I don't see any reasonable client side solution for sorting (except for retrieving the whole folder in background ... uuuuuurgh, not reasonable)

edit:
oh lol, that's exactly what we do - there is no server side pagination for now, as far as I can tell. That obviously makes it way easier to implement sorting in web for now, as it's not removing any functionality. I'll give it a shot.

@dschmidt
Copy link
Member

Nice! Thanks a lot for bringing this over the finish line 💖

@kulmann
Copy link
Contributor

kulmann commented Dec 23, 2021

Thanks for doing the heavy lifting @dschmidt 😍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:Defect Existing functionality is not working as expected Early-Adopter:CERN Priority:p1-urgent Consider a hotfix release with only that fix Type:Bug Something isn't working
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants