10000 feat: develop scrollBar to replace scrollable component by mortalYoung · Pull Request #826 · DTStack/molecule · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: develop scrollBar to replace scrollable component #826

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

Merged
merged 10 commits into from
Dec 14, 2022
Merged

Conversation

mortalYoung
Copy link
Collaborator
@mortalYoung mortalYoung commented Nov 14, 2022

简介

  • 新增 scrollBar 组件替代 scrollable 组件

主要变更

从 diff 可以看出来,在大部分场景下直接替换组件即可。需要额外说明的场景有如下

  • 在 activityBar 中,由于是 flex 布局,flex:1 导致无法获取其准确高度,所以需要做出一些修改
  • 同理,在 folderTree 中也是由于 collapse 是 flex 布局,所以也需要做出修改
  • 水平模式下,需要修改节点,故移除 editor/groups 以及 panel 的 scrollable 组件,在 tabs 组件的 title 中添加 scrollBar 组件,同时修复 panel 的 title 没有 scrollIntoView 的特性

遗留问题

  • 文档更新
  • 测试用例

@mortalYoung mortalYoung self-assigned this Nov 14, 2022
@codecov
Copy link
codecov bot commented Nov 14, 2022

Codecov Report

Base: 91.25% // Head: 91.04% // Decreases project coverage by -0.20% ⚠️

Coverage data is based on head (ad26def) compared to base (cfd7c7c).
Patch coverage: 87.90% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #826      +/-   ##
==========================================
- Coverage   91.25%   91.04%   -0.21%     
==========================================
  Files         187      188       +1     
  Lines        5900     6067     +167     
  Branches     1430     1474      +44     
==========================================
+ Hits         5384     5524     +140     
- Misses        510      537      +27     
  Partials        6        6              
Impacted Files Coverage Δ
src/workbench/activityBar/activityBar.tsx 97.56% <ø> (ø)
src/workbench/panel/panel.tsx 100.00% <ø> (ø)
src/workbench/problems/paneView/index.tsx 100.00% <ø> (ø)
src/workbench/sidebar/explore/folderTree.tsx 97.70% <ø> (ø)
src/components/tabs/index.tsx 91.42% <80.00%> (-8.58%) ⬇️
src/components/scrollBar/index.tsx 87.36% <87.36%> (ø)
src/components/scrollBar/base.ts 100.00% <100.00%> (ø)
src/workbench/editor/group.tsx 96.29% <100.00%> (-1.01%) ⬇️
src/workbench/sidebar/explore/editorTree.tsx 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@mortalYoung mortalYoung requested a review from wewoor November 15, 2022 08:49
@wewoor
Copy link
Collaborator
wewoor commented Nov 17, 2022

image

现在点击分栏,会出现 CPU 飙升,页面卡死的现象

image

@mortalYoung
Copy link
Collaborator Author

image

现在点击分栏,会出现 CPU 飙升,页面卡死的现象

image

我这边没有复现出来,你可以 100% 复现吗

@wewoor
Copy link
Collaborator
wewoor commented Nov 21, 2022

今天又试了下,不是一个必现的Bug

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 merged commit a276038 into main Dec 14, 2022
@wewoor wewoor deleted the feat/scrollBar branch December 14, 2022 09:07
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
0