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

fix(ui): Paginated rows don't consistently have the same sort order #3581

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

m-rgba
Copy link
Contributor

@m-rgba m-rgba commented Feb 4, 2025

Description

To replicate:

  • Sort on a row with a lot of the same values (enough for > 1 page).
  • Select all.
  • Paginate to page 2.
  • Paginate back to page 1.
  • There will be some number of rows on page 1 which aren't selected.

This is because the database does not return a stable order when multiple rows have the same sort value - each page of the pagination will push a random ordering of items within the sort set.

Places where this could be a problem would be if a user was scoring a scorer by pass/fail and annotating them - on pagination they may be presented with items already annotated, and miss others in their list.

before

Proposed fix:

  • Appending a started_at sort as a secondary sort when needed.
  • Split it to visual / functional sort model so that it'll be invisible for users.

@circle-job-mirror
Copy link

circle-job-mirror bot commented Feb 4, 2025

@m-rgba m-rgba marked this pull request as ready for review February 4, 2025 15:16
@m-rgba m-rgba requested review from a team as code owners February 4, 2025 15:16
@m-rgba m-rgba requested a review from gtarpenning February 5, 2025 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant