-
Notifications
You must be signed in to change notification settings - Fork 23
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 command-enter shortcut for Edit Code #1919
Conversation
474cd0b
to
51cb0c9
Compare
@@ -52,6 +52,9 @@ | |||
|
|||
<applicationService | |||
serviceImplementation="com.sourcegraph.cody.config.CodyPersistentAccounts"/> | |||
|
|||
<actionPromoter implementation="com.sourcegraph.cody.edit.CodyActionPromoter"/> |
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 is the actual fix for this one - thank you JetBrains community Slack for help 😃
<action id="cody.inlineEditEditCode" | ||
text="Edit Code" | ||
class="com.sourcegraph.cody.edit.InlineEditPromptEditCodeAction" > | ||
<keyboard-shortcut replace-all="true" first-keystroke="ctrl ENTER" keymap="$default"/> |
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 see such comment from @steveyegge in this file:
<!--
N.B. You have to declare all the Mac keystrokes with ctrl or alt separately,
even if their definition is identical to $default, because otherwise it will
result in the actual keybindings switching to command/meta and/or shift.
-->
@mkondratek could you please check?
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.
Also, please add <override-text place="GoToAction" text="Cody: Confirm Code Edition"/>
or something along those lines (it is for search everywhere).
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.
text="Cody: Confirm Code Edition"
that would be different from the text in the button and hence confusing imho
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.
Problem is that we have two "Edit Code" now. One to open edit code prompt and second for confirming the edit. they somehow need to have different names.
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 missed your second comment about ...
.
In this case: <override-text place="GoToAction" text="Cody: Edit Code"/>
Still we need to add Cody:
part.
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.
done
@@ -285,6 +288,12 @@ | |||
<override-text place="GoToAction" text="Cody: Dismiss"/> | |||
</action> | |||
|
|||
<action id="cody.inlineEditEditCode" | |||
text="Edit Code" |
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 text should not be Edit Code
. We already have other Edit Code
and I think both will be displayed in the key bindings settings with the same name (for button on the edit dialog we can have custom name, if needed).
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.
We have Edit Code...
action (not the three dots!) - it's a common practice in JB that the actions that open dialogs or need some confirmation have ...
suffix. IMHO it's a good enough to distinguish them (we clearly indicate what the shortcuts do and display them - it's super clear).
b9a109b
to
c4cc72a
Compare
c8a0446
to
f30e6cc
Compare
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.
LGTM
Fixes https://linear.app/sourcegraph/issue/CODY-2868.
Fixes https://github.com/sourcegraph/cody-issues/issues/307
Test plan