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

Add info tooltip to inlay hints #972

Merged
merged 9 commits into from
Jul 23, 2022
Merged

Add info tooltip to inlay hints #972

merged 9 commits into from
Jul 23, 2022

Conversation

Krzysztof-Cieslak
Copy link
Member

No description provided.

Copy link
Contributor

@baronfel baronfel left a comment

Choose a reason for hiding this comment

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

Looks good, just need to patch up assertions on the tooltips in the tests. I guess they're all the same unless we're testing the permutations of the enable/disable mechanism.

@Booksbaum
Copy link
Contributor

Two issues:


The message overrides the original tooltip (which currently only happens when hint gets truncated):

Long tooltip:
InlayHintTooltipLong
Short tooltip:
InlayHintTooltipShort

I think when InlayHint provides a Tooltip we should put a separator between Inlay Hint tooltip and info on how to hide inlay hints (like the separator between current tooltip & "double click to insert")



The message is very VsCode/Ionide centric:

  • Commands are required on client to change settings
  • Assumes VsCode Behaviour (-> existence of offUnlessPressed behaviour for Inlay Hints)
  • Shortcut is for VsCode

I think we should move the info to the client side:
Instead of disableLongTooltip to disable info, the client can push additionalInfo for InlayHints to FSAC, which FSAC then adds below the Inlay Hint tooltip (or can extension in VSCode add text on its own to existing tooltips?)
-> Ionide provides info message about how to disable Inlay Hints with its Ionide-commands, while other clients don't get the Ionide-specific message

@Krzysztof-Cieslak
Copy link
Member Author

The message is very VsCode/Ionide centric

This is a fair point - I've changed the default value for disableLongTooltip to false so all other clients will get standard tooltips. We will override the default on the Ionide side to get the long one by default in VSCode. I guess we could do the design you've suggested (with the Client defining the long tooltip content) - but TBF, I'm not convinced it's worth the effort right now; I'd rather merge this ASAP and finally do a new Ionide release.

@Krzysztof-Cieslak Krzysztof-Cieslak merged commit c46bdbc into main Jul 23, 2022
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.

3 participants