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

Display onboarding tooltip on first autocomplete suggestion #1339

Merged
merged 3 commits into from
Apr 19, 2024

Conversation

olafurpg
Copy link
Member

@olafurpg olafurpg commented Apr 18, 2024

Fixes #1319.

Previously, users didn't get any onboarding instructions when using Cody for the first time in JetBrains. For example, many users didn't know they should press TAB to accept an autocomplete suggestion, or option-bracket to cycle through options. This PR fixes the problem by using the built-in GotItTooltip component, which is designed for this use-case.

Test plan

Manually tested.
CleanShot 2024-04-18 at 16 01 48@2x

@olafurpg olafurpg requested review from danielmarquespt and a team April 18, 2024 13:57
Copy link
Contributor

@dominiccooney dominiccooney left a comment

Choose a reason for hiding this comment

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

Splendid.

IntelliJ handles the dismissed state management of these? Neat.

@olafurpg
Copy link
Member Author

I'm investigating a seeming regression where autocomplete inlays now appear one line below the cursor. I'm not able to reproduce on main so I think it's caused by the tooltip shifting stuff.

CleanShot 2024-04-18 at 16 07 44@2x

@olafurpg
Copy link
Member Author

@dominiccooney Yes! IntelliJ manages the state. All existing users will get the tooltip when updating, which isn't ideal, but it might be helpful for them to learn about the cycle shortcuts. I think the code will become very tricky to maintain if we try to avoid showing the tooltip for existing users.

@pkukielka
Copy link
Contributor

Wouldn't it be nice to also mention command to force autocomplete?

@olafurpg
Copy link
Member Author

cc/ @sourcegraph/jetbrains-plugin have you seen this behavior before for autocomplete? The inlay appears in an empty line below the cursor

CleanShot 2024-04-18 at 16 14 02@2x

I commented out gotit.show() and I'm still able to reproduce the issue so I'm going to assume it's not a regression in this PR. Worth keeping a close eye on this

Copy link
Contributor

@pkukielka pkukielka left a comment

Choose a reason for hiding this comment

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

LGTM

Fixes #1319.

Previously, users didn't get any onboarding instructions when using Cody
for the first time in JetBrains. For example, many users didn't know
they should press TAB to accept an autocomplete suggestion, or
option-bracket to cycle through options. This PR fixes the problem by
using the built-in `GotItTooltip` component, which is designed for this
use-case.
@olafurpg olafurpg enabled auto-merge (squash) April 19, 2024 12:16
@olafurpg
Copy link
Member Author

@danielmarquespt merging this PR with the current copy. Feel free to propose a separate copy, or send a PR changing the text.

I think we should also document the trigger shortcut in the onboarding tooltip, but it's not done in this PR>

@olafurpg olafurpg merged commit c493a2b into main Apr 19, 2024
6 checks passed
@olafurpg olafurpg deleted the olafurpg/gotit-tooltip branch April 19, 2024 12:20
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.

[User Testing] Add Gotit tooltips
3 participants