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

Sorting bug #1246

Closed
aditmehta9 opened this issue Mar 27, 2022 · 7 comments
Closed

Sorting bug #1246

aditmehta9 opened this issue Mar 27, 2022 · 7 comments
Assignees
Labels
type: bug Something isn't working work: frontend Related to frontend code in the mathesar_ui directory

Comments

@aditmehta9
Copy link

aditmehta9 commented Mar 27, 2022

Description

The sorting direction displayed in the sorting selection dropdown is incorrect, even though the sent request uses correct direction.

Expected behavior

Rows should be sorted in ascending order.

To Reproduce

First add 7 rows only in ID column then add another column- 'xyz' data type- date and time with null and no duplicates. Then sort the column using xyz and add another column for sorting that is id and now clear the XYZ from sorting or even delete the XYZ column the whole xyz

See below video or description.

When a direction is selected for New Col at first, the sort selected is desc but after it is applied it gets displayed as asc, but the results are correctly sorted in descending direction. The same desc order direction is also chosen as direction for any new sorting column that is added even though it is incorrectly displayed as asc.

Environment

  • OS: (macOS,)
  • Browser: (Firefox)

Additional context

Untitled.mp4
@aditmehta9 aditmehta9 added status: triage type: bug Something isn't working labels Mar 27, 2022
@silentninja silentninja added work: frontend Related to frontend code in the mathesar_ui directory ready Ready for implementation and removed status: triage labels Mar 28, 2022
@muhsinkamil
Copy link
Contributor

@silentninja Could you please assign this to me, I can take a look at it. Thanks

@silentninja
Copy link
Contributor

Thanks, @muhsinkamil. I have assigned the issue to you

@silentninja silentninja added status: started and removed ready Ready for implementation labels Mar 28, 2022
@muhsinkamil
Copy link
Contributor

@silentninja It seems not to reproduce anymore after recent pull.
Could you please confirm with latest pull.

Screen.Recording.2022-03-29.at.12.51.07.PM.mov

@aditmehta9
Copy link
Author

You are right this is working now.

@silentninja
Copy link
Contributor

@muhsinkamil @aditmehta9 I am not able to reproduce the issue, maybe it was fixed by a recent merge. I am closing this as this is fixed. @pavish @seancolsen Can you point out the PR responsible for the fix, so that it is easier to track incase the issue occurs again.

Repository owner moved this from Started to Done in [NO LONGER USED] Mathesar work tracker Mar 29, 2022
@seancolsen
Copy link
Contributor

I'm also not able to reproduce this bug in the current master branch.

@silentninja

Can you point out the PR responsible for the fix, so that it is easier to track incase the issue occurs again.

Good idea.

In the video, at 0:44 we have the sort direction selected as desc. Then at 0:45 after applying the sort direction, it displays as asc. That's the first indication of this bug. I'm able to reproduce that in 7a98cfd. Then in 77ad8ca (after #1240 was merged) I'm not able to reproduce it. The bug seems to have something to do with the SimpleSelect component, which no longer exists. I didn't spend the time to fully diagnose the problem though since I'm fairly confident it won't crop up again.

@silentninja
Copy link
Contributor

silentninja commented Mar 29, 2022

I was also suspecting #1240 to be the PR responsible for the fix. Thanks @seancolsen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working work: frontend Related to frontend code in the mathesar_ui directory
Projects
No open projects
Development

No branches or pull requests

4 participants