Open kMutagene opened 8 months ago
This rings a bell. I believe this is a change with NicePrint
over in the F# compiler.
I remember some time ago that I wanted to include parameter attributes in the signatures files.
This impacts:
I don't think this is problematic in itself. It accurately reflects what the code contains. The formatting maybe could improve over at the compiler side? I'm not sure, maybe it is fine and what the ID does with the result should improve. I also think Ionide does its own thing with tooltips.
And I'm pretty sure that fsharp-formatting might also drop the ball in the tooltip department.
I don't think this is problematic in itself. It accurately reflects what the code contains.
While technically correct, i am not sure if i agree here generally. Maybe my use case for these tooltips is non-standard, but i generally want to know the names and types of the arguments - which are really hidden in visual noise, even when formatted better like in your screenshot. It also might be that the methods of Plotly.NET just have an unusual amount of arguments (sometimes > 100), so it might be an extreme case where tooltips reach their limit anyways.
I do not want to sound too complain-y here though - at the end of the day if this the way to display tooltips i'll adapt, but i think for this specific use case the update made things worse.
If you could point me to the code where tooltips are generated, i could add a flag to the tool that trims these from the input if that is a possibility. Should be quite easy to remove with a regex, as everything is guarded by [<>]
As an aside - the API docs tooltips for methods look 100x better than this IMO. could we just display that as tooltip (without the param descriptions)?
I think extending the DisplayEnvironment
(in https://github.com/dotnet/fsharp/blob/1e78d396a1397009fe52d609660376f0ce5c5d52/src/Compiler/Symbols/SymbolHelpers.fs#L546-L551) and only add the attributes when our new flag is enabled (Somewhere in https://github.com/dotnet/fsharp/blob/4934588ae8dfac3de2e8ce58198601edbfddfd08/src/Compiler/Checking/NicePrint.fs#L1047) makes the most sense. We would disable it for tooltips.
We can pair on this sometime if you want.
We can pair on this sometime if you want.
Sure, do you intend to stream this? I am not sure if i will have time in the next week(s), but i'll make sure to reach out once i am free
Sure, do you intend to stream this?
We could but that is really up to you. I wasn't specifically proposing it with that in mind.
I am not sure if this is the correct place to raise an issue like this, because it also affects both tooltips in VS and polyglot notebooks
Plotly.NET makes quite heavy use of attributes for method arguments to improve C# interop. A typical method looks like this:
in the past, tooltips for these methods looked like this:
with the latest fsdocs version, they include the
Optional
andDefaultParameterValue
Attributes, even prefixed with their full namespaces:This is really unfortunate because they are now completely unusable. This also happens in Ionide and Visual studio:
So i suspect something bigger out of the scope of this lib being at play. Might this be related to this lib updating the FCS version with > 19.0.0? Is there another place to raise this issue? This is impacting the usability of Plotly.NET heavily.