-
Notifications
You must be signed in to change notification settings - Fork 17
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
Upgrade topbar extensions to JupyterLab 4 #92
Upgrade topbar extensions to JupyterLab 4 #92
Conversation
Nice thanks @mahendrapaipuri for working on this! |
.stylelintcache
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this file can be added to the .gitignore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, totally. Cheers for pointing it out!!
- [jupyterlab-logout](https://github.com/jupyterlab-contrib/jupyterlab-logout): add a "Log Out" button | ||
- [jupyterlab-theme-toggle](https://github.com/jtpio/jupyterlab-theme-toggle): switch between the Light and Dark themes | ||
- [jupyterlab-topbar-text](./packages/topbar-text-extension): add and edit custom text | ||
- [jupyterlab-system-monitor](./packages/system-monitor-extension): show system metrics (memory usage) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For jupyterlab-system-monitor
either we include it here, or maybe directly in jupyter-resource-usage
? jupyter-server/jupyter-resource-usage#191
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that it makes more sense to move it over to jupyter-resource-usage
as users can install everything at once. I will work on that!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that would be great, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reference there is a PR to update jupyter-resource-usage
to JupyterLab 4: jupyter-server/jupyter-resource-usage#195, that could be finished before jupyter-server/jupyter-resource-usage#191.
Or update to JupyterLab 4 directly as part of jupyter-server/jupyter-resource-usage#191.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll have very low bandwidth over the next 2 weeks so if you want to take over and finish the lab 4 PR that would be greatly appreciated. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I can do that. Are you going to add me as a collaborator or should I start a new PR with your branch as base?
# This file is auto-generated by Hatchling. As such, do not: | ||
# - modify | ||
# - track in version control e.g. be sure to add to .gitignore | ||
__version__ = VERSION = '1.0.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for going with 1.0.0
for all these extensions 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And _version.py
must be ignored as well. Will fix these soon.
Will add this extension to the jupyter-resource-usage repo. See #195, #191 in jupyter-resource-usage
Remove _version.py files from VCS. Hatchling will handle them directly.
Thanks again @mahendrapaipuri for working on this. I updated the repo settings so the CI should run when new changes are pushed, to reduce friction. |
Mistakenly we were using coreutils 4.0.0 which made topbar-text extension outdated
@jtpio Fixed issues with CI. This PR is good to go for the review. I dont have an awful lot of experience with GitHub workflows. I tried to modernise the actual CI workflows without changing the way the packages are being tested. If you think, we can improve/optimize the existing workflows, please let me know. |
// Get app commands | ||
const { commands } = app; | ||
|
||
const namespace = 'topbarcmds'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency with other third-party extensions, should we rename the namespace to jupyterlab-logout
?
const namespace = 'topbarcmds'; | |
const namespace = 'jupyterlab-logout'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about jupyterlab-topbar
as namespace? It will still be project specific namespace and we will be able to use same namespace for any future buttons we will add to topbar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That could indeed work, unless we consider all these extensions as independent and the first part of the command (namespace) to correspond to the name of the extension.
|
||
import '../style/index.css'; | ||
|
||
const logoutPluginId = '@jupyterlab/logout-extension:plugin'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is not an official extension, maybe the following name would be more appropriate?
const logoutPluginId = '@jupyterlab/logout-extension:plugin'; | |
const logoutPluginId = 'jupyterlab-logout-extension:plugin'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency we could then do the same with the other extensions in this repo / diff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough. I thought this convention was put in-place when extensions were distributed as npm packages to put all official extensions under one umbrella namespace. As this is not the case anymore, I thought we could use this convention so that all extensions will be installed at same location for the end users.
Anyways, I will change the names for all extensions.
Remove badges from README of packages Remove references to jupyterlab-resource-monitor in README. Add a note that the package can be installed from jupyter-resource-usage Add postBuild file for binder
Change extension names from @jupyterlab-* to jupyterlab-* to avoid clashing with official extensions Use jupyterlab-topbar as command namespace for logout extension
@@ -0,0 +1,84 @@ | |||
{ | |||
"name": "jupyterlab-logout-extension", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the npm
name keep the -extension
suffix? Or just be jupyterlab-logout
like the current name on npm? https://www.npmjs.com/package/jupyterlab-logout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just so that when we make a release later with this change we still publish to the same package on npm.
@@ -0,0 +1,87 @@ | |||
{ | |||
"name": "jupyterlab-theme-toggler-extension", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar comment as above, maybe we should stick to jupyterlab-theme-toggle
for now?
Thanks @mahendrapaipuri for your work on this 👍 I left a few more comments about how to name the npm packages. Looks like the PR should be good to go. We could also merge and iterate in follow-up PRs. One thing to check in a separate PR would be to add support for the Jupyter Releaser so we can automate the publishing of all the Python packages (and npm) in the monorepo. |
Happy to contribute and thanks to you too @jtpio for helping me out. Addressed all your PR comments. Yes, I think we can add support for releaser in a separate PR. I see that you merged #195 that adds JLab 4 support for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This looks good to go. As mentioned in the comments we'll have to check how to setup the versioning of the extensions so releases can be made with the Jupyter Releaser.
Yes that would be great, thanks! |
Closes #81