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: develop open editors window #183

Merged
merged 3 commits into from
Jun 21, 2021
Merged

feat: develop open editors window #183

merged 3 commits into from
Jun 21, 2021

Conversation

mortalYoung
Copy link
Collaborator

@mortalYoung mortalYoung commented Jun 17, 2021

简介

  • 开发 Open Editors 窗口内容
    • 支持展示在 editor 中打开的文件
    • 支持关闭 editor 中的文件
    • 支持分组展示打开的文件
    • 支持右键菜单事件

主要变更

  • 新增 EditorTree UI 渲染组件,负责对数据进行渲染
  • 新增 UI 渲染组件对应的样式、prefixtheme 以及 className 的定义
  • 新增 EditorTreeController,负责响应 UI 的事件。
    • 同时移除 ExplorerController 中 AddPanel 的逻辑,把这部分逻辑移到 EditorController 中,在初始化的时候进行 initView
    • EditorTree 组件与 EditorService 联动起来,确保当 Editor 中的数据发生变更的时候,EditorTree 也可以做到更新
    • EditorTree 不考虑自己维护一份数据。
  • 新增 EditorTreeService,负责提供外部接口以及订阅 UI 事件
  • 新增 EditorModel,因为 EditorTree 不考虑自己去维护一份数据,所以没用到。但是考虑到大部分 module 的 Events 都是放在 model 层的,所以这里还是新增了一下,主要是为了声明 EditorTreeEvent
  • 新增 onClose 等事件以及相应的 emit 和 subscribe 方法
  • 其余新增的为必要的 export import 的声明

遗留问题

  • contextMenus
  • Group Title Menus
  • 发现 editor 没有实现 closeSaved

@wewoor wewoor self-requested a review June 17, 2021 11:34
@wewoor wewoor added the feature label Jun 17, 2021
@wewoor wewoor added this to the 0.9.0-alpha.3 milestone Jun 17, 2021
@mortalYoung mortalYoung changed the title feat: develop open editors window [WIP]feat: develop open editors window Jun 18, 2021
@mortalYoung mortalYoung changed the title [WIP]feat: develop open editors window feat: develop open editors window Jun 18, 2021
@wewoor wewoor merged commit 098c78c into main Jun 21, 2021
@wewoor wewoor deleted the feat/editor-tree branch June 21, 2021 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants