-
Notifications
You must be signed in to change notification settings - Fork 29
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
feat: allow third click to disable sorting (fixes #132) #139
Conversation
These lines previously did that by clearing the data-sorted attribute for all other options work.ubq.fi/src/home/sorting/sorting-manager.ts Lines 139 to 143 in cb5e4ad
|
Also the current sorting CSS looks weird, @0x4007. The gray background toggle seems binary, we should either have it be gray when it's not "none" or not have this gray background ever. |
The rest of it looks good to me @Atharva-Kanherkar, just please make sure you clear all other options states on click. |
Oh okay! I might have missed that, thank you for mentioning it. I'll review and commit some changes! |
So you want me to fix this in this PR? or this is just intended as a discussion? |
Hey @zugdev I have added the changes!:) Now you can see it works as expected <3 |
Looks good to me, just wait for code owner to review |
@0x4007 Even after optimizing the code, The tests fail, is there a possibility that we can increase the timeouts in cypress? |
src/home/sorting/sorting-manager.ts
Outdated
observer.observe(issuesContainer, { childList: true }); | ||
|
||
// Add event listener for input changes to filter and update URL | ||
// Debounce input to avoid frequent filtering |
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.
Why do you debounce the input? I don't think this is normally a problem?
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.
he was trying to make cypress work haha
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.
I was trying to optimize some code because I thought the tests were failing because of me. I will remove the logic ASAP
yarn.lock
Outdated
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.
Maybe you should regenerate your lock file. I don't see why it should have changed in this pull.
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.
Okay, I still dont understand why it happened. I will change it
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.
regenerating yarn.lock, but still appears in the pull, what can be the reason?
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.
This might be a problem with yarn on itself yarnpkg/yarn#4379
src/home/sorting/sorting-manager.ts
Outdated
@@ -9,6 +9,8 @@ export class SortingManager { | |||
private _filterTextBox: HTMLInputElement; | |||
private _sortingButtons: HTMLElement; | |||
private _instanceId: string; | |||
private _sortingState: { [key: string]: "unsorted" | "ascending" | "descending" } = {}; // Track state for each sorting option | |||
private _filterTimeout: number | null = null; // Timeout ID for debouncing |
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.
I think we should remove the debounce logic.
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.
yes, ill remove it
Feels nice though I just tested it. I think when you address my comments I can merge! |
So acc to u it seems mergeable? |
Resolves #132
Please see the video below :
Ubuiquity_DAOissue1.webm