Closed genericallyterrible closed 4 months ago
Super nice!! And really well implemented, happy to see that you are using HypertextLiteral!! I would say that this is not "experimental", and it can go directly into PlutoUI. What do you think?
Sounds good to me! Wasn't super sure where details
should end up, and honestly stumbled my way into Layout.jl. If it should live in some other file so it's not submoduled under ExperimentalLayout, the only reliance it has on the other code in Layout.jl is the 5 lines implementing embed_display
(and the variable p
for example purposes).
I can move details
into its own notebook and copy over the functionality of embed_display
if that's appropriate, or perhaps there's some other path you had in mind?
details
has been moved to Details.jl and is now reexported from PlutoUI.jl
Edit: Running on the binder image:
Thanks so much for the tweaks and tests!
I'd be happy to PR the CSS over to Pluto once this is accepted, everyone deserves pretty <details>
. 😊
I have a bit of clarification on one of your changes and its impacts on the assumptions I made about how details
should format its contents, but I'll leave that comment as a response to the change itself.
Thanks so much for the PR! Let me know what you would like to work on next :)
Adds new function
details
to automatically create a well formed Details disclosure element (<details>
).Currently scoped as:
using PlutoUI.ExperimentalLayout: detailsSince this new function creates normal HTML
<details>
elements, collapsed details elements will omit their contents from any print/export. If this behavior is undesirable, it seems a JS fix could be applied as discussed here on SO though I'm unsure where it would slot in.I couldn't get
@bind
to behave properly in the Layout.jl notebook to fully test it internally. UI elements would render, but bound variables would never update. When usingdetails
in the binder environment automatically created by github-actions it behaves as expected.