nebari-dev / jupyterlab-gallery

A JupyterLab gallery for presenting and downloading examples
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

Should the gallery section be hidden in the launcher if no exhibits are configured? #18

Closed krassowski closed 2 months ago

krassowski commented 2 months ago

Should the gallery section be hidden in the launcher if no exhibits are configured? As of today it will show some pre-defined (and not very useful) example repositories (nebari and nebari docker images):

https://github.com/nebari-dev/jupyterlab-gallery/blob/f90920445a5b8e988167895912204497df1334be/jupyterlab_gallery/manager.py#L50-L63

krassowski commented 2 months ago

Relevant place in the codebase:

https://github.com/nebari-dev/jupyterlab-gallery/blob/f90920445a5b8e988167895912204497df1334be/src/index.ts#L65-L77

krassowski commented 2 months ago

I think this is high priority because if we add the extension to base nebari image all users will get a new section with useless exhibits as of today.

We need to decide whether to show an empty section or no section at all if exhibits are not configured. Showing nothing might be suboptimal for users who install this extension outside of nebari as they may be confused as to whether the installation was successful or not.

Maybe we could show the section but collapsed by default if there are no exhibits? Then, for existing deployments it would be pretty annoying to have a new empty section.

Maybe it should be configurable and new nebari version would ship with an override saying "do not show in no exhibits are configured"?

kcpevey commented 2 months ago

Short term: I think hiding the gallery section entirely (not a collapsed section) would provide a quick, sufficient solution.

Long term: I agree, it should probably be configurable via nebari on whether to include it as an empty section or not show at all.

At this point, let's focus on the short term solution.

krassowski commented 2 months ago

Short term: I think hiding the gallery section entirely (not a collapsed section) would provide a quick, sufficient solution. ... At this point, let's focus on the short term solution.

I agree. That was a three-line change and blocking us from including the extension in nebari, so I went ahead and made it in https://github.com/nebari-dev/jupyterlab-gallery/pull/19. I guess the priority of this issue goes down to medium.

andrewfulton9 commented 2 months ago

@krassowski, I can pick this one up. I don't seem to be able to assign myself though

krassowski commented 2 months ago

I've sent you an invite to collaborate, I think this will allow you to self-assign going forward