-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Management of widgets in tree view #6478
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Need to think about this, but at first glance trying to know what a page or a set of extensions is trying to add sounds a bit odd.
The shell should be generic enough, for example we could imaging other custom application reusing
NotebookShell
but without the tree view (or a different one not using aTabPanel
).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.
Also for more context the
NotebookShell
was initially thought as only allowing 1 widget in the main area on purpose. As a way to have document / widget centric pages.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 this solution is not generic enough.
Is that still relevant as there is already the tree view that would allow several widgets in main area ?
Indeed if the tree view will be the only one needing several widgets, the better way might be to expose its tab panel as said in #6410. Would the idea be to use token ?
Otherwise, another way could be to use a dock panel like in JupyterLab, but limited to one widget by default. That would keep the initial context but allows several widgets in main area if necessary.
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.
Good point. For the tree page it would make sense for widgets to be added to the tab panel. And would be natural to extension authors using
app.shell.add(widget, 'main')
.Yes the idea would have been to require the token to be able to add new widgets to the tab panel. Thinking more about it this might be simpler to implement, although maybe less straighforward to extension authors who would somehow need to create a dedicated plugin for this.