-
Notifications
You must be signed in to change notification settings - Fork 29.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
joh/notebook toolbar #161098
joh/notebook toolbar #161098
Conversation
…ecause some custom action things are going on
@roblourens this removes listening and rebuilding the menu when `insertToolbarAlignment` changes. This might be wrong but I couldn't get see how that event relates to the number of menu items (which are context key driven) use `WorkbenchToolBar` in CellTitleToolbarPart, doesn't use `MenuWorkbenchToolBar` because of `updateAction` things
This reverts commit fa89b71.
…mAction, e.g the `...` button
this._toolbar.setActions(actions); | ||
menu.dispose(); |
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 changed this to be a local because I don't see any other references and disposing a menu quickly is better - since it stops listening on CKS events
@@ -40,6 +40,7 @@ export class RunToolbar extends CellPart { | |||
|
|||
const menu = this._register(menuService.createMenu(this.notebookEditor.creationOptions.menuIds.cellExecutePrimary!, contextKeyService)); | |||
const secondaryMenu = this._register(menuService.createMenu(this.notebookEditor.creationOptions.menuIds.cellExecuteToolbar, contextKeyService)); | |||
// TODO@roblourens what does secondaryMenu actually do? where/when is it rendered? |
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.
@roblourens wasn't sure what this secondaryMenu
is about. It's like not needed, right?
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.
This is the dropdown for the run button (has Debug Cell). For some reason I create that menu again here:
vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.ts
Line 93 in d3a86e9
const menu = actionViewItemDisposables.add(this.menuService.createMenu(this.notebookEditor.creationOptions.menuIds.cellExecuteToolbar, contextKeyService)); |
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 is for #154804
We now have
WorkbenchToolBar
andMenuWorkbenchToolBar
. The latter is better/simpler but a little harder to adopt. This PR is about adopting each in notebook land. This will brings the ability to right click an item and hide it.I couldn't get this to work with notebook title toolbar. There must be some extra filtering that I didn't understand... Some work is left but I leave it to @roblourens or @rebornix
MenuWorkbenchToolBar
in interactive editorWorkbenchToolBar
in cellOutput but notMenuWorkbenchToolBar
because some custom action things are going onMenuWorkbenchToolBar
in BetweenCellToolBarWorkbenchToolBar
in codeCellRunToolbarWorkbenchToolBar
in notebook editor toolbarWorkbenchToolBar
in notebook diff landWorkbenchToolBar
in notebook editor toolbar"...
button