-
Notifications
You must be signed in to change notification settings - Fork 87
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
docs: link to execute JupyterLite full screen #2854
Conversation
9da98d1
to
2010c43
Compare
I'd be in favor of that. I've been wondering if we can eliminate the third column (table of contents for the current page) because it's irrelevant for this page. In general, the problem is that the whole JupyterLite environment is fitting within an area designed for text, but this page should be exceptional. If you find a way to add a full-screen button, that's great! If you take another approach and make this page custom, maybe by defining a new HTML It's valuable for the JupyterLite element to not (always) be the entire page, since a user/reader of documentation will want to navigate to other parts of the documentation. This "Try it!" page differs from NumPy's (https://numpy.org/, scroll down) so that it can guide the user with an example. But that means that there's no place for generic exploration, as NumPy has. But as you can see, NumPy's has less JupyterLite decoration around the edges, at the expense of not having cells that interleave input and output. |
Hi @zonca, thanks for opening this PR! There is a UI option to open the JupyterLab environment: However, it's not self-evident (I had to hunt around for this myself the other day). Another approach to making this full-screen is to use a commandlink button in the notebook that enters "zen mode": <center>
<button data-commandLinker-command="application:toggle-zen" href="#">Go fullscreen! <i class="fa-solid fa-expand"></i></button>
</center> If you create a Markdown cell at the top of the notebook and run this, what do you think? |
I agree those are hard to find, I think the button at the top of the notebook is best, |
5364240
to
44bd85d
Compare
44bd85d
to
8ba32b4
Compare
ok @agoose77 I named it "Toggle" and I removed the icon because the icon only works within sphinx, if someone downloads the notebook or does "Open JupyterLab", the icon breaks. |
I don't think we need to worry about the icon breaking if someone downloads the notebook; the notebook as-is only works in pyodide due to the use of piplite. With that in mind, could we restore the icon? I think it helps confer the purpose of the button. |
Thanks @zonca! This is a useful change :) |
I could not find a way to run JupyterLite at https://awkward-array.org/doc/main/getting-started/try-awkward-array.html#try-it full screen, if not it is too small to execute comfortably in my opinion.
Following https://jupyterlite-sphinx.readthedocs.io/en/latest/full.html, I think the easiest way is to provide a link to https://awkward-array.org/doc/main/lite/retro/notebooks/?path=what-is-an-awkward-array.ipynb