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

A BinderHub JupyterLab extension #987

Open
choldgraf opened this issue Oct 23, 2019 · 9 comments
Open

A BinderHub JupyterLab extension #987

choldgraf opened this issue Oct 23, 2019 · 9 comments

Comments

@choldgraf
Copy link
Member

In jupyterhub/mybinder.org-deploy#1202 (comment) @bitnik has been adding a little button to the top-right of the classic notebook interface for Binder links. This got me thinking that we could expose something similar for JupyterLab with an extension.

What do folks think about creating a JupyterLab extension that opens via the sidebar and uses the Binder logo as its icon (similar to what the Dask labextension uses.

This extension could be installed by default on all JupyterLab Binder sessions, and could expose a few simple buttons:

  • Copy Binder link
  • Download repository as a zip file
  • (optional, disabled on mybinder.org) Copy Binder session w/ token

If other obvious use-cases come up, the extension could be extended to other kinds of things too.

What this would require

  • Understanding of JupyterLab and labextensions
  • Understanding @bitnik's notebook Binder button to re-implement for JupyterLab

That said, I don't believe that it would be too technically difficult, considering the fact that much of the under-the-hood implementation should already be possible because of @bitnik's PR. Obviously it'd be more complex as other features were added.

And for deploying on something like mybinder.org, it'd also require a community decision to enable it.

I'm curious what @jhamman and others who deploy BinderHubs for their own communities think about this.

@nuest
Copy link
Contributor

nuest commented Oct 23, 2019

I think this is a great idea and can imagine some further buttons (which go well beyond the metadata exposed so far), and I'm excited to see this mechanism which might help me to realise them:

@betatim
Copy link
Member

betatim commented Oct 24, 2019

Would be a nice win for UX!

We should try to reuse existing stuff where we can. For example there are already a few notebook extensions (for example here and nbzip) that do "turn this directory into a zip file". It would be great if we could use their machinery and only add a new button to the UI that is connected to an action they already provide. Mostly because it means we have to maintain less code ourselves :)

Another cool feature

  • upload a zip you downloaded earlier to resume working on your binder

@jhamman
Copy link

jhamman commented Oct 25, 2019

We'd be all for this. I think @bitnik's feature set on the notebook UI is a great start. Beyond that, I can see how a download this binder button, or a publish my modified binder button would get a lot of use.

@psychemedia
Copy link

psychemedia commented Jul 29, 2020

Related, https://github.com/plasmabio/tljh-repo2docker : "TLJH plugin to build and use Docker images as user environments. The Docker images are built using repo2docker."

And also "A Persistent BinderHub Deployment" (relates to #794):

We want to unite the best of JupyterHub and BinderHub. From a user’s point of view we think the way forward is to enable a binder form on the home page of every user on the JupyterHub installation. To achieve this, we added 2 new features to BinderHub, authentication and persistent storage.

@choldgraf
Copy link
Member Author

Are the JupyterLab buttons that we serve on mybinder.org built into BinderHub, or special-cased for mybinder.org?

image

If the former, then I think we could close this issue unless folks really want a sidebar extension.

@psychemedia
Copy link

I think I saw a mention somewhere in one of the JupyterLite discussions about a button to run a notebook from a JupyterLite/JupyterLab UI on a remote MyBinder server. The extension suggested by this thread would cover that wouldn't it?

Ah... maybe I misremembered: it was a suggestion for a Binder kernel....

@manics
Copy link
Member

manics commented Sep 21, 2021

They're built in to repo2docker https://github.com/jupyterhub/repo2docker/blob/3eef69f7454ddb9086af38b2ece5f632af05920f/repo2docker/buildpacks/conda/environment.yml#L7
I'm planning to transfer that extension as soon as I've cleaned up a few minor things: jupyterhub/team-compass#437

@betatim
Copy link
Member

betatim commented Sep 24, 2021

I think we can close this.

A more ambitious (and not yet done) UI tweak would be having a single bit of UI that BinderHub can inject into the UI independent of the UI a container is using. So instead of having a classic notebook extension, a lab extension, a RStudio extension, etc there'd be one that houses the "Link to this Binder", "Share this Binder", etc actions. However this is a new topic/issue.

@minrk
Copy link
Member

minrk commented Oct 5, 2021

In investigating the issues related to jupyterhub/jupyterhub#3636 (comment) , I think we should ship a lab extension for mybinder.org like the hub-extension that registers a custom onConnectionLost handler to give a more informative error and disable reconnects by setting isConnected = false.

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

No branches or pull requests

7 participants