-
Notifications
You must be signed in to change notification settings - Fork 832
VS: Some further QuickInfo improvements #14995
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
Conversation
|
This needs some cleanup, probably fixing tests / baselines. If this looks acceptable I'll follow up in this PR. |
|
@majocha this looks promising! I few thoughts:
Thanks for your effort, all the recent quick info changes are amazing, we might want to write a blog post about them. :) |
|
Added some before screenshots 🙂 |
|
I'm wondering what to do with the tests. The problem is, as they stand now, they only effectively exercise the GetToolTip method from the compiler service, and not the actual editor part. OTOH there's a lot of them and they are valuable. |
I don't know the details as I've never seen VS on mac, but at some point there was an effort to make the rendering of VS visuals cross platform. From that time come all the |
That's probably happening in Aah, that |
|
Thanks :) As for MacOS, good to know that we have at least some efforts for some special handling there. |
|
I salvaged the tests. |
|
OK reduced diff, this is good when green. |
|
Also fixed old ugly hack that was plain wrong code and sometimes interfered with nice text wrapping. |
|
This is green, so I update the branch and it is ready. |
|
@psfinaki, exactly my thinking. Params are hidden again now. |
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.
So I left a few comments - mostly some higher-level questions for future reference.
Overall, I am for merging this, now it's a good time to get this in and try this out.
vsintegration/src/FSharp.Editor/DocComments/XMLDocumentation.fs
Outdated
Show resolved
Hide resolved
|
Alright, LGTM, merging. @majocha thanks! |
|
We have CPP VS perf tests failing by latest insertion. This is the only pr which touched VS, might be related to changes in tooltip styling, forcing VS to load us in non-F# projects. Something similar happened before:. I am reverting the insertion right now, we will investigate further next week. |
|
FSharp.Core is loaded when C++ is showing a tooltip in microsoft.visualstudio.vc.ni! VCCompletion.SetTooltipContentFromJson. It uses standard Microsoft.VisualStudio.Text.Adornments.ClassifiedTextElement in the content. These are “view model” classes used to create remotable and crossplat rich tooltip content, and they require IViewElementFactory exported MEF component that can convert them to WPF UIElement for display. Microsoft.VisualStudio.Text.Adornments.ClassifiedTextElement already has built-in IViewElementFactory in the editor, which uses standard VS theme, but in this pr wr also export our own IViewElementFactory also targeting Microsoft.VisualStudio.Text.Adornments.ClassifiedTextElement, which effectively means we are subscribing to style any ClassifiedTextElement used in any tooltip in any language. It’s supported by IViewElementFactory, but the expectation is that we should target your own custom “view model” type instead of standard Microsoft.VisualStudio.Text.Adornments.ClassifiedTextElement in your IViewElementFactory, this way convertor will only be loaded and called when a tooltip to be shown contains that custom type. |
|
Ay, thanks for the detailed write up. This is salvageable, the culprit is fdcbe04. I'll fix it after the weekend. |
No rush, we can look into it next week too :) |
|
@vzarytovskii
Yep, the documentation can be terse sometimes and it's invaluable to have the right people to talk to :) |





before:

after:

before:

after:

before:


after:
before:

after:

I removed a lot of code that was putting together signature and implementation docs in quickinfo. I think in light of #14711 and #14920 that is no longer needed and any such functionality should belong to the service, not the client anyway.