-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add details
#288
Add details
#288
Conversation
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 I can move |
Update per review Co-authored-by: Fons van der Plas <fonsvdplas@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey! Again this PR is really impressive! Thanks so much for the contribution :)
After this PR is merged, I would like to move all of the CSS into Pluto itself: a details element created without PlutoUI should also get these nice styles :) Can you make a PR to Pluto for that?
I made some small tweaks, see the comments. To me this is ready to merge, let me know!
src/Details.jl
Outdated
|
||
# ╔═╡ 46521e2b-ea06-491a-9842-13dff7dc8299 | ||
begin | ||
const embed_detail = isdefined(Main, :PlutoRunner) && isdefined(Main.PlutoRunner, :embed_display) ? Main.PlutoRunner.embed_display : identity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI this can later be replaced with JuliaPluto/AbstractPlutoDingetjes.jl#9
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 I have a bit of clarification on one of your changes and its impacts on the assumptions I made about how |
Use `htl"` instead of `md"`
Follow-up from: JuliaPluto#288 (review) Pending: fonsp/Pluto.jl#2814
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.