Open j-fu opened 1 year ago
Hey Jürgen!
There are a couple of things that I want to consider before releasing:
grid_spacing
that are mirrored by CSS properties grid-spacing
, or should we focus more on giving you an easy passthrough to write the CSS features yourself? So it is about this balance between "you get to write CSS" and "Julian wrapper". My personal preference is the former, but I wonder what would be best for people without CSS experience.@vbox(...)
. The goal is to allow things like:@vbox([
@bind x Slider(1:10),
plot(rand(x)),
])
This does not work currently, because updating x
causes the entire cell to re-run.
Hi, regarding CSS: I share your preference as this lowers the barrier for people who don't know and never will need to know CSS (I know only a little bit). OTOH there is so much what can be done with CSS that I think it makes no sense to try to match all of that. So I think it makes sense to provide keywords for some basic things and to document how CSS could be used. If the way keywords are introduced is flexible enough others could contribute here via PRs.
As for feedback: I e.g. did this talk all with ExperimentalLayout: https://www.wias-berlin.de/people/fuhrmann/AdSciComp-WS2223/week3/
I am not sure though if enough Pluto users are aware of its existence.
@vbox([
@bind x Slider(1:10),
plot(rand(x)),
])
I would use this immediatly, (especially in combination with vertical sliders...)
Hey! Little update!
The plan is to release this as a separate package, PlutoLayout.jl
, and to support this syntax:
@vbox([
plot(rand(x)),
@bind x Slider(1:10),
])
Note here also that @bind x
comes after plot(x)
, which should work!
To support this, either it needs to be super integrated in Pluto, but this seems veeeeeery difficult and complicated. Or the alternative: we can create a tiny reactive framework within the cell using PlutoHooks! (Somehow this seems easier.) For this, PlutoLayout needs to understand how to order cells, and what the definitions and references of a cell are.
This is why I started working on https://github.com/JuliaPluto/ExpressionExplorer.jl (and https://github.com/fonsp/Pluto.jl/pull/2698): this makes the reactive analysis of Pluto.jl available to other packages (like PlutoLayout.jl). In particular, other packages can use it inside macros.
The main feature of PlutoLayout.jl is its special display: it integrates with Pluto's frontend to create div
s that are rendered using Preact, diffing each component individually. I think this mechanism should be made available using AbstractPlutoDingetjes.Display, or at least with a special MIME type.
So the plan is:
Hi, what are the plans with Layout/ExperimentalLayout ?
I find this highly useful, IMHO it can be released as part of the public API.