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

feat(menubar): add menu bar methods to service and support shortcut keys #298

Merged
merged 25 commits into from
Aug 5, 2021

Conversation

ProfBramble
Copy link
Contributor

@ProfBramble ProfBramble commented Jul 30, 2021

简介

  • 添加 menuBar 部分功能并注册快捷键
  • 将 editorController 中的 registerActions 进行结构

主要变更

  • 添加 menubar 新建文件功能
    • menubar controller 新增 createFileOrFolder 调度至 folderTreeService
    • folderTreeService 新增 createFileOrFolder
  • 添加 menubar 视图中全选与向上拷贝功能,并支持注册快捷键
    • 添加向上拷贝的快捷键注册类 quickCopyLineUp
    • 添加全选的快捷键注册类 quickSelectAll
  • 优化 editorController 中的 register 方法
    • 解耦原本 register 方法对 redo / undo 的强绑定
    • 添加状态机分流相应 action

Related Issues

Closed #264

@ProfBramble ProfBramble requested a review from wewoor July 30, 2021 02:45
@wewoor wewoor added this to the 0.9.0-alpha.4 milestone Jul 30, 2021
@wewoor wewoor added the enhancement New feature or request label Jul 30, 2021
@wewoor wewoor requested review from mumiao and removed request for wewoor July 30, 2021 02:46
src/controller/explorer/folderTree.tsx Outdated Show resolved Hide resolved
src/controller/menuBar.ts Outdated Show resolved Hide resolved
src/monaco/quickCopyLineUp.ts Outdated Show resolved Hide resolved
src/monaco/quickSelectAllAction.ts Outdated Show resolved Hide resolved
src/services/workbench/explorer/folderTreeService.ts Outdated Show resolved Hide resolved
src/controller/editor.tsx Outdated Show resolved Hide resolved
src/controller/editor.tsx Outdated Show resolved Hide resolved
src/model/workbench/menuBar.ts Outdated Show resolved Hide resolved
src/services/workbench/editorService.ts Outdated Show resolved Hide resolved
src/services/workbench/explorer/folderTreeService.ts Outdated Show resolved Hide resolved
src/services/workbench/explorer/folderTreeService.ts Outdated Show resolved Hide resolved
@ProfBramble ProfBramble changed the title WIP: feat(menubar): add menu bar methods to service and support shortcut keys feat(menubar): add menu bar methods to service and support shortcut keys Aug 4, 2021
} from 'mo/model';
import { FolderTreeService, IFolderTreeService } from 'mo/services';
import { randomId } from 'mo/common/utils';

const confirm = Modal.confirm;
export interface IFolderTreeController {
readonly createFileOrFolder?: (type: keyof typeof FileTypes) => void;
readonly createFileOrFolder?: (type: FileType) => void;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rebase一下main分支,这个APIrefactor

@mumiao
Copy link
Collaborator

mumiao commented Aug 4, 2021

conflicts @ProfBramble

@mumiao
Copy link
Collaborator

mumiao commented Aug 4, 2021

rebase一下 抵消一些变更 ,还是conflicts

@ProfBramble ProfBramble force-pushed the feat/menuBar branch 2 times, most recently from 6b63d27 to 1e12932 Compare August 5, 2021 09:12
Copy link
Collaborator

@wewoor wewoor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@wewoor wewoor requested a review from mumiao August 5, 2021 11:18
Copy link
Collaborator

@mumiao mumiao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@mumiao mumiao merged commit 3370b0f into main Aug 5, 2021
@mumiao mumiao deleted the feat/menuBar branch August 5, 2021 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MenuBar Improvement
3 participants