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

[BUG] 按照文档示例修改无法移除 Terminal menu 终端菜单项 #131

Open
justin2gh opened this issue Sep 15, 2023 · 6 comments
Open

Comments

@justin2gh
Copy link

按照文档示例修改无法移除 Terminal menu 终端菜单项

image

复现路径(To Reproduce)
按照以下示例和代码修改无法移除 Terminal menu 终端菜单项
https://opensumi.com/en/docs/integrate/universal-integrate-case/custom-menu

import { BrowserModule } from '@opensumi/ide-core-browser';
import { Domain } from '@opensumi/ide-core-browser';
import { MenuContribution, IMenuRegistry, MenuId } from '@opensumi/ide-core-browser/lib/menu/next';

@Injectable()
@Domain(MenuContribution)
export class MenuBarContribution implements MenuContribution {
registerMenus(registry: IMenuRegistry): void {

    registry.unregisterMenuId(MenuId.MenubarTerminalMenu);

    console.log("registry.registerMenubarItem", MenuId.MenubarTerminalMenu);
} 

}

预期表现(Expected behavior)

移除 Terminal menu 终端菜单项

环境信息(Environment)

  • OS: Debian Docker
  • Browser: chrome
  • OpenSumi Version: [v2.26.4]
@justin2gh
Copy link
Author

@bytemain 帮忙看看

@bytemain
Copy link
Member

用 removeMenubarItem:

registry.removeMenubarItem(MenuId.MenubarTerminalMenu);

@bytemain bytemain transferred this issue from opensumi/core Sep 15, 2023
@justin2gh
Copy link
Author

@bytemain 非常感谢!用这个方法 removeMenubarItem 可以了,文档多久会更新一次?

@bytemain
Copy link
Member

我们稍后就把这个信息更新到文档中,感谢反馈

@AhkunTa
Copy link
Member

AhkunTa commented Sep 15, 2023

可以参考下 codeblitz 纯前端方案中中移除terminal的方法 主要
移除terminal 贡献点
截屏2023-09-15 15 39 11
移除 menu菜单
截屏2023-09-15 15 39 34

具体可以在 https://github.com/opensumi/codeblitz 这里搜索 terminal 关键词

@bytemain
Copy link
Member

这个先 open 吧,后面我们修改文档后再关掉

@bytemain bytemain reopened this Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants