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

Add a keybinding for Quick Fix #17502

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

carlos-zamora
Copy link
Member

Adds a keybinding to open the quick fix menu, if one is available.

The quickFix action is bound to ctrl+period by default to align with VS' "quick actions" feature and VS Code's "quick fix" feature.

Closes #17377

@@ -637,6 +638,7 @@
{ "keys":"ctrl+shift+p", "id": "Terminal.ToggleCommandPalette" },
{ "keys":"win+sc(41)", "id": "Terminal.QuakeMode" },
{ "keys": "alt+space", "id": "Terminal.OpenSystemMenu" },
{ "keys": "ctrl+period", "id": "Terminal.QuickFix" },
Copy link
Member Author

Choose a reason for hiding this comment

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

The quickFix action is bound to ctrl+period by default to align with VS' "quick actions" feature and VS Code's "quick fix" feature.

@zadjii-msft funny enough, I feel like openSuggestions would be better suited here. Especially since the suggestions UI loads quick fixes automatically. Maybe we want ctrl+period to be used for openSuggestions instead?

Also, we're in a weird spot rn. Quick fixes are behind a feature flag so idk if it makes sense to bind this just yet. Happy to remove changes to this file, just want some clarity on the plan here.

CC @DHowett

Copy link
Member

Choose a reason for hiding this comment

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

hard veto binding just ctrl+anything. Ctrl alone is reserved for a modifier for the CLI application to use.

I'm probably biased, so I probably need to recuse myself from answering if it should be quickFix or showSuggestions

Copy link
Member Author

Choose a reason for hiding this comment

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

(In case you're curious) Found that "ctrl+period" is used for "repeat the last command" in nano, so yeah, we need a different keybinding.

Changed to "ctrl+shift+period".

The questions above still stand though. How about long-term we do...

  • ctrl+shift+period --> quick fix
  • alt+shift+period --> suggestions
    Just wanna make sure I don't claim a keybinding you were planning to claim later.

Copy link
Member Author

Choose a reason for hiding this comment

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

Discussed a bit during today's bug bash. Here's the leading proposal rn:

  • default kbd opens suggestions UI (source=all)
  • clicking QF button --> open suggestions UI

As we add more quick fixes (i.e. actual winget suggestions, non-snippets, etc.) and non-snippet suggestions, we can revisit this and change it.

Copy link
Member

@lhecker lhecker left a comment

Choose a reason for hiding this comment

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

(Aside from the question in your comment, LGTM.)

@@ -637,6 +638,7 @@
{ "keys":"ctrl+shift+p", "id": "Terminal.ToggleCommandPalette" },
{ "keys":"win+sc(41)", "id": "Terminal.QuakeMode" },
{ "keys": "alt+space", "id": "Terminal.OpenSystemMenu" },
{ "keys": "ctrl+period", "id": "Terminal.QuickFix" },
Copy link
Member

Choose a reason for hiding this comment

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

hard veto binding just ctrl+anything. Ctrl alone is reserved for a modifier for the CLI application to use.

I'm probably biased, so I probably need to recuse myself from answering if it should be quickFix or showSuggestions

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jul 2, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jul 2, 2024
@zadjii-msft zadjii-msft added this to the Terminal v1.22 milestone Jul 2, 2024
@carlos-zamora
Copy link
Member Author

carlos-zamora commented Jul 2, 2024

Quick Fix feedback from bug bash

  • Sometimes the flyout only opens on the 2nd click on the button
    • ...and only closes on the 2nd click into the terminal
    • This seems related to the tooltip because moving the cursor into the button and clicking it super quickly doesn't cause the issue
  • When you open the tooltip with the action, we don't expand the bubble. We should expand the bubble.
  • When the contents scroll (text prints), the button doesn't change position upwards
  • [Screen Reader] QF kbd --> "pop up window"
    • should probably be renamed to "quick fix list" or something like that
  • [Screen Reader] Should we add "use kbd to open" to the "quick fix available" notification?
  • We should put quickfixes in the suggestions UI first

this:
image

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.

Add a key binding to open Quick Fix
3 participants