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
Split the Document Manager extension into multiple plugins #12701
Conversation
Thanks for making a pull request to jupyterlab! |
498b097
to
14dc983
Compare
cc @fcollonval for review, since you also had a look at this in #12966 |
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 @jtpio
I have a minor suggestion. Otherwise this is good to go.
@jtpio sorry I missed the instantiation of |
ah right, at least CI caught it. I'll push a fix. |
Co-authored-by: Frédéric Collonval <fcollonval@users.noreply.github.com>
a36da17
to
098660f
Compare
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
References
Follow-up to #12349
Fixes #12965
This will help with jupyter/notebook#6446 to avoid duplicating too much logic in the Notebook v7 code base.
Code changes
Split some of the docmanager extension logic into multiple plugins so they are easier to reuse and compose downstream.
New plugins:
@jupyterlab/docmanager-extension:opener
: a plugin to open document widgets@jupyterlab/docmanager-extension:contexts
: handle dirty contextsTODO
User-facing changes
This fixes an issue introduced in #12349 not being able to create a new view for a document widget:
This was because the name
opener
was used in the code, but was not referring to the widget opener but implicitly towindow.opener
instead: https://developer.mozilla.org/en-US/docs/Web/API/Window/openerBackwards-incompatible changes
None at the API levelIDocumentWidgetOpener
interface also now defines anopened
signal that is emitted when a widget is opened.