Fork me on GitHub
#calva
<
2020-07-27
>
Maksim Glebov20:07:44

Some thoughts about new output window after using it for a couple of days. For me old Calva behaviour with evaluation results in the hover was pretty handy, especially at laptop with a small screen. I rarely use REPL window / Calva says channel. New behaviour is a great improvement of the output window, but it forces users to keep it open, which might not be ideal in some circumstances. Maybe this two things can make it more "optional": - Do not open the output window automatically after inline evaluation. Let the user decide to keep it open or not. Additionally, this allows us not to deal with VSCode API limitations @pez mentioned before. - Keep evaluation results in the hover. Add an extra button "Open Results Window" next to "Copy" (which is done already). Of course this is just me, and it would be great to hear feedback from other Calva users 🙂

pez20:07:59

About the hover results. I thought nobody used it. 😄 But also, the way it was implemented it kept the full results twice in potentially large JSON and markdown structures (one for displaying, one for copying). This got problematic and I took this opportunity to kill the feature.

pez20:07:47

Could you see if this workflow works for you? 1. Move the output window to the same group as the editor with your source files. 2. When you want to check out an evaluation result, use ctrl+alt+c o to focus the output window. Use ctrl+dash to go back to your source file. 3. If you want to copy the result, either use the dedicated calva command for this. Or focus the window (as per above), then use ctrl+w to select the results, then copy it.

pez20:07:34

If this works we could tell about it in the docs.

Cris B20:07:42

This is a bit of an aside, but one of the reasons I've found myself using the hover is inline eval output forcing lots of horizontal scrolling to read it. Would it be possible to wrap it?

pez21:07:12

So you too have been using the hover results display!

pez21:07:02

It is not possible to wrap it (it is a CSS :before style). Please help put some attention on this VS Code API issue, which could bring inline results display to the next level: https://github.com/microsoft/vscode/issues/85682

3
pez21:07:22

Give this announcement some love please. ❤️

pez21:07:35

About the hovers not displaying the results any longer. I really didn't know it was a used feature. I still think it is a bad idea, the way it was implemented at least, but if you people think it should be reinstalled, I'll do it. It is quite simple to bring back.

hayley06:07:04

here's my vote for bringing it back. Previously, I would almost always close the repl window as soon as it opened, and then do all of my evaluation inline. Now when my evaluation results are more than one line, previously I could hover over to see the entire set. Now, it points me to open the evaluation results in another window, which for me, is a disruptive mental context switch. If I were always working on a large screen, I'd just learn to always have the output window open in another split. Also, unless I've misinterpreted "dash", the ctrl+dash shortcut isn't taking me back to my source file. It's just shrinking the vscode window.

Cris B22:07:38

My view would be it's unnecessary duplication, particularly with the new output window. It might be worth revisiting if/when vs code's inset/peek facilities are enhanced, but for now the inline eval results + output window do a perfectly good job. (and in principle - deleting code is usually good!)

❤️ 3
pez22:07:15

Nice. That was my reasoning when doing this change. 😃

bringe22:07:15

Here's an idea I have that might be doable and would provide a similar function to the hover we had: https://github.com/BetterThanTomorrow/calva/issues/693 @glebovmaksim @cb.lists Feel free to add to it if you have suggestions