Skip to content

Conversation

@Alexzjt
Copy link
Contributor

@Alexzjt Alexzjt commented Jan 23, 2026

👀 PR includes

✨ Feature

  • New feature 树状平铺grid-tree模式,可以在Grid模式下展开/折叠

🎨 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
iShot_2026-01-23_17 25 32

🔗 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

你好 @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 next 2.0-next 版本的问题 pr(feature) new feature labels Jan 23, 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 introduces a new grid-tree mode to the S2 Pivot Sheet, enhancing the way row headers are displayed. This new mode combines the best of both grid and tree layouts, providing a structured, easy-to-navigate table with the ability to expand and collapse nodes. The changes include modifications to core components, data aggregation logic, and documentation to support and showcase the new feature.

Highlights

  • New Feature: Grid Tree Mode: Introduces a new grid-tree hierarchy type for the S2 Pivot Sheet, combining the grid layout with the expand/collapse functionality of tree structures.
  • Row Cell Enhancements: Modifies the RowCell component to support the grid-tree mode, including adjustments to bounding box calculations, tree icon display, and content indentation.
  • Data Aggregation Logic: Updates the PivotDataSet to use subtotal aggregation logic for collapsed nodes in grid-tree mode, ensuring correct data summarization.
  • Documentation and Examples: Adds documentation for the new grid-tree mode and includes a new example to showcase its usage.
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

此拉取请求引入了新的“树状平铺(grid-tree)”模式,它结合了平铺布局和展开/折叠功能。更改包括更新类型定义、在 RowCell 中实现新的渲染逻辑以处理折叠节点、在 PivotDataSet 中处理数据聚合,以及添加新的层级构建器。文档和示例也已相应更新。总体而言,这是一项功能完善且经过深思熟虑的实现。

@codecov-commenter
Copy link

codecov-commenter commented Jan 23, 2026

Codecov Report

❌ Patch coverage is 69.69697% with 50 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.81%. Comparing base (ecdc9c8) to head (741aba0).
⚠️ Report is 771 commits behind head on next.

Files with missing lines Patch % Lines
...core/src/facet/layout/build-grid-tree-hierarchy.ts 74.38% 16 Missing and 15 partials ⚠️
packages/s2-core/src/cell/row-cell.ts 33.33% 6 Missing and 8 partials ⚠️
...s2-core/src/facet/layout/build-header-hierarchy.ts 75.00% 0 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             next    #3299      +/-   ##
==========================================
+ Coverage   75.77%   78.81%   +3.04%     
==========================================
  Files         257      224      -33     
  Lines       11994    12420     +426     
  Branches     2464     2801     +337     
==========================================
+ Hits         9088     9789     +701     
+ Misses       1398      946     -452     
- Partials     1508     1685     +177     

☔ 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 23, 2026

Size Change: +1.6 kB (+0.22%)

Total Size: 727 kB

Filename Size Change
./packages/s2-core/dist/s2-extends.min.js 207 kB +148 B (+0.07%)
./packages/s2-core/dist/s2.min.css 581 B -2 B (-0.34%)
./packages/s2-core/dist/s2.min.js 308 kB +1.45 kB (+0.47%)
ℹ️ View Unchanged
Filename Size
./packages/s2-react-components/dist/s2-react-components.min.css 2.55 kB
./packages/s2-react-components/dist/s2-react-components.min.js 123 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 2 kB
./packages/s2-vue/dist/s2-vue.min.js 43.6 kB

compressed-size-action

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

Labels

next 2.0-next 版本的问题 pr(feature) new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🙏透视表平铺模式支持展开收合

3 participants