Skip to content

feat(Splitter): Support onDraggerDoubleClick#56579

Merged
zombieJ merged 12 commits intoant-design:featurefrom
ug-hero:feat/splitter-onDraggerDoubleClick
Jan 22, 2026
Merged

feat(Splitter): Support onDraggerDoubleClick#56579
zombieJ merged 12 commits intoant-design:featurefrom
ug-hero:feat/splitter-onDraggerDoubleClick

Conversation

@ug-hero
Copy link
Contributor

@ug-hero ug-hero commented Jan 12, 2026

中文版模板 / Chinese template

🤔 This is a ...

  • 🆕 New feature

🔗 Related Issues

💡 Background and Solution

看了一下,vscode也有双击重置默认大小的功能,所以加了一下

📝 Change Log

Language Changelog
🇺🇸 English Support onDraggerDoubleClick
🇨🇳 Chinese 支持 onDraggerDoubleClick

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 12, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 12, 2026

👁 Visual Regression Report for PR #56579 Failed ❌

🎯 Target branch: feature (5b9b6f8)
📖 View Full Report ↗︎
📖 Alternative Report ↗︎
📊 Summary: 🔄 2 changed, 🆕 3 added

Expected (Branch feature) Actual (Current PR) Diff
table-sticky.dark.png table-sticky.dark.png table-sticky.dark.png table-sticky.dark.png
table-sticky.default.png table-sticky.default.png table-sticky.default.png table-sticky.default.png
splitter-reset.compact.png splitter-reset.compact.png 🆕🆕🆕 Added 🆕🆕🆕
splitter-reset.dark.png splitter-reset.dark.png 🆕🆕🆕 Added 🆕🆕🆕
splitter-reset.default.png splitter-reset.default.png 🆕🆕🆕 Added 🆕🆕🆕

Important

There are 5 diffs found in this PR: 🔄 2 changed, 🆕 3 added.
Please check all items:

  • Visual diff is acceptable

@github-actions
Copy link
Contributor

github-actions bot commented Jan 12, 2026

Preview is ready

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @ug-hero, 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 introduces a new feature to the Splitter component that enables users to trigger a callback function when the dragger between panels is double-clicked. This enhancement provides more flexibility and control over the component's behavior, allowing for custom actions to be performed upon double-clicking the dragger. The implementation includes modifications to the SplitBar component to handle the double-click detection and trigger the callback. Additionally, new test cases have been added to ensure the functionality works as expected, and the documentation has been updated to reflect the new prop.

Highlights

  • New Feature: Introduces the onDraggerDoubleClick prop to the Splitter component, allowing users to trigger a callback when the dragger between panels is double-clicked.
  • SplitBar Component: Modifies the SplitBar component to include the onDraggerDoubleClick prop and logic to detect double clicks within a 300ms threshold.
  • Test Cases: Adds new test cases to verify the functionality of onDraggerDoubleClick, including scenarios with multiple splitters and nested splitters.
  • Documentation: Updates the English and Chinese documentation files to include the new onDraggerDoubleClick prop.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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.

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 introduces a new onDraggerDoubleClick feature to the Splitter component, which is a valuable addition. The implementation for mouse double-clicks is straightforward and includes comprehensive tests. My main feedback is that the feature should also support touch devices via a double-tap gesture for a consistent user experience. Currently, the logic is only implemented for onMouseDown. I recommend adding similar logic to the onTouchStart handler. Additionally, I've left a minor comment about improving code clarity by replacing a magic number with a named constant.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 12, 2026

@codecov
Copy link

codecov bot commented Jan 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (caccb11) to head (3eb3e39).
⚠️ Report is 93 commits behind head on feature.

Additional details and impacted files
@@            Coverage Diff            @@
##           feature    #56579   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          807       807           
  Lines        14884     14934   +50     
  Branches      3934      3937    +3     
=========================================
+ Hits         14884     14934   +50     

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

@codecov
Copy link

codecov bot commented Jan 12, 2026

Bundle Report

Changes will decrease total bundle size by 8.13MB (-67.83%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
antd.min-array-push 3.86MB -8.13MB (-67.83%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: antd.min-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
antd-with-locales.min.js (New) 2.12MB 2.12MB 100.0% 🚀
antd.min.js (New) 1.74MB 1.74MB 100.0% 🚀
antd-with-locales.js (Deleted) -6.3MB 0 bytes -100.0% 🗑️
antd.js (Deleted) -5.69MB 0 bytes -100.0% 🗑️

zombieJ
zombieJ previously approved these changes Jan 12, 2026
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 12, 2026
@ug-hero
Copy link
Contributor Author

ug-hero commented Jan 13, 2026

又改了一下,直接用onDoubleClick会被拖拽打断,加了一个双击时打断拖拽的判断,onDoubleClick会被响应了,两位大佬看看 @zombieJ @afc163

thinkasany and others added 3 commits January 13, 2026 21:01
Co-authored-by: lijianan <574980606@qq.com>
Signed-off-by: thinkasany <480968828@qq.com>
Co-authored-by: lijianan <574980606@qq.com>
Signed-off-by: thinkasany <480968828@qq.com>
ug-hero and others added 3 commits January 14, 2026 09:33
Co-authored-by: thinkasany <480968828@qq.com>
Signed-off-by: ug <62086147+ug-hero@users.noreply.github.com>
Co-authored-by: thinkasany <480968828@qq.com>
Signed-off-by: ug <62086147+ug-hero@users.noreply.github.com>
@zombieJ zombieJ merged commit 6a74e0b into ant-design:feature Jan 22, 2026
38 checks passed
thinkasany added a commit to QdabuliuQ/ant-design that referenced this pull request Jan 27, 2026
* feat(Splitter): Support onDraggerDoubleClick

* update

* update

* update

* update

* Update components/splitter/index.en-US.md

Co-authored-by: lijianan <574980606@qq.com>
Signed-off-by: thinkasany <480968828@qq.com>

* Update components/splitter/index.zh-CN.md

Co-authored-by: lijianan <574980606@qq.com>
Signed-off-by: thinkasany <480968828@qq.com>

* Update components/splitter/index.en-US.md

Co-authored-by: thinkasany <480968828@qq.com>
Signed-off-by: ug <62086147+ug-hero@users.noreply.github.com>

* Update components/splitter/index.zh-CN.md

Co-authored-by: thinkasany <480968828@qq.com>
Signed-off-by: ug <62086147+ug-hero@users.noreply.github.com>

---------

Signed-off-by: thinkasany <480968828@qq.com>
Signed-off-by: ug <62086147+ug-hero@users.noreply.github.com>
Co-authored-by: liuqiang <qiang.liu@xinjifamily.com>
Co-authored-by: thinkasany <480968828@qq.com>
Co-authored-by: lijianan <574980606@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants