Open vince-fugnitto opened 1 year ago
Hi @vince-fugnitto, @colin-grant-work I have a similar or maybe the same issue. I am getting this error when trying to press on the 3 dots toolbar menu on the git/source control:
Uncaught Error: 'git.tags' is not a menu group.
at MenuModelRegistry.findSubMenu (menu-model-registry.ts:250:19)
at MenuModelRegistry.findGroup (menu-model-registry.ts:235:32)
at MenuModelRegistry.getMenuNode (menu-model-registry.ts:112:25)
at MenuModelRegistry.linkSubmenu (menu-model-registry.ts:170:28)
at TabBarToolbar.renderMoreContextMenu (tab-bar-toolbar.tsx:183:53)
at TabBarToolbar.showMoreContextMenu (tab-bar-toolbar.tsx:166:14)
at HTMLUnknownElement.callCallback (react-dom.development.js:4164:1)
at Object.invokeGuardedCallbackDev (react-dom.development.js:4213:1)
at invokeGuardedCallback (react-dom.development.js:4277:1)
at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:4291:1)
Can I fix this issue in my Theia extension (by overriding some methods)? If so, can you point out where can I start from?
Thanks in advance
@safisa, I think I've tracked down the source of your problem. I'll make a PR for it in a bit.
Hi,
Also the following warn messages in the console (copied from the forum https://community.theia-ide.org/t/many-vscode-git-extension-warning-messages-in-console-log/3032):
WARN Failed to register a menu item for plugin vscode.git contributed to scm/sourceControl Object Error: Could not find submenu with id scm/sourceControl
{command: 'git.acceptMerge', submenu: undefined, alt: undefined, group: undefined, when: 'isMergeEditor && mergeEditorBaseUri =~ /^(git|file):/ && mergeEditorResultUri in git.mergeChanges'}
WARN Failed to register a menu item for plugin vscode.git contributed to merge/toolbar Object Error: Could not find submenu with id merge/toolbar
{command: 'git.stageChange', submenu: undefined, alt: undefined, group: undefined, when: 'config.git.enabled && !git.missing && originalResourceScheme == git'}
WARN Failed to register a menu item for plugin vscode.git contributed to scm/change/title Object Error: Could not find submenu with id scm/change/title
{command: 'git.revertChange', submenu: undefined, alt: undefined, group: undefined, when: 'config.git.enabled && !git.missing && originalResourceScheme == git'}
Thanks
The 2 scm menus are listed in the missing vscode declarative APIs issue (#13051 ), and more specifically in the comment https://github.com/eclipse-theia/theia/issues/13051#issuecomment-1875063218.
editor/content is a proposed API (see https://github.com/microsoft/vscode/blob/main/src/vscode-dts/vscode.proposed.contribEditorContentMenu.d.ts)
documentation for the source control menus: https://code.visualstudio.com/api/extension-guides/scm-provider#menus
@dhuebner Would you be interested in looking at this? IIRC, you added some declarative API in the past or am I mistaken?
@JonasHelming Sure, I can take a look this week.
@JonasHelming I did some investigation regarding the missing sub menu entries. The problem is that we have missing functionality in this area and there is simply no place where we can register this menu contribution. @rschnekenbu please correct me if I'm wrong.
Following the list of Failed to register a menu item
warning logs I found by following the "Steps to reproduce" instructions. In parenthesis I listed the command ids:
So it is not just adding a new sub menu, but implementing missing scm, editor and diff-editor features that IMHO should be tracked in separate enhancement issues. I would suggest to remove this issue from the epic container issue.
@dhuebner That makes a lot of sense, thank you for the investigation! Would you mind creating the new issue, now that you have all the details at hand? I will remove the issue from the epic.
Bug Description:
There are issues when using the vscode.git and vscode.git-ui builtins as it references unsupported menu paths:
Steps to Reproduce:
vscode.git
andvscode.git-ui
from the exclusion listhttps://github.com/eclipse-theia/theia/blob/978a3a0d504f5f54425175d88afee2cdf1617d02/package.json#L119-L120
@theia/git
and@theia/scm-extra
from the example applicationsdownload:script
pulls the git builtins