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: unresponsive selections in custom command menu #1416

Merged
merged 4 commits into from
Oct 17, 2023
Merged

Conversation

abeatrix
Copy link
Contributor

@abeatrix abeatrix commented Oct 17, 2023

RE: https://sourcegraph.slack.com/archives/C05AGQYD528/p1697105184992049

This PR fixes the issuses reported by Philipp where `` does not work in Custom Commands Menu. This issue was caused by the previous update when description has become a required field.

  • Updated options to include description field
  • Now check for the description option instead of labels when checking the selected option in custom command menu.
  • Also fixed last five used custom commands not showing up in the same menu

This fixes an issue where commands with null descriptions would not be run when selected.

image

Test plan

  1. Open the Custom Commands Menu from right clicking in your editor and then select Custom Commands

image

  1. At the bottom you will find Configure Custom Commands... and New Custom Command...

image

These options should now work when building from this branch.

Other commands should still work as expected.

@abeatrix abeatrix requested review from philipp-spiess and a team October 17, 2023 15:03
@@ -285,14 +285,14 @@ export class CommandsController implements VsCodeCommandsController, vscode.Disp
const selected = await showCustomCommandMenu([...promptItems])
const commandKey = selected?.description
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we are looking for description when we are checking label below, which caused the issue because these options did not have description fieldss

Copy link
Contributor

@philipp-spiess philipp-spiess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

letsgoooooooo this works now nice

@abeatrix abeatrix merged commit 77e9f49 into main Oct 17, 2023
13 checks passed
@abeatrix abeatrix deleted the bee/fix-custom-menu branch October 17, 2023 20:01
Copy link
Member

@valerybugakov valerybugakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I bumped into it a couple of times.

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.

3 participants