-
Notifications
You must be signed in to change notification settings - Fork 96
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
[ENH] - Extension to present and pull a set of examples/gallery #2456
Comments
I think that's an excellent idea, and while the current
|
Also similar - https://github.com/jupyterhub/nbgitpuller |
Two questions to think about:
|
sidebar vs main area widget - I think its important that its obvious to users that the examples exist. One concern I have is that if its just an icon on the left (e.g. the dask icon for the dask extension), it will mean nothing to users and they will never discover the examples. I can see how a main area widget opening automatically would annoy people (me). What are the other options for the sidebar? We could have a reserved area like the "favorites" section but that would be very limiting. What about adding a top menu item called "Examples" or "Example Gallery"? That would be pretty visible and then if clicked, it would open in the main area and we would have lots of space? |
On smaller screens the menu gets cut off already, so not sure here. Some other ideas:
I think these are not mutually exclusive (nor is the sidebar idea). |
I like the tile in the launcher idea! Would that be compatible with the new launcher? |
Technically - sure. Conceptually? Not sure. Here is what I mean:
I think there is a lot of value in having "Create Empty" as it is, even moving VS Code out of there to make it conceptually simple. Still, it would make a lot of sense to have a place to expose "VS Code" and "Gallery" tiles on the launcher. Not sure how to make it work in the layout yet. |
Strictly, I would think gallery tile should go to the top-right corner. Maybe the solution is having multiple ways to access it. |
It looks like we can reuse the The alternative is using |
I see two options related to putting it in the "new launcher"
|
Their strategy seems reasonable. But it would be nice to have a progress bar. |
Maybe part of the solution is to make those icons in top right corner larger and more obviously discoverable also including the text ( |
This sounds great for when the new-launcher extension is available; if it is not installed we can just add a tile which would open a main area widget in the default launcher.
To clarify |
I got a backend re-using The way |
I have a slight concern about using |
We are and will not be using any of |
Some thoughts after completing an initial implementation that puts the gallery in the new launcher:
Switching gears to work on backend, while waiting for any potential discussion/ideas on UI/UX |
Some questions on usability:
responded in the issue
responded in the issue
I agree, for my usecase I'd like "Examples" but I can see many other usecases where "gallery" would be more appropriate. It would be nice to set this as the admin level.
Right now it looks like they are roughly the size of 2x2 of the other tiles which lines up nicely. I'm happy with that and I think it gives enough extra space for more information without being too large.
I think for this we just need to decide on how to handle overflow, right? So maybe it can show as many characters as will fit in the 2x2 square above and then have |
In my current thinking the destination is owned by the server, and can be configured by admin only. I think we can make this user customizable if this is desirable; it is a little bit more complicated as would now need to track where the repositories got cloned, but something that can be done in half a day. |
I'm ok with that for the POC given the LOE and its a "nice to have" anyway. We can try this out as-is and add it as a new feature in the future if there is a significant interest. |
Closing as implemented with inclusion of https://github.com/nebari-dev/jupyterlab-gallery in v2024.6.1 🎉 |
Feature description
Nebari provides
jupyterlab.initial_repositories
option which allows to pre-populate user space with content needed for them to start work, or to explore pre-defined examples:nebari/src/_nebari/stages/kubernetes_services/__init__.py
Line 238 in 7d0c28e
However, this requires cloning the entire set of repositories each time, is problematic to synchronise the repositories when they change, and does not provide the user with an interactive way to explore the repositories ahead of time.
We could create a JupyterLab extension that would present the examples, either in the sidebar or in the main area, together with rich metadata (icon/screenshot, title, description) and allow user to setup the example in the background.
Value and/or benefit
yaml
/json
file that could be updated independently of the deployment cyclegit stash
/git pull
/git stash pop
sequence)git pull
would allow to also setup, or activate any required conda environments if associated with the example repositoryAnything else?
There are existing JupyterLab extensions which use git for cloning or fetching repository content:
While there is an overlap with these extensions, the proposed gallery has specific presentation and user interface requirements which set it apart from the existing extensions; that said, we could leverage these extensions to simplify the backend implementation.
The extension could support PAT or other authentication mechanisms; the entire sequence of pulling (and optional auth) would happen in a jupyter-server extension, so the secretes would never be exposed to the end user.
The text was updated successfully, but these errors were encountered: