Open stefanbringuier opened 1 year ago
Nice! I wonder what the best place to publish it would be. How do you feel about registering a package for this widget? I personally think that small packages are fantastic, and we should make them more often!
Some notes:
HTML
, join
, etc. Try it out!using
?
currentScript.closest("pluto-cell")
. The use .querySelector
to find the "Run" button, and .click()
it. But this is not officially supported API, you would need to wait for https://github.com/fonsp/Pluto.jl/pull/2392 for that.Thanks reply and all the stuff you do for the community!
Nice! I wonder what the best place to publish it would be. How do you feel about registering a package for this widget?
I have no reservations against making it a registered package, just wasn't sure and wanted to get a consensus. Could it sit under the JuliaPluto org?
- This would be a really good place to use HypertextLiteral.jl instead of
HTML
,join
, etc. Try it out!
Hmm, good point, will do.
- This widget probably also works (and would be useful!) in Jupyter, Franklin, Documenter, Olive.jl, etc,
Yeah, I would think so. I do know that PlutoStaticHTML.jl will grab the packages and versions with:
julia> oopts = OutputOptions(; append_build_context=true);
...
julia> build_notebooks(bopts, files, oopts)
[...]
and then this resulting HTML notebook files can be used with Franklin or Documenter.
- Is the goal of the refresh button to re-run all cells that contain
using
?
Yes, that's the idea. I'll keep an eye on the issue you reference and thanks for the pointers on the dev tools and notebook for JS since I'm not aware of these.
I export most of my pluto notebooks to HTML and I know that the package install log, which includes the version info, can be seen by clicking on the check-mark and showing the terminal output. However, if there are a lot of packages, it would be much easier to just see the package versions in one place. Especially when I'm working off a notebook and want to see which packages and versions I used.
To do this, I created a draft approach to create such visual widget:
Here is the associated notebook: https://github.com/stefanbringuier/randomonium/blob/main/notebooks/PackageVersionUI.jl
The table is collapsible and tried to include a refresh button, although I don't think it's working.
I haven't made any attempt to keep aligned with the PlutoUI styles, but just wanted to know if something like this would be incorporated into PlutoUI. It would be nice to just import
PlutoUI
and callPackageList
, for example. If there is interest, could anyone help with improving on the style and approach, since my knowledge of HTML/CSS/JavaScript is limited.