Very bad experience with default F# formatting in notebooks
See original GitHub issueDescribe the bug
I’m opening this issue as a bug report as I’m quite confused about what was discussed and concluded in the previous related issue #642 and I haven’t seen any changes in behavior in the latest dotnet interactive versions.
The problem is that the default formatter for F# values in notebooks does a really bad job, in turn making the user experience quite bad, and in my view unusable, by default. This is especially the case for a newcomer with lots of experience in Python and Juypter, trying out dotnet interactive.
We just need to have a simple plaintext printer by default, which mirrors the conventional Jupyter notebook experience with Python. This can be achieved by these two lines @dsyme kindly provided before:
Formatter.SetPreferredMimeTypeFor(typeof<obj>, "text/plain")
Formatter.Register(fun (x:obj) (writer: TextWriter) -> fprintfn writer "%120A" x )
Can you please make this the default in dotnet interactive for F#?
This is the single biggest problem with the user experience currently.
Screenshots of the default behavior and the updated behavior are attached below.
Please complete the following:
Which version of .NET Interactive are you using? 1.0.211906+4b8eb267854eb055ef2f7b16561ebbcd6cc69b2e
- OS
- Windows 10
- macOS
- Linux (Please specify distro)
- iOS
- Android
- Browser
- Chrome
- Edge
- Firefox
- Safari
- Frontend
- Jupyter Notebook
- Jupyter Lab
- nteract
- Visual Studio Code
- Visual Studio Code Insiders
- Other (please specify)
Screenshots
Screenshot with bad user experience (the current default)
Screenshot with acceptable user experience (after manually having to change the default F# formatter)
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
My intent was to say that we can change the F# defaults and also we would like input on the HTML formatters, which will be the default for C#, and will remain an option for F# users.
To make this clearer, I’ve opened a specific issue for changing the F# defaults: #1297.
Thank you so much @jonsequitur for your response and patience. I’ve been really grumpy about this as it has affected my work for a long time and I believe it also affects the newcomer experience (primarily Python users trying F#/C#/dotnet in their browsers).