Skip to content
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

Refactor PluginMenuContributionHandler #11290

Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e147414
Refactor PluginMenuContributionHandler
colin-grant-work Jun 7, 2022
6b5d223
support menus on tabbars
colin-grant-work Jun 14, 2022
6368e57
Minor cleanup
colin-grant-work Jun 14, 2022
ffd5841
Check submenu when for Browser
colin-grant-work Jun 22, 2022
5209686
Typo
colin-grant-work Jun 22, 2022
68bca2e
VF comments
colin-grant-work Jun 23, 2022
0483e04
Ensure editor/title/context only appears on navigatable widgets
colin-grant-work Jun 28, 2022
ae90ed7
First move to break up tab-bar-toolbar.tsx
colin-grant-work Jun 29, 2022
96726df
Break up the code
colin-grant-work Jun 29, 2022
97216d2
Refactor Tabbar Toolbars
colin-grant-work Jun 29, 2022
20f0d08
Interface segregation
colin-grant-work Jun 30, 2022
8b1289f
Break up menu files
colin-grant-work Jun 30, 2022
76a8b69
Interface segregation
colin-grant-work Jun 30, 2022
455d720
Refactor to support flat menus & overriding buildSubmenus / fillMenuT…
colin-grant-work Jun 30, 2022
e2dcacd
Start refactoring toolbar to use flat submenus
colin-grant-work Jun 30, 2022
3ee6fca
Refactor tabbars for easier menu delegation
colin-grant-work Jul 1, 2022
3174510
Cleanup
colin-grant-work Jul 1, 2022
485ce1e
Fix submenu handling upon update
colin-grant-work Jul 1, 2022
cfa3d96
Refactor register menus to be truly recursive
colin-grant-work Jul 1, 2022
b544e6a
MS minor comments
colin-grant-work Jul 1, 2022
f5b6e99
No infinite loop for path lookups
colin-grant-work Jul 5, 2022
4f084ae
Update Playwright tests
colin-grant-work Jul 11, 2022
37088c6
But we also don't want separators at the end
colin-grant-work Jul 11, 2022
f6d2a2d
Add breaking changes
colin-grant-work Jul 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix submenu handling upon update
  • Loading branch information
colin-grant-work committed Jul 14, 2022
commit 485ce1e99a502c14c1e871a0e381f45f64ea4abc
6 changes: 4 additions & 2 deletions packages/core/src/common/menu/composite-menu-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class CompositeMenuNode implements MenuNode, CompoundMenuNode, CompoundMe
public iconClass?: string;
public order?: string;
readonly when?: string;
readonly role: CompoundMenuNodeRole;
readonly _role?: CompoundMenuNodeRole;

constructor(
public readonly id: string,
Expand All @@ -37,8 +37,8 @@ export class CompositeMenuNode implements MenuNode, CompoundMenuNode, CompoundMe
this.iconClass = options.iconClass;
this.order = options.order;
this.when = options.when;
this._role = options?.role;
}
this.role = options?.role ?? CompoundMenuNode.getRole(this)!;
}

get icon(): string | undefined {
Expand All @@ -49,6 +49,8 @@ export class CompositeMenuNode implements MenuNode, CompoundMenuNode, CompoundMe
return this._children;
}

get role(): CompoundMenuNodeRole { return this._role ?? (this.label ? CompoundMenuNodeRole.Submenu : CompoundMenuNodeRole.Group); }

/**
* Inserts the given node at the position indicated by `sortString`.
*
Expand Down