Skip to content

fix: optimize the shadow effect of Scrollable#443

Merged
wewoor merged 3 commits intomainfrom
fix/scrollable
Sep 23, 2021
Merged

fix: optimize the shadow effect of Scrollable#443
wewoor merged 3 commits intomainfrom
fix/scrollable

Conversation

@mortalYoung
Copy link
Copy Markdown
Collaborator

简介

  • 修复滚动组件的阴影渲染时机不对的问题

主要变更

  • 在 scrollStart 取应该是不合理的,只能拿到每次滚动开始才会渲染阴影,而实际上应该在滚动的时候实时去判断是否渲染

@mortalYoung mortalYoung self-assigned this Sep 23, 2021
@mortalYoung mortalYoung added the bug Something isn't working label Sep 23, 2021
@mortalYoung mortalYoung added this to the 0.9.0-beta.1 milestone Sep 23, 2021
@mortalYoung mortalYoung requested a review from wewoor September 23, 2021 02:33
@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 23, 2021

Codecov Report

Merging #443 (052decb) into main (50e0de2) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #443   +/-   ##
=======================================
  Coverage   80.76%   80.76%           
=======================================
  Files         177      177           
  Lines        4908     4908           
  Branches     1062     1062           
=======================================
  Hits         3964     3964           
  Misses        935      935           
  Partials        9        9           
Impacted Files Coverage Δ
src/components/scrollable/index.tsx 100.00% <100.00%> (ø)

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 50e0de2...052decb. Read the comment docs.

@mortalYoung
Copy link
Copy Markdown
Collaborator Author

这个组件的 onScroll 这个函数测试不到 0.0 有啥办法吗 @wewoor

@wewoor
Copy link
Copy Markdown
Collaborator

wewoor commented Sep 23, 2021

这个组件的 onScroll 这个函数测试不到 0.0 有啥办法吗 @wewoor

可以使用

/* istanbul ignore next */

注释忽略

Copy link
Copy Markdown
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.

�暂时无法 mock 的测试,先忽略掉

@wewoor wewoor changed the title fix: fix the shadow of scrollable fix: optimize the shadow effect of Scrollable Sep 23, 2021
@mortalYoung mortalYoung requested a review from wewoor September 23, 2021 07:04
Copy link
Copy Markdown
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 76ad9b3 into main Sep 23, 2021
@wewoor wewoor deleted the fix/scrollable branch September 23, 2021 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants