Skip to content
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: new Try-It page based on plain Pyodide #3058

Merged
merged 10 commits into from
Apr 10, 2024
Merged

Conversation

jpivarski
Copy link
Member

With the exception of the new <script>, this is a copy of https://pyodide.org/en/stable/console.html. Maybe there will be a way to link that in, maybe open it in an iframe and inject the new <script>.

The idea is for the "Try It!" button to open a new window or tab with a console that someone can use to try code in one window while reading the documentation in another.

@jpivarski jpivarski requested a review from agoose77 March 20, 2024 21:37
@jpivarski
Copy link
Member Author

jpivarski commented Mar 20, 2024

@agoose77, this replaces the Try-It page with a console that has Awkward loaded, like we talked about in one of our Zoom calls. I'd like to make it open in a new tab, so that it's easy to access the console independently of the documentation, but there doesn't seem to be a way to do this for a MyST image target. Alternatively, it could reveal a hidden iframe on click (also don't know how to do that), but then you'd lose it when navigating around the documentation. At some point, the user would have to open two browser tabs or windows, anyway.

@jpivarski
Copy link
Member Author

I should also reintroduce that tutorial that you wrote as an ordinary page, too. It had good material. Or maybe I could modify the new try-it.html to be left and right side-by-side with the tutorial and the console, like on https://numpy.org/.

@jpivarski
Copy link
Member Author

It now opens a new tab and has a little arrow to indicate that this is the case. It's good!

@jpivarski jpivarski merged commit 87d2191 into main Apr 10, 2024
18 checks passed
@jpivarski jpivarski deleted the jpivarski/new-tryit-page branch April 10, 2024 00:20
@agoose77
Copy link
Collaborator

Jim thanks for pushing on this, it fell unfortunately during my move else I'd have had more eyes on it.

The big change here is that we no longer deploy our WASM builds in a testable way for PRs. Maybe a longer-term development feature would be to build the WASM wheel separately to docs deployment for a pyodide-console deployment. We could even make that opt-in (triggering it via a label) to reduce our CI overhead on average.

@jpivarski
Copy link
Member Author

I was thinking about that as a follow-up PR. But on the other hand, testing the WASM compilation with every commits is as good of an idea as testing compilation on the other platforms. Maybe I should leave the infrastructure in just for that.

In general, I've been thinking about doing a sprint to finally fill in all of the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants