JuliaPluto / PlutoUI.jl

https://featured.plutojl.org/basic/plutoui.jl
The Unlicense
301 stars 55 forks source link

Add show_value kwarg to with_terminal() #137

Closed j-fu closed 3 years ago

j-fu commented 3 years ago

Thank you for opening a Pull Request at PlutoUI.jl!

Before contributing code

Note that your code will be Unlicensed when added to PlutoUI.jl, not MIT licensed like contributions to Pluto.jl. Take a look at our license: https://github.com/fonsp/PlutoUI.jl/blob/main/LICENSE

... this is ok with me.

dralletje commented 3 years ago

This should use the new embed_display feature, and I think we can make show_value=true the default. This function isn't called just_terminal 😏

j-fu commented 3 years ago

Ok I like to have it as true as well.

As for embed_display: this would introduce a dependency on Pluto which so far has been avoided. What would be the advantage here ?

dralletje commented 3 years ago

As for embed_display: this would introduce a dependency on Pluto which so far has been avoided. What would be the advantage here ?

I don't think it is on Pluto, it would be an implicit dependency on PlutoRunner. If it is there (hence running in Pluto) we use it, else we "just" show the string value. embed_display would show the value as Pluto would have shown it: with the right mime_type, interactive, etc.

j-fu commented 3 years ago

Yeah it is on PlutoRunner. Probably like this then...