Got It Tooltip
Implementation: GotItTooltip
Related: "Got It" Notification
A Got It tooltip informs users about a new or changed feature and gives basic information about it.

Point to small UI controls that can be missed among other information in the screen.


Explain behavior that is not clear from the UI.

Suggest keyboard interactions.

Explain how to revert to the old UI in case of significant UI changes.

Do not use the tooltip if there is no space to attach it. Instead, use a banner in a dialog or a notification in the main window.



Always add the body text.
Add a header if the body text is 2 lines and more. A short header can quickly explain what this tooltip is about.

Implementation:
GotItTooltip(TOOLTIP_ID, GET_IT_TEXT, parentDisposable)
.withHeader("The reader mode is on")
new GotItTooltip(TOOLTIP_ID, GET_IT_TEXT, parentDisposable)
.withHeader("The reader mode is on");
Add a shortcut if the tooltip describes a single action that has a shortcut.

Implementation:
GotItTooltip(
TOOLTIP_ID,
{ "You can rename usages ${shortcut("My.Action")}" },
parentDisposable
)
new GotItTooltip(
TOOLTIP_ID,
gotItTextBuilder -> {
String shortcut = gotItTextBuilder.shortcut("My.Action");
return "You can rename usages " + shortcut;
},
parentDisposable
);
Add a local link if users might want to revert changes in a feature or configure it.

GotItTooltip(TOOLTIP_ID, TOOLTIP_TEXT, parentDisposable)
.withLink("Disable for all files", this::actionMethodReference)
new GotItTooltip(TOOLTIP_ID, TOOLTIP_TEXT, parentDisposable)
.withLink("Disable for all files", this::actionMethodReference);
Add an external link if there is a help source that can further explain the functionality.

GotItTooltip(TOOLTIP_ID, GOT_IT_TEXT, parentDisposable)
.withBrowserLink("How to use", new URL("https://example.com"))
new GotItTooltip(TOOLTIP_ID, GOT_IT_TEXT, parentDisposable)
.withBrowserLink("How to use", new URL("https://example.com"));
Do not add more than one link.
Show no more than 5 lines of body text. If the text does not fit, leave only the essential information and add a link to a help article.
Use sentence case both for the header and body text, and follow the punctuation rules.
Make the help text short and descriptive.
Avoid using style formatting. It makes the tooltip harder to read.
Incorrect | Correct |
---|---|
![]() | ![]() |
Do not cover the information the user is currently working with.
Incorrect | Correct |
---|---|
![]() | ![]() |
Implementation: See four predefined point providers in the GotItTooltip
class.
GotItTooltip(TOOLTIP_ID, GOT_IT_TEXT, parentDisposable)
.show(gutterComponent, GotItTooltip.TOP_MIDDLE)
new GotItTooltip(TOOLTIP_ID, GOT_IT_TEXT, parentDisposable)
.show(gutterComponent, GotItTooltip.TOP_MIDDLE);
Consider adding a timeout if:
The text is no longer than 10 words.
The tooltip appears at the place at which the user is currently looking.
There is no link in the tooltip.

The Got It tooltip has a timeout because the text is short, the user has just started the Rename refactoring, and is very likely looking at this place.
Note that adding a timeout automatically hides the Got It button.
Implementation: Default timeout duration is 5 seconds. A custom duration can be set:
GotItTooltip(TOOLTIP_ID, GOT_IT_TEXT, parentDisposable)
.withTimeout(3000)
new GotItTooltip(TOOLTIP_ID, GOT_IT_TEXT, parentDisposable)
.withTimeout(3000);
If a tooltip appears automatically after the IDE starts, tie it to the IDE version. Due to the technical limitations, tooltip counters might be reset when the IDE version is updated, and the users might see the same tooltips again.
If a tooltip is triggered by an action or plugin installation, do not tie them to the current IDE version. In this case, users might miss a tooltip if they are using this functionality or plugin for the first time in the next IDE version.
By default, a tooltip is shown only once per user.
The tooltip disappears when:
Esc is pressed
User clicks any place outside the tooltip
The default timeout duration is 5 seconds.
If several tooltips appear on application start, they are shown one by one.
Text width is 280px by default. The tooltip width adjusts automatically to make the right margin 16px.


Thanks for your feedback!