jupyterlite-sphinx
jupyterlite-sphinx copied to clipboard
Switch loading indicators with native ones
See https://github.com/jupyterlite/jupyterlite/pull/1636 and https://github.com/jupyterlite/jupyterlite/issues/1637 where there is progress on a loading indicator in JupyterLite itself. When formalised, jupyterlite-sphinx can drop its own loading animations and use the ones provided by JupyterLite. We'll have to use either of the two, as they will conflict and overlap on top of each other if I understand it correctly?
This would be mostly for the REPL/.. replite:: directive at this time, I think.
The "Try" button added by JupyterLite Sphinx could likely stay here, to activate the IFrame.
But otherwise yes the spinner added by https://github.com/jupyterlite/jupyterlite/pull/1636 could be used directly, although at the moment it's only available with the lab interface.
The "Try" button added by JupyterLite Sphinx could likely stay here, to activate the IFrame
👍🏽 on this. We should let the ability to not load anything until a button is explicitly pressed. Since the page load can result in 100s of MB download, we should let the opportunity to not load anything.
To me there are two loading indicators:
- the iframe is loading (the custom spinner of jupyterlite-sphinx)
- the application inside the iframe is loading (the lab/lite application spinner)
Thank you for your thoughts!
The "Try" button added by JupyterLite Sphinx could likely stay here, to activate the IFrame
👍🏽 on this. We should let the ability to not load anything until a button is explicitly pressed. Since the page load can result in 100s of MB download, we should let the opportunity to not load anything.
Yes, I fully agree on the bandwidth aspect! However:
To me there are two loading indicators:
- the iframe is loading (the custom spinner of jupyterlite-sphinx)
- the application inside the iframe is loading (the lab/lite application spinner)
Here, I think it could make sense to add a URL parameter to JupyterLite itself that can control the loading of the JupyterLite assets. For example, something like https://jupyterlite.github.io/demo/lab/index.html?clickToLoad=1; or a similar/better name that we can think of (maybe loadingIndicator – it's more direct?), which will not load JupyterLite and not show the loading indicators unless someone explicitly presses the button to do so. The default behaviour could be to load the assets, as is currently the case.
This suggestion comes from the idea that:
- the iframe activator is currently present only inside
jupyterlite-sphinxfor the preserving bandwidth usage, and having it for all JupyterLite sites would be pretty beneficial to preserve bandwidth usage - it would mean we have less code to maintain in
jupyterlite-sphinxthat interacts directly with JupyterLite (even though it means that we have more code to maintain elsewhere in JupyterLite)
I started working on jupyterlite-sphinx mainly to improve the behaviour of interactive docs around downstream projects that were aiming to use it, and I have come to like the philosophy that we interact more at the Sphinx level rather than at the JupyterLite level. So, I'm curious what you think about this suggestion!
I'd also note that I have made the assumption that such spinners/buttons will be available with all interfaces (Lab, Notebook, REPL, Voici, etc.) at a later point after the current one for Lab materialises.