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

fix(scroll): 修复移动端滚动至边缘时抖动 #2556

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

lijinke666
Copy link
Member

@lijinke666 lijinke666 commented Feb 22, 2024

👀 PR includes

🐛 Bugfix

  • Solve the issue and close #0

📝 Description

在移动端表格滚动至边缘时, @antv/[email protected] 有 bug, 向上滚动至边缘时, deltaY 有时会为负数, 导致向下滚动时然后回弹, 看起来就像表格在抖动, 需要判断滚动方向, 修正一下 deltaY

这个PR #2302 只处理了报错, 没有修复抖动问题.

🖼️ Screenshot

Before After
Kapture 2024-02-22 at 14 31 59 Kapture 2024-02-22 at 14 30 35

🔗 Related issue link

ref #2266

🔍 Self-Check before the merge

  • Add or update relevant docs.
  • Add or update relevant demos.
  • Add or update test case.
  • Add or update relevant TypeScript definitions.

Copy link

vercel bot commented Feb 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
antvis-s2 ❌ Failed (Inspect) Feb 22, 2024 6:42am

Copy link
Contributor

Size Change: +648 B (0%)

Total Size: 7.94 MB

Filename Size Change
./packages/s2-core/dist/index.min.js 181 kB +162 B (0%)
./packages/s2-react/node_modules/@antv/s2/dist/index.min.js 181 kB +162 B (0%)
./packages/s2-shared/node_modules/@antv/s2/dist/index.min.js 181 kB +162 B (0%)
./packages/s2-vue/node_modules/@antv/s2/dist/index.min.js 181 kB +162 B (0%)
ℹ️ View Unchanged
Filename Size
./packages/s2-core/dist/style.min.css 389 B
./packages/s2-core/node_modules/@antv/g-canvas/dist/g.min.js 61.4 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/@testing-library/dom.cjs.js 22.1 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js 21.5 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/@testing-library/dom.umd.js 86.6 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/@testing-library/dom.umd.min.js 48.6 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/config.js 1.15 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/DOMElementFilter.js 1.85 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/event-map.js 1.19 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/events.js 1.54 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/get-node-text.js 298 B
./packages/s2-core/node_modules/@testing-library/dom/dist/get-queries-for-element.js 737 B
./packages/s2-core/node_modules/@testing-library/dom/dist/get-user-code-frame.js 805 B
./packages/s2-core/node_modules/@testing-library/dom/dist/helpers.js 1.09 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/index.js 1.14 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/label-helpers.js 1.05 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/matches.js 1.14 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/pretty-dom.js 1.72 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/queries/all-utils.js 337 B
./packages/s2-core/node_modules/@testing-library/dom/dist/queries/alt-text.js 571 B
./packages/s2-core/node_modules/@testing-library/dom/dist/queries/display-value.js 711 B
./packages/s2-core/node_modules/@testing-library/dom/dist/queries/index.js 418 B
./packages/s2-core/node_modules/@testing-library/dom/dist/queries/label-text.js 1.79 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/queries/placeholder-text.js 490 B
./packages/s2-core/node_modules/@testing-library/dom/dist/queries/role.js 2.66 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/queries/test-id.js 497 B
./packages/s2-core/node_modules/@testing-library/dom/dist/queries/text.js 1.02 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/queries/title.js 716 B
./packages/s2-core/node_modules/@testing-library/dom/dist/query-helpers.js 1.8 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/role-helpers.js 2.83 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/screen.js 1.64 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/suggestions.js 1.5 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/wait-for-element-to-be-removed.js 738 B
./packages/s2-core/node_modules/@testing-library/dom/dist/wait-for.js 2.36 kB
./packages/s2-core/node_modules/d3-dsv/dist/d3-dsv.js 2.3 kB
./packages/s2-core/node_modules/d3-dsv/dist/d3-dsv.min.js 1.52 kB
./packages/s2-core/node_modules/d3-interpolate/dist/d3-interpolate.js 4.53 kB
./packages/s2-core/node_modules/d3-interpolate/dist/d3-interpolate.min.js 3.19 kB
./packages/s2-core/node_modules/d3-timer/dist/d3-timer.js 1.45 kB
./packages/s2-core/node_modules/d3-timer/dist/d3-timer.min.js 919 B
./packages/s2-core/node_modules/tinycolor2/dist/tinycolor-min.js 5.45 kB
./packages/s2-react/dist/index.min.js 67.7 kB
./packages/s2-react/dist/style.min.css 3.43 kB
./packages/s2-react/node_modules/@ant-design/icons/dist/index.umd.js 201 kB
./packages/s2-react/node_modules/@ant-design/icons/dist/index.umd.min.js 170 kB
./packages/s2-react/node_modules/@antv/g-canvas/dist/g.min.js 61.4 kB
./packages/s2-react/node_modules/@antv/s2/dist/style.min.css 389 B
./packages/s2-react/node_modules/@testing-library/react/dist/@testing-library/react.cjs.js 4.28 kB
./packages/s2-react/node_modules/@testing-library/react/dist/@testing-library/react.esm.js 3.9 kB
./packages/s2-react/node_modules/@testing-library/react/dist/@testing-library/react.pure.cjs.js 3.98 kB
./packages/s2-react/node_modules/@testing-library/react/dist/@testing-library/react.pure.esm.js 3.59 kB
./packages/s2-react/node_modules/@testing-library/react/dist/@testing-library/react.pure.umd.js 74.6 kB
./packages/s2-react/node_modules/@testing-library/react/dist/@testing-library/react.pure.umd.min.js 39 kB
./packages/s2-react/node_modules/@testing-library/react/dist/@testing-library/react.umd.js 74.9 kB
./packages/s2-react/node_modules/@testing-library/react/dist/@testing-library/react.umd.min.js 39.1 kB
./packages/s2-react/node_modules/@testing-library/react/dist/act-compat.js 1.86 kB
./packages/s2-react/node_modules/@testing-library/react/dist/fire-event.js 853 B
./packages/s2-react/node_modules/@testing-library/react/dist/index.js 634 B
./packages/s2-react/node_modules/@testing-library/react/dist/pure.js 2.06 kB
./packages/s2-react/node_modules/ahooks/dist/ahooks.js 32.1 kB
./packages/s2-react/node_modules/antd/dist/antd-with-locales.js 765 kB
./packages/s2-react/node_modules/antd/dist/antd-with-locales.min.js 347 kB
./packages/s2-react/node_modules/antd/dist/antd.compact.css 72.3 kB
./packages/s2-react/node_modules/antd/dist/antd.compact.min.css 67.8 kB
./packages/s2-react/node_modules/antd/dist/antd.css 72.3 kB
./packages/s2-react/node_modules/antd/dist/antd.dark.css 73.6 kB
./packages/s2-react/node_modules/antd/dist/antd.dark.min.css 69.1 kB
./packages/s2-react/node_modules/antd/dist/antd.js 691 kB
./packages/s2-react/node_modules/antd/dist/antd.min.css 67.8 kB
./packages/s2-react/node_modules/antd/dist/antd.min.js 292 kB
./packages/s2-react/node_modules/antd/dist/antd.variable.css 77.2 kB
./packages/s2-react/node_modules/antd/dist/antd.variable.min.css 68.4 kB
./packages/s2-react/node_modules/antd/dist/compact-theme.js 120 B
./packages/s2-react/node_modules/antd/dist/dark-theme.js 118 B
./packages/s2-react/node_modules/antd/dist/default-theme.js 7.72 kB
./packages/s2-react/node_modules/antd/dist/theme.js 4.29 kB
./packages/s2-react/node_modules/antd/dist/variable-theme.js 122 B
./packages/s2-react/node_modules/d3-dsv/dist/d3-dsv.js 2.3 kB
./packages/s2-react/node_modules/d3-dsv/dist/d3-dsv.min.js 1.52 kB
./packages/s2-react/node_modules/react-beautiful-dnd/dist/react-beautiful-dnd.cjs.js 45.8 kB
./packages/s2-react/node_modules/react-beautiful-dnd/dist/react-beautiful-dnd.esm.js 45.6 kB
./packages/s2-react/node_modules/react-beautiful-dnd/dist/react-beautiful-dnd.js 73.6 kB
./packages/s2-react/node_modules/react-beautiful-dnd/dist/react-beautiful-dnd.min.js 31.4 kB
./packages/s2-react/node_modules/vite-plugin-svgr/dist/index.js 823 B
./packages/s2-shared/node_modules/@antv/s2/dist/style.min.css 389 B
./packages/s2-vue/dist/index.min.js 20.3 kB
./packages/s2-vue/dist/style.min.css 1.68 kB
./packages/s2-vue/node_modules/@antv/s2/dist/style.min.css 389 B
./packages/s2-vue/node_modules/@testing-library/vue/dist/fire-event.js 1.4 kB
./packages/s2-vue/node_modules/@testing-library/vue/dist/index.js 586 B
./packages/s2-vue/node_modules/@testing-library/vue/dist/render.js 1.57 kB
./packages/s2-vue/node_modules/@vue/shared/dist/shared.cjs.js 7.86 kB
./packages/s2-vue/node_modules/@vue/shared/dist/shared.cjs.prod.js 7.85 kB
./packages/s2-vue/node_modules/@vue/shared/dist/shared.esm-bundler.js 7.63 kB
./packages/s2-vue/node_modules/ant-design-vue/dist/antd-with-locales.js 742 kB
./packages/s2-vue/node_modules/ant-design-vue/dist/antd-with-locales.min.js 365 kB
./packages/s2-vue/node_modules/ant-design-vue/dist/antd.compact.css 72.9 kB
./packages/s2-vue/node_modules/ant-design-vue/dist/antd.compact.min.css 66 kB
./packages/s2-vue/node_modules/ant-design-vue/dist/antd.css 72.9 kB
./packages/s2-vue/node_modules/ant-design-vue/dist/antd.dark.css 74.2 kB
./packages/s2-vue/node_modules/ant-design-vue/dist/antd.dark.min.css 67.2 kB
./packages/s2-vue/node_modules/ant-design-vue/dist/antd.js 676 kB
./packages/s2-vue/node_modules/ant-design-vue/dist/antd.min.css 66 kB
./packages/s2-vue/node_modules/ant-design-vue/dist/antd.min.js 316 kB
./packages/s2-vue/node_modules/ant-design-vue/dist/antd.variable.css 78.5 kB
./packages/s2-vue/node_modules/ant-design-vue/dist/antd.variable.min.css 66.6 kB
./packages/s2-vue/node_modules/ant-design-vue/dist/compact-theme.js 120 B
./packages/s2-vue/node_modules/ant-design-vue/dist/dark-theme.js 118 B
./packages/s2-vue/node_modules/ant-design-vue/dist/default-theme.js 7.63 kB
./packages/s2-vue/node_modules/ant-design-vue/dist/theme.js 4.24 kB
./packages/s2-vue/node_modules/ant-design-vue/dist/variable-theme.js 122 B
./packages/s2-vue/node_modules/vue/dist/vue.cjs.js 1.01 kB
./packages/s2-vue/node_modules/vue/dist/vue.cjs.prod.js 817 B
./packages/s2-vue/node_modules/vue/dist/vue.esm-browser.js 106 kB
./packages/s2-vue/node_modules/vue/dist/vue.esm-browser.prod.js 51 kB
./packages/s2-vue/node_modules/vue/dist/vue.esm-bundler.js 915 B
./packages/s2-vue/node_modules/vue/dist/vue.global.js 106 kB
./packages/s2-vue/node_modules/vue/dist/vue.global.prod.js 49.9 kB
./packages/s2-vue/node_modules/vue/dist/vue.runtime.esm-browser.js 72.5 kB
./packages/s2-vue/node_modules/vue/dist/vue.runtime.esm-browser.prod.js 33.3 kB
./packages/s2-vue/node_modules/vue/dist/vue.runtime.esm-bundler.js 306 B
./packages/s2-vue/node_modules/vue/dist/vue.runtime.global.js 73.9 kB
./packages/s2-vue/node_modules/vue/dist/vue.runtime.global.prod.js 33.1 kB

compressed-size-action

Copy link

codecov bot commented Feb 22, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (1adc25d) 76.48% compared to head (dd5fbd0) 77.67%.
Report is 131 commits behind head on master.

Files Patch % Lines
packages/s2-core/src/facet/base-facet.ts 94.73% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2556      +/-   ##
==========================================
+ Coverage   76.48%   77.67%   +1.18%     
==========================================
  Files         240      249       +9     
  Lines       12312    12031     -281     
  Branches     2630     2381     -249     
==========================================
- Hits         9417     9345      -72     
+ Misses       1377     1189     -188     
+ Partials     1518     1497      -21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lijinke666 lijinke666 merged commit cfab9f4 into master Feb 22, 2024
14 of 15 checks passed
@lijinke666 lijinke666 deleted the fix-mobile-scroll-shake branch February 22, 2024 09:43
@lijinke666
Copy link
Member Author

🎉 This PR is included in version @antv/s2-v1.54.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

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