Preserve sort order when filtering Git branch / tag quickpicks (fix #199471)#199473
Preserve sort order when filtering Git branch / tag quickpicks (fix #199471)#199473lszomoru merged 11 commits intomicrosoft:mainfrom
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 |
lszomoru
left a comment
There was a problem hiding this comment.
@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.
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.
I have pushed a change that I hope does what you mean.
lszomoru
left a comment
There was a problem hiding this comment.
@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.