fonsp / Pluto.jl

🎈 Simple reactive notebooks for Julia
https://plutojl.org/
MIT License
4.91k stars 284 forks source link

Show progress bar earlier during load #2889

Closed fonsp closed 2 months ago

fonsp commented 2 months ago

On very slow connections, you need to wait for the full editor JS to be loaded until you see the fetch progress bar.

This PR does some "server side rendering" to show an indeterminate progress bar immediately when the html and CSS loads, which will be "hydrated" when the editor JS is loaded.

Here is a "Fast 3G" throttled load of a featured notebook. Notice first the (greyed out) progress bar, replaced by the real progress bar, and once the statefile is loaded, the notebook. Before this PR, you would see a blank screen.

https://github.com/fonsp/Pluto.jl/assets/6933510/4adee854-a2ae-4d34-b1ba-22c60160f54c

github-actions[bot] commented 2 months ago

Try this Pull Request!

Open Julia and type:

  julia> import Pkg
  julia> Pkg.activate(temp=true)
  julia> Pkg.add(url="https://github.com/fonsp/Pluto.jl", rev="earlier-progress-bar-during-load")
  julia> using Pluto