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

Computation state lost when navigating #223

Open
stevejpurves opened this issue Aug 21, 2023 · 3 comments
Open

Computation state lost when navigating #223

stevejpurves opened this issue Aug 21, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@stevejpurves
Copy link
Member

Describe the bug

context
When I do start computation with thebe and navigate between pages.

expectation
I expected to be able to return to a page and still see it in the sate I left it in terms of thebe computation. i.e. I should be able to enable thebe and start a notebook or figure executing on one page, then navigate away and return and still see the correct state on my return, for example the page would still be executing or execution will have completed.

bug
But instead the state of the page and the state of the ExecutionScopeProvider is always reset on navigation. THis was not previously the case, and the current design should allow for navigation. This was previously working.

problem
This is a problem for people working with thebe as they cannot navigate between pages and maintain the state they computed.

Reproduce the bug

Run examples at https://rowanc1.github.io/myst-lite/

List your environment

No response

@stevejpurves stevejpurves added the bug Something isn't working label Aug 21, 2023
@rowanc1
Copy link
Member

rowanc1 commented Aug 21, 2023

Note that this never worked on staticly rendered pages. All GitHub pages are staticly rendered!

@stevejpurves
Copy link
Member Author

Also this works on pages except for the "root" or "index" of the site, which I think is being fully re-rendered on navigation, akin to a page reload?

If that is the same with github pages then that points to needing a different way to manage the site state and keep any state for active pages / sessions alive.

Perhaps this is fixable for the non gh-pages builds. If so then for gh-pages, sounds like we'll need a different static strategy.

@rowanc1
Copy link
Member

rowanc1 commented Aug 22, 2023

Yes, we could bring the state/providers up to root (not on an articlepage), this would fix the root/index page issue. Right now they are not shared between the $.tsx route and _index.tsx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants