-
Notifications
You must be signed in to change notification settings - Fork 321
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
Create a default folder (for lite sessions #1518
Comments
I experimented a bit myself and tried to implement the first part, the creation of a fresh session folder on startup. The folder creation works, though the navigation to the folder fails: with the popup Do you have any tips on how to avoid the race condition and where my bug might be? |
Yes this should be doable via an extension.
This may be more difficult, as there may not be a hook to indicate in which phase the contents manager is currently in. Most extensions will sit at the same level.
"Upload" should normally upload files to the current directory? |
Otherwise, wondering if this could be a good use case for a custom drive? By implementing a A while ago I started https://github.com/jupyterlab-contrib/jupyterlab-browser-storage to look into moving the default JupyterLite contents manager to a drive extension, so it's more flexible. Maybe this extension could serve as inspiration for your use case? |
Thank you for your help! |
In the long term, du classing the JupyterLite contents drive would be the way to go. But I think I’ll wait until JupyterLite switches to this more modular approach first - right now I’m just trying to hack something together ;) |
Problem
In my JupyterLite deployment, users commonly open the lab either to (a) open a new "session" (with fresh files), (b) to open existing files from a git repo (using litegitpuller) or URL (using jupyterlab-open-url-parameter). For these use cases, it is important to provide fresh sessions where old files don't clash with downloading new ones.
At the moment, I provide these fresh sessions by only using the memory storage driver, i.e. all changes are lost when the window is refreshed. However, this can of course lead to annoying losses of information.
I'm hoping to setup a lite session system that would function as follows:
Proposed Solution
Would it be possible to create a fresh directory when a new browser tab with JupyterLite is opened? This is probably relatively easy since the upload extensions already hook into the contents API.
Would it be possible to create this directory before any other contents extension runs?
Would be possible for the upload extensions to use this new "default" directory?
The text was updated successfully, but these errors were encountered: