-
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
Several fixes for Hotkey Inlay Hints #1895
Conversation
- there is a new Preferences option for disabling it - the hint no longer draws if the selection is only on one line - this takes care of many annoying cases, such as Find/Replace lighting it up everywhere - the hint now always draws below the last line of the selection. - this makes it less intrusive, IMO, as it's out of the way of the cursor - it's more intuitive, I think -- several users claim that it "used to work that way". It never actually worked that way; it always drew at the end of the last line of the selection. But now it does work that way. - coincidentally and usefully, this also fixes CODY-2541 - getting the hint inlay out of the way of the cursor removed the interference fixes: CODY-2541
@@ -41,17 +41,22 @@ class CodySelectionInlayManager(val project: Project) { | |||
val startOffset = event.newRange.startOffset | |||
val endOffset = event.newRange.endOffset | |||
if (startOffset == endOffset) { | |||
// Don't show if there's no selection. | |||
return | |||
return // Don't show if there's no selection. |
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.
@steveyegge Shouldn't isCodyUIHintsEnabled
be also checked somewhere in this code block?
I fail to see any place where it is actually used, but perhaps I miss something obvious
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.
Damn, good catch. I had it at one point, and a merge killed it. Fixed.
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
Based on user feedback from GTM and Product, discussions with @danielmarquespt , and my own testing, I've made the following round of fixes to the hotkey hint feature, which shows an inlay with "Ctrl + Alt + ↵ to Edit" at the end of your selections in the editor window:
This makes it less intrusive, IMO, as it's out of the way of the cursor.
I think it's also more intuitive. Several users claim that it "used to work that way". It never actually worked that way; it always drew at the end of the last line of the selection. But now it does work that way.
The one downside is that the hint can sometimes draw rather far from the selection, appearing to be two lines below. We will see how people respond to it.
Coincidentally and usefully, this change also fixes CODY-2541. Getting the hint inlay out of the way of the cursor removed the interference with fine-tuning the selection.
These changes also appear have to fixed CODY-2748, because I reported it and I can no longer reproduce it. It used to be 100% reproducible, so I'm going to mark it closed until it resurfaces.
fixes CODY-2541
fixes CODY-2748
Test plan
This requires UI testing to verify with actual integration tests.
I reviewed the test plan, and these changes do not affect the plan.