wallabyjs / quokka

Repository for Quokka.js questions and issues
https://quokkajs.com
1.18k stars 31 forks source link

VSCode copy output feature #238

Open smcenlly opened 6 years ago

smcenlly commented 6 years ago

Feature Request

I would like a feature to be able to copy the entire output from the VSCode Quokka output window to the clipboard. I would also like to be able to copy a single output section to the clipboard.

These should be available as both VSCode Commands and as links from the VSCode output window.

myleftshoe commented 4 years ago

Would like to see this too. I recenty posted a question on stackoverflow where it would have been handy. I was testing some code using quokka with the expected output displayed alongside the code. I wanted to paste this directly into the SO question but instead had to post the code only, then copy the expected output line by line from the console window and paste it next to the relevant line in the code - a lot more time consuming and error prone.

rdhar commented 3 years ago

This looks like another great consideration to push forward #66. Huge quality-of-life improvement to copy the entire output as it appears, both for sharing and documentation.

DmitriyMalayev commented 2 years ago

This can probably be achieved by using a screenshot tool which selects code/text from image.

empz commented 2 months ago

Really need this.

empz commented 1 month ago

I need to get a big output to the clipboard. Using copy data from the Value Explorer doesn't work because it truncates the value. We definitely need a better way to get the data into the clipboard. Ideally, just right click the variable name in the editor and have a copy data option. I keep having to write my output to the filesystem which kills the idea of a fast notebook-like tool Quokka is suposed to be.

ArtemGovorov commented 1 month ago

@empz Have you tried Quokka.js: Copy Value command (Cmd/Ctrl + K, X)? It uses current editor context and will evaluate/copy expressions/variables under cursor or just selected in editor.

empz commented 1 month ago

@empz Have you tried Quokka.js: Copy Value command (Cmd/Ctrl + K, X)? It uses current editor context and will evaluate/copy expressions/variables under cursor or just selected in editor.

Yes, it's truncated.

ArtemGovorov commented 1 month ago

@empz Copy Value has the following limitations at the moment: maximum of 5000 elements in an array / object properties, maximum depth of 10, maximum single string length of 8192 characters. I guess in your case the limits are exceeded, is it correct?

While the existing limits are pretty deep to accomodate most of use cases, we can make them configurable so that in your case you will be able to specify how deep/far you'd like the objects to be copied. Will it work for you?

empz commented 1 month ago

Yes, the limits are exceeded. A configurable option would be useful.

ArtemGovorov commented 1 month ago

@empz Mind sharing what exact limits are you hitting in your case? Is it max number of an array items, max number of an object properties, max traversal depth, or max string length?