Skip to content

Conversation

@Alexzjt
Copy link
Contributor

@Alexzjt Alexzjt commented Jan 5, 2026

👀 PR includes

✨ Feature

  • New feature

🎨 Enhance

  • Code style optimization
  • Refactoring
  • Change the UI
  • Improve the performance
  • Type optimization

🐛 Bugfix

🔧 Chore

  • Test case
  • Docs / demos update
  • CI / workflow
  • Release version
  • Other ()

📝 Description

🖼️ Screenshot

Before After
Screenrecorder-2026-01-05-17-49-57-233.mp4
Screenrecorder-2026-01-05-17-46-02-933.mp4

🔗 Related issue link

🔍 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.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

你好 @Alexzjt,非常感谢你的贡献.
为了让代码更健壮, 请根据 贡献指南 补充相应单元测试 (文档改动或其他特殊场景除外), 如果有 API 改动, 请修改 相应的文档.
同时请检查 linttest 相关 CI 是否通过, 如果失败, 请点击 [Details] 按钮查看, 并根据日志修复.

Hello, @Alexzjt, Thanks for your contribution. In order to make the code more robust, please add the corresponding unit tests, and update the docs if there are API changes.
At the same time, please check whether the CI related to lint and test passes. If the CI fails, please click [Details] button to check and repair according to the log.

@github-actions github-actions bot added the next 2.0-next 版本的问题 label Jan 5, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Alexzjt, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a specific bug where the browser's default scrolling behavior interfered with custom panning functionality, particularly in mobile contexts. By explicitly preventing the default action of wheel events when panning is active, the change ensures a smoother and more controlled user experience, aligning with the intended custom interaction.

Highlights

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@Alexzjt Alexzjt changed the title Fix/panning scroll fix: 移动端交叉表滚动时,手指不松开持续滚动几秒后,表格滚动会带动整个网页一起滚动 Jan 5, 2026
@github-actions github-actions bot added the pr(fix) bug fix label Jan 5, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request addresses an issue where panning on a mobile device was also causing the browser page to scroll. The fix correctly introduces a call to preventDefault() on the native pointer move event during a panning gesture. This prevents the browser's default scroll behavior. The overall approach is sound. I have one minor suggestion to improve the code's clarity and correctness by removing an unnecessary optional chaining operator.

@codecov-commenter
Copy link

codecov-commenter commented Jan 5, 2026

Codecov Report

❌ Patch coverage is 82.35294% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.08%. Comparing base (ecdc9c8) to head (c615067).
⚠️ Report is 748 commits behind head on next.

Files with missing lines Patch % Lines
packages/s2-core/src/facet/base-facet.ts 82.35% 1 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             next    #3280      +/-   ##
==========================================
+ Coverage   75.77%   79.08%   +3.31%     
==========================================
  Files         257      222      -35     
  Lines       11994    12196     +202     
  Branches     2464     2741     +277     
==========================================
+ Hits         9088     9645     +557     
+ Misses       1398      892     -506     
- Partials     1508     1659     +151     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

Size Change: +163 B (+0.02%)

Total Size: 720 kB

Filename Size Change
./packages/s2-core/dist/s2.min.js 306 kB +163 B (+0.05%)
ℹ️ View Unchanged
Filename Size
./packages/s2-core/dist/s2-extends.min.js 207 kB
./packages/s2-core/dist/s2.min.css 581 B
./packages/s2-react-components/dist/s2-react-components.min.css 2.55 kB
./packages/s2-react-components/dist/s2-react-components.min.js 124 kB
./packages/s2-react/dist/s2-react.min.css 1.3 kB
./packages/s2-react/dist/s2-react.min.js 38.5 kB
./packages/s2-vue/dist/s2-vue.min.css 1.59 kB
./packages/s2-vue/dist/s2-vue.min.js 38.3 kB

compressed-size-action

@Alexzjt Alexzjt force-pushed the fix/panningScroll branch from 56d179e to 75d2005 Compare January 6, 2026 11:26
@Alexzjt
Copy link
Contributor Author

Alexzjt commented Jan 6, 2026

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

本次 PR 旨在解决移动端滚动穿透的问题。通过引入 shouldPreventDefault 回调函数来控制 event.preventDefault() 的调用时机,模拟了 CSS overscroll-behavior 的行为,这是一个合理的解决方案。实现上将 preventDefault 的调用提前,以兼容移动端浏览器普遍使用的 passive event listener,这也是正确的处理方式。此外,修改还包括在事件链中传递原生事件对象,以便进行更底层的控制。总体而言,这是一个高质量的修复。我提出了一些关于代码清晰度和类型安全性的次要建议,以供参考。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

next 2.0-next 版本的问题 pr(fix) bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛移动端交叉表与明细表滚动问题

3 participants