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
Fix extension toggling at different level #16102
Fix extension toggling at different level #16102
Conversation
Thanks for making a pull request to jupyterlab! |
I think this was intentional prior to having extension locks. This guaranteed that admin could disable extension globally and user would not be able to change it. Now that we have plugin locks this change makes sense to me. This looks like a step in the right direction, but we would need some tests to:
Those can be added in the "usage" tests group. |
nvm |
for more information, see https://pre-commit.ci
FYI, this also needs jupyterlab/jupyterlab_server#448 |
@krassowski can you re-run the checks here now that jupyterlab_server 2.27.0 is released (I don't have the perms to) |
I think we need to pin the dependency anyways to ensure users who are upgrading do not get an import error. |
@krassowski the failures seem unrelated to this PR, can you take a look and let me know if this is good to merge? |
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.
Thank you @divyansshhh!
@meeseeksdev please backport to 4.1.x |
Co-authored-by: Divyansh Choudhary <divyanshchoudhary99@gmail.com>
* Fix extension toggling at different level Fixes jupyterlab#16101 * Address review comments * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Pin jupyterlab_server dependency * Fix usage test * Remove check for uninstalled extension --------- Co-authored-by: Divyansh Choudhary <choudhdi@deshaw.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
References
Fixes #16101
Code changes
Changed the _AppHandler.toggle_extension method to look into all levels to decide whether an extension is enabled or not, if it's not, we change the page_config at the specified level