Skip to content

Conversation

@majocha
Copy link
Contributor

@majocha majocha commented Apr 16, 2023

Alternative approach to styling QuickInfo, to address the issue with our IViewElementFactory being picked up by other packages in VS.
Now we provide content using the cross platform objects (ClassifiedTextElement at al.) and let VS render them. Custom visuals are provided by our internal FSharpStyle so the type conversion should never be available to other VS inhabitants.
To make the links look nicer we imperatively touch up the visual tree created by VS. Maybe not a standard, but still a legit way to do this.

FSharpStyle overrides ToString to render paragraphs and separators cross platform. (To see this in action in VS on Windows just comment out [<Export(typeof<IViewElementFactory>)>])

@majocha majocha requested a review from a team as a code owner April 16, 2023 20:17
@T-Gro
Copy link
Member

T-Gro commented Apr 17, 2023

Thanks for the quick turnaround @majocha .

Since the original regression happened as a perf regression for CPlusPlus coding tooltips, could we test that it isn't happening again? As in F# MEF-registered service is not being loaded in non-F# context.

@majocha
Copy link
Contributor Author

majocha commented Apr 17, 2023

Since the original regression happened as a perf regression for CPlusPlus coding tooltips, could we test that it isn't happening again? As in F# MEF-registered service is not being loaded in non-F# context.

Probably we could, the starting point would be to obtain IViewElementFactoryService and create a few standard elements. The next step would be to check if MEF loaded anything from FSharp.Editor. I'm not sure how to do it.

@vzarytovskii vzarytovskii changed the base branch from main to release/dev17.7 April 17, 2023 10:22
@vzarytovskii
Copy link
Member

I have re-targeted it to 17.7, so we don't wait for bot to merge it.

@majocha
Copy link
Contributor Author

majocha commented Apr 24, 2023

Does it need to be merged into main also?

@vzarytovskii
Copy link
Member

Does it need to be merged into main also?

Not necessary, I usually don't bother with such changes. It will get there once 17.7 is merged back, but if you'd like to, you can cherry pick and PR it

@vzarytovskii
Copy link
Member

/backport to main

@github-actions
Copy link
Contributor

github-actions bot commented May 9, 2023

Started backporting to main: https://github.com/dotnet/fsharp/actions/runs/4925202806

@vzarytovskii
Copy link
Member

Reason for backporting - I want it in main and my branch, where I publish custom VSIX

@majocha majocha deleted the fix-wpf branch February 25, 2024 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants