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

Tooltip default delay is too long? #645

Open
francisconoriega opened this issue Oct 18, 2024 · 3 comments
Open

Tooltip default delay is too long? #645

francisconoriega opened this issue Oct 18, 2024 · 3 comments
Assignees
Labels
consistency Our UI presentation is not consistent with IJ

Comments

@francisconoriega
Copy link
Contributor

It seems like IntelliJ's tooltips have different delays, some are almost instant and some take what feels like too long

From a quick research I found this:

Side Toolbar icons seem almost instant:

Screen.Recording.2024-10-18.at.12.55.11.PM_H.265.mp4

Toolbars seem to be intermediate, with something that feels around 500 ms:

Screen.Recording.2024-10-18.at.12.54.10.PM_H.265.mp4

But then there are some very slow, 1200ms ones like the gutter icons:

Screen.Recording.2024-10-18.at.12.53.57.PM_H.265.mp4

Jewel is defaulting to the slowest one, but its so slow that it almost makes it feel like a component does not have a tool tip.

Would it make sense to default to the intermediate one?

@rock3r rock3r self-assigned this Oct 19, 2024
@rock3r
Copy link
Collaborator

rock3r commented Oct 19, 2024

I'll look into this. I'm quite sure we picked that value for a reason, but I don't know what it was :D You can change the delay in the style for now, so this is lower priority.

Most likely it'll end up being implemented as a way to tweak the delay in the constructor. We'll change the default to whatever Swing uses for non-editor tooltips. I think right now we are using the editor delay

@rock3r
Copy link
Collaborator

rock3r commented Nov 5, 2024

After looking into this, it is clear that the tooltip delay should be set to the value of the ide.tooltip.initialReshowDelay registry key (can we recompose when that changes? Do we use rememberUpdatedState for this?), which defaults to 500 ms. This is what HelpTooltip does at a basic level. The Bridge uses ide.tooltip.initialDelay, which is the wrong value. The same check needs to be done in the standalone style, aligning on 500 ms.

There are more values in the registry:

image

Note

Some values are effectively unused: ide.tooltip.dismissDelay and ide.tooltip.initialDelay for sure, possibly others too. ide.tooltip.animationCycle is only used by colour pickers and the Motion Editor in Studio.

However, there are some extra considerations to make:

  • HelpTooltip also uses ide.tooltip.reshowDelay for when the mouse moves but the enter has not been captured (not sure how that happens, a more in-depth look is needed)
  • In IJP, tooltips also disappear automatically after a duration from the registry
    • The default duration is 10s or 30s, depending on whether the text content is single- or multi-line (defined not by the actual layout but by counting if there are any <p> tags)
    • You can also set tooltips to never hide explicitly in their builder.
    • Tooltips attached to help buttons (the round ones with the ? symbol) also never hide by default.
    • We should separately track this behaviour and implement it at some point.
  • Editor tooltips store their delay in com.intellij.openapi.editor.ex.EditorSettingsExternalizable — that is also 500 ms by default (can be set in [500, 5000]). I don't think we need to care about this for now.
  • We need to have a zero-delay, never-hide style for toolwindow icons, but that is only realistically needed for standalone, so it's a lower priority.

@hamen passing this over to you to implement. I'll leave it for you to file separate issues for what I outlined above (sorry!)

@rock3r rock3r assigned hamen and unassigned rock3r Nov 5, 2024
@rock3r rock3r added the consistency Our UI presentation is not consistent with IJ label Nov 5, 2024
@rock3r
Copy link
Collaborator

rock3r commented Dec 3, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consistency Our UI presentation is not consistent with IJ
Projects
None yet
Development

No branches or pull requests

3 participants