Skip to content

feat: develop explorer panels#174

Merged
wewoor merged 8 commits intomainfrom
feat/explorer
Jun 16, 2021
Merged

feat: develop explorer panels#174
wewoor merged 8 commits intomainfrom
feat/explorer

Conversation

@mortalYoung
Copy link
Copy Markdown
Collaborator

@mortalYoung mortalYoung commented Jun 9, 2021

简介

  • 主要针对 explorer 的功能进行开发和重构

主要变更

  • 依赖组件 collapse 的重构
  • tree 组件的 onSelect 事件重构,之前仅叶子结点触发 onSelect 事件,但是在做 Add New File 的功能的时候,发现如果仅叶子结点触发的话,无法获取到准确的 current 结点,所以改成所有结点都触发
  • 新增 tree 结点的 focus 样式
  • 优化 folder tree 的 input 样式的优化
  • move 部分 folder tree 到 extensions 里面去
  • 改造优化 explorer
    • 主要思路是把 headerActionBar 的内容与 panel 进行强绑定,提供 addPanel removePanel 等方法可以在修改 panel 的同时,对 actionBar 的内容同时修改,而用户就不需要对 panel 执行一次 add 方法,再对 actionBar 执行 add 方法,省去部分心智负担
    • 优化 removePanel 的逻辑,之前删除 panel 的逻辑是直接删除,不太合理,改成逻辑删除,通过 hidden 关键字控制隐藏和展示 panel
    • panel 支持 sortIndex 字段,用于控制 panel 的顺序

遗留问题

@mortalYoung mortalYoung changed the title feat: develop explorer panels 【WIP】feat: develop explorer panels Jun 10, 2021
Comment thread src/components/collapse/index.tsx Outdated
Comment thread src/components/tree/index.tsx Outdated
Comment thread src/controller/explorer/explorer.tsx Outdated
Comment thread src/services/workbench/explorer/folderTreeService.ts Outdated
Comment thread src/services/workbench/explorer/folderTreeService.ts Outdated
Comment thread src/services/workbench/explorer/folderTreeService.ts Outdated
Comment thread src/controller/explorer/explorer.tsx Outdated
Comment thread src/controller/explorer/explorer.tsx Outdated
@mumiao
Copy link
Copy Markdown
Collaborator

mumiao commented Jun 10, 2021

ci broken @mortalYoung

@mortalYoung mortalYoung changed the title 【WIP】feat: develop explorer panels feat: develop explorer panels Jun 11, 2021
Comment thread src/model/workbench/explorer/explorer.tsx Outdated
Comment thread src/extensions/explorer/index.ts
@mumiao mumiao added the enhancement New feature or request label Jun 11, 2021
@mumiao mumiao added this to the 0.9.0-alpha.3 milestone Jun 11, 2021
@mumiao mumiao self-requested a review June 15, 2021 02:16
@mumiao mumiao requested a review from wewoor June 15, 2021 02:18
@mumiao
Copy link
Copy Markdown
Collaborator

mumiao commented Jun 15, 2021

@wewoor reviewed

Comment thread src/components/collapse/index.tsx Outdated
Comment thread src/components/collapse/index.tsx Outdated
Comment thread src/components/collapse/style.scss Outdated
@mumiao
Copy link
Copy Markdown
Collaborator

mumiao commented Jun 16, 2021

rebase 一下main branch

@wewoor wewoor merged commit 921ecc5 into main Jun 16, 2021
@wewoor wewoor deleted the feat/explorer branch June 16, 2021 08:44
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.

3 participants