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

Deduplicate conda-store in JupyterLab main menu #2347

Merged

Conversation

krassowski
Copy link
Member

@krassowski krassowski commented Mar 19, 2024

Reference Issues or PRs

Uses jupyterlab-conda-store if available, fallbacks to opening /conda-store in new browser tab otherwise. The label in each case is set to "Environment Manager" (but we can adjust it).

Before

  • "Services > Environment Management" coming from nebari and opening conda-store in a new tab:
    image
  • "Conda-Store > Conda Store Package Manager" coming from jupyterlab-conda-store:
    image

After

  • single "Services > Environment Manager" which opens jupyterlab-conda-store if available or /conda-store in new tab otherwise.

image

What does this implement/fix?

Put a x in the boxes that apply

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds a feature)
  • Breaking change (fix or feature that would cause existing features not to work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Other (please describe):

Testing

  • Did you test the pull request locally?
  • Did you add new tests?

Copy link
Contributor

@dcmcand dcmcand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @krassowski

Copy link
Contributor

@viniciusdc viniciusdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as well, though just to make sure, this is used when the user opts for installing the extension what happens when the extension is not available?

"args": {
"url": "/conda-store",
"text": "Environment Management",
"newBrowserTab": true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this, does the extension still opens as a separate tab?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That code was opening the /conda-store in a new browser tab.

"text": "Environment Management",
"newBrowserTab": true
}
"command": "condastore:open",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @krassowski thanks for this, could you explain a bit how this works? does this call the extension, or the endpoint for the conda-store webpage as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It opens conda-store-ui as a tab in jupyterlab main area:

conda-store

@krassowski
Copy link
Member Author

krassowski commented Mar 20, 2024

this is used when the user opts for installing the extension what happens when the extension is not available?

The extension is included in the default docker image, so there is no opting-in. When extension is not available because user admin opts-out, the menu item is not show, but the other menu items are shown.

We could have it both ways: when extension is available, open it as a JupyterLab tab; when extension is not available open it in a new browser tab. I can make this work straightaway by adding some logic in jupyterlab-nebari-mode.

@krassowski
Copy link
Member Author

A dedicated logic (new command) in jupyterlab-nebari-mode would also allow to change the label so maybe it is desirable.

@viniciusdc
Copy link
Contributor

viniciusdc commented Mar 20, 2024

A dedicated logic (new command) in jupyterlab-nebari-mode would also allow to change the label so maybe it is desirable.

Yes, I agree. I was also trying to lean towards this, as we would be able to keep the names "non-dependent" on the extension itself. Would you be able to include these changes as part of this PR, or do you prefer if this is a separate step?

@krassowski
Copy link
Member Author

Would you be able to include these changes as part of this PR, or do you prefer if this is a separate step?

I will include the changes here. It will require bumping the pin to jupyterlab-nebari-mode on docker images, I will drop a link to PR when ready.

to opening `/conda-store` in new tab otherwise;
use the same title for both
@krassowski
Copy link
Member Author

Done. I updated top-level issue. This now depends on nebari-dev/nebari-docker-images#130. Tested locally with the new image. Recording:

local-test

@krassowski
Copy link
Member Author

Is this and nebari-dev/nebari-docker-images#130 good to merge?

Copy link
Contributor

@viniciusdc viniciusdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

@viniciusdc viniciusdc merged commit 0ff7b7c into nebari-dev:develop Mar 22, 2024
9 checks passed
@viniciusdc viniciusdc added this to the 2024.3.3 milestone Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

[BUG] - Conda store shows up in two places in menu bar
3 participants