-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Preserve sort order when filtering Git branch / tag quickpicks (fix #199471) #199473
Conversation
Can this get merged soon, or do the rules of your grooming iteration mean it'll have to wait another month? |
@lszomoru please consider merging this |
Working with @TylerLeonhardt to make this option available when using |
We discussed this and this won't be added to showQuickPick so this PR is the way to go |
extensions/git/src/typings/vscode.proposed.quickPickSortByLabel.d.ts
Outdated
Show resolved
Hide resolved
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.
@gjsjohnmurray, could you please address the comments? Thank you!
extensions/git/src/commands.ts
Outdated
quickPick.placeholder = placeHolder; | ||
quickPick.sortByLabel = false; | ||
quickPick.items = await items; | ||
listeners.push(quickPick.onDidHide(() => { |
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.
If the quick input is hidden (user presses ESC) this method will never return. I believe that the onDidHide
event listener needs to go inside the choice
method. onDidHide
should only run resolve(undefined)
. Then on line 2671, we only need to dispose the quickPick (this will hide + dispose) and the listeners.
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 have pushed a change that I hope does what you mean.
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.
@gjsjohnmurray, found another issue now that I looked at the code again.
Head branch was pushed to by a user without write access
This PR fixes #199471 by using the quickPickSortByLabel proposed API.