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: folderTree support to loadData #367

Merged
merged 2 commits into from
Aug 26, 2021
Merged

feat: folderTree support to loadData #367

merged 2 commits into from
Aug 26, 2021

Conversation

mortalYoung
Copy link
Collaborator

简介

  • folderTree 支持通过 onLoadData 实现异步加载数据

主要变更

  • 新增 onLoadData 事件,透传给 tree 组件

@codecov
Copy link

codecov bot commented Aug 26, 2021

Codecov Report

Merging #367 (c14634b) into main (91c7b3c) will increase coverage by 0.42%.
The diff coverage is 40.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #367      +/-   ##
==========================================
+ Coverage   59.48%   59.90%   +0.42%     
==========================================
  Files         173      173              
  Lines        4650     4664      +14     
  Branches     1021     1021              
==========================================
+ Hits         2766     2794      +28     
+ Misses       1864     1850      -14     
  Partials       20       20              
Impacted Files Coverage Δ
src/components/tree/index.tsx 87.80% <ø> (ø)
src/model/workbench/explorer/folderTree.tsx 47.36% <ø> (ø)
src/workbench/sidebar/explore/folderTree.tsx 10.84% <ø> (ø)
...c/services/workbench/explorer/folderTreeService.ts 15.45% <33.33%> (+0.50%) ⬆️
src/controller/explorer/folderTree.tsx 20.58% <50.00%> (+0.89%) ⬆️
src/model/settings.ts 100.00% <0.00%> (ø)
src/i18n/localization.ts 100.00% <0.00%> (ø)
src/workbench/editor/group.tsx 0.00% <0.00%> (ø)
src/workbench/editor/editor.tsx 31.81% <0.00%> (ø)
src/services/theme/colorThemeService.ts 100.00% <0.00%> (ø)
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 91c7b3c...c14634b. Read the comment docs.

@mortalYoung
Copy link
Collaborator Author

folderTreeService 的测试用例还没补全,可以先 merge cc @wewoor

@wewoor wewoor added the enhancement New feature or request label Aug 26, 2021
@wewoor wewoor added this to the 0.9.0-alpha.5 milestone Aug 26, 2021
import { FileTypes } from 'mo/model';
import type { LoadEventDaata } from 'mo/controller';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
import type { LoadEventDaata } from 'mo/controller';
import type { LoadEventData } from 'mo/controller';

@@ -16,6 +16,11 @@ import {
FileType,
} from 'mo/model';
import { FolderTreeService, IFolderTreeService } from 'mo/services';
import type { EventDataNode } from 'rc-tree/lib/interface';

export interface LoadEventDaata extends EventDataNode {
Copy link
Collaborator

Choose a reason for hiding this comment

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

同上

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.

LGTM

@wewoor wewoor merged commit a9c6ded into main Aug 26, 2021
@wewoor wewoor deleted the feat/tree branch August 26, 2021 05:33
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.

2 participants