-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Add token on tree widget #6496
Add token on tree widget #6496
Conversation
Thanks @brichet for working on this. Diff looks good. CI is currently broken because of |
I called the widget and token |
Right, this naming mostly comes from the name of the Probably it's fine to keep that way for now while in alpha. We can always revisit later and maybe we could also rename the |
7e1abc9
to
5482c1f
Compare
packages/tree-extension/src/index.ts
Outdated
import { NotebookTreeWidget } from '@jupyter-notebook/tree'; | ||
import { INotebookTree } from '@jupyter-notebook/tree'; |
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 these two imports could be combined?
|
||
import { INotebookTree } from './token'; | ||
|
||
export class NotebookTreeWidget extends TabPanel implements INotebookTree { |
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.
Let's add a docstring to the class and constructor
for consistency with the rest of the code base?
The UI tests checks still appear to be cancelled after restarting them:
|
Thanks for reviewing @jtpio. I''l have a look at it. |
A part of the tests are currently failing because of :
So the tree widget toolbar is not displayed and filled with |
packages/tree-extension/src/index.ts
Outdated
@@ -93,10 +94,87 @@ const createNew: JupyterFrontEndPlugin<void> = { | |||
} | |||
}; | |||
|
|||
function activateNotebookTreeWidget( |
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.
Any specific reason to move the activate function to a separate function?
Maybe we can keep inlined as part of the plugin definition for consistency with the rest of the code base?
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.
Not really, I reverted it
Thanks @brichet this is looking good. I wanted to check on Binder but it seems like it doesn't start v7 anymore, which also happens on Probably something changed in the setup (maybe the hatch migration), I'll have a look in a separate PR. |
This should be fixed by #6505. |
…ets in it from external extension
Remove trailing whitespace Co-authored-by: Jeremy Tuloup <[email protected]>
55b7137
to
9ac98a6
Compare
Nice! But the binder link is created only when the PR opens the first time I think, so it will not work on this one. |
Right but it doesn't change, so we can open it again or refresh the page. |
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!
Fixes #6410
The
NotebookShell
allows only one widget in the main area.As the tree view is a
TabPanel
, it would be interesting to be able to add widgets (as it was possible in Classic Notebook).This PR adds a token on the
NotebookTreeWidget
, the widget in main area in tree view.Any extension will now be able to optionally try to retrieve the
INotebookTree
in theactivate
function, and add widgets in it using theTabPanel
's interface functions.It should close #6478 as a more generic implementation.