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

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

Closed
krassowski opened this issue Jun 11, 2024 · 6 comments · Fixed by #20
Closed
Assignees
Labels
difficulty: easy needs: discussion 💬 Needs discussion with the rest of the team priority: medium

Comments

@krassowski
Copy link
Member

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):

default_value=[
{
"git": "https://github.com/nebari-dev/nebari.git",
"homepage": "https://github.com/nebari-dev/nebari/",
"title": "Nebari",
"description": "🪴 Nebari - your open source data science platform",
},
{
"git": "https://github.com/nebari-dev/nebari-docker-images.git",
"homepage": "https://github.com/nebari-dev/nebari-docker-images/",
"title": "Nebari docker images",
"description": "Nebari Docker images",
},
],

@krassowski krassowski added needs: discussion 💬 Needs discussion with the rest of the team difficulty: medium labels Jun 12, 2024
@krassowski
Copy link
Member Author

Relevant place in the codebase:

const title = data.title === 'Gallery' ? trans.__('Gallery') : data.title;
// add the widget to sidebar before waiting for server reply to reduce UI jitter
if (launcher && isNewLauncher(launcher)) {
launcher.addSection({
title,
className: 'jp-Launcher-openExample',
icon: galleryIcon,
id: 'gallery',
rank: 2.5,
render: () => {
return widget.render();
}
});

@krassowski
Copy link
Member Author

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
Copy link

kcpevey commented Jun 12, 2024

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
Copy link
Member Author

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 #19. I guess the priority of this issue goes down to medium.

@andrewfulton9
Copy link
Collaborator

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

@krassowski
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: easy needs: discussion 💬 Needs discussion with the rest of the team priority: medium
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants