Skip to content

docs: sync interaction and spreadsheet API docs with source code - #3324

Merged
Alexzjt merged 3 commits into
nextfrom
docs-sync-interaction-options-2074946402769805559
Mar 3, 2026
Merged

Alexzjt merged 3 commits into
nextfrom
docs-sync-interaction-options-2074946402769805559

Conversation

@Alexzjt

@Alexzjt Alexzjt commented Mar 2, 2026 •

Copy link
Copy Markdown
Contributor

👀 PR includes

  • Type optimization

🔧 Chore

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

📝 Description

Synchronize the API documentation with the latest source code type definitions in packages/s2-core/src/common/interface:

  1. Updated interaction.en.md and interaction.zh.md to match the current ChangeCellOptions definition and add missing methods (e.g. scrollTo, scrollToCell, highlightCell, updateDataCellRelevantHeaderCells, etc) from the RootInteraction class to the English API doc table.
  2. Synced spreadsheet.en.md and spreadsheet.zh.md's ScrollOffsetConfig configuration missing properties like rowHeaderOffsetX and skipScrollEvent.
  3. Ensured symmetry between English and Chinese markdown files.

🖼️ Screenshot

Before After
❌ ✅

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

PR created automatically by Jules for task 2074946402769805559 started by @Alexzjt

Syncs interaction.en.md and interaction.zh.md API tables and interfaces to match the packages/s2-core/src/common/interface/interaction.ts source code, adding missing scrolling and highlight methods, and missing ScrollOffsetConfig properties in spreadsheet docs.

Co-authored-by: Alexzjt <9548248+Alexzjt@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@github-actions

github-actions Bot commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

你好 @Alexzjt,非常感谢你的贡献.
为了让代码更健壮, 请根据 贡献指南 补充相应单元测试 (文档改动或其他特殊场景除外), 如果有 API 改动, 请修改 相应的文档.
同时请检查 lint 和 test 相关 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 pr(documentation) documentation next 2.0-next 版本的问题 labels Mar 2, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 enhances the accuracy and completeness of the API documentation for the interaction and spreadsheet modules. It updates existing documentation to reflect the current type definitions and adds newly available methods and configuration options, ensuring that both English and Chinese documentation are synchronized with the codebase.

Highlights

  • Interaction API Documentation Update: Synchronized interaction.en.md and interaction.zh.md with the latest ChangeCellOptions definition and added several missing RootInteraction methods, including various scrolling and cell highlighting functionalities.
  • Spreadsheet API Documentation Update: Updated spreadsheet.en.md and spreadsheet.zh.md to include new ScrollOffsetConfig properties such as rowHeaderOffsetX and skipScrollEvent.
  • Documentation Symmetry: Ensured consistency and symmetry between the English and Chinese versions of the API documentation for both interaction and spreadsheet modules.
Changelog
  • s2-site/docs/api/basic-class/interaction.en.md
    • Updated the changeCell method signature and description to align with current functionality.
    • Added new methods for scrolling (scrollTo, scrollToNode, scrollToCell, scrollToCellById, scrollToTop, scrollToRight, scrollToBottom, scrollToLeft) and cell interaction (highlightCell, selectCell, updateDataCellRelevantHeaderCells, updateDataCellRelevantRowCells, updateDataCellRelevantColCells).
    • Introduced the CellScrollToOptions interface.
    • Modified ChangeCellOptions to extend CellScrollToOptions and include a stateName property.
  • s2-site/docs/api/basic-class/interaction.zh.md
    • Updated ChangeCellOptions to extend CellScrollToOptions.
    • Adjusted the type of stateName in ChangeCellOptions.
    • Removed the redundant ChangeCellOptions definition.
  • s2-site/docs/api/basic-class/spreadsheet.en.md
    • Added skipScrollEvent and rowHeaderOffsetX properties to the ScrollOffsetConfig interface.
  • s2-site/docs/api/basic-class/spreadsheet.zh.md
    • Added the skipScrollEvent property to the ScrollOffsetConfig interface.
Activity
  • PR was automatically created by Jules for task 2074946402769805559, initiated by @Alexzjt.
  • The author marked 'Docs / demos update' as completed.
  • The author confirmed that relevant docs were added or updated.
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. ↩

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

Copy link
Copy Markdown
Contributor

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 aims to synchronize the API documentation with the source code. While many updates are correct, I've found several discrepancies in the method signatures and interface definitions in both the English and Chinese interaction documentation files. Specifically, the signatures for changeCell, highlightCell, and selectCell are incorrect, and the ChangeCellOptions interface is missing some properties. These inconsistencies could confuse users of the library. The changes in the spreadsheet documentation seem correct. Please address the comments to ensure the API documentation is fully aligned with the source code.

@codecov-commenter

codecov-commenter commented Mar 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.70%. Comparing base (ecdc9c8) to head (e9a51b0).
⚠️ Report is 785 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #3324      +/-   ##
==========================================
+ Coverage   75.77%   78.70%   +2.93%     
==========================================
  Files         257      224      -33     
  Lines       11994    12469     +475     
  Branches     2464     2830     +366     
==========================================
+ Hits         9088     9814     +726     
+ Misses       1398      949     -449     
- Partials     1508     1706     +198     

☔ 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

github-actions Bot commented Mar 2, 2026 •

Copy link
Copy Markdown
Contributor

Size Change: 0 B

Total Size: 740 kB

ℹ️ View Unchanged
Filename Size
./packages/s2-core/dist/s2-extends.min.js 208 kB
./packages/s2-core/dist/s2.min.css 581 B
./packages/s2-core/dist/s2.min.js 308 kB
./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 3.8 kB
./packages/s2-vue/dist/s2-vue.min.js 54.2 kB

compressed-size-action

@Alexzjt

Alexzjt commented Mar 3, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

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

Copy link
Copy Markdown
Contributor

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 synchronizes the API documentation with the source code, which is a great improvement for developers using the library. The changes in interaction.en.md, interaction.zh.md, spreadsheet.en.md, and spreadsheet.zh.md correctly reflect the latest type definitions and add missing methods. I've found a minor formatting issue in one of the markdown tables that could affect rendering. Please see my specific comment for details. Overall, good work on keeping the documentation up-to-date.

Note: Security Review has been skipped due to the limited scope of the PR.

Syncs interaction.en.md and interaction.zh.md API tables and interfaces to match the packages/s2-core/src/common/interface/interaction.ts source code, adding missing scrolling and highlight methods, and missing ScrollOffsetConfig properties in spreadsheet docs.

Co-authored-by: Alexzjt <9548248+Alexzjt@users.noreply.github.com>
@Alexzjt
Alexzjt merged commit ef7266a into next Mar 3, 2026
11 checks passed
@Alexzjt
Alexzjt deleted the docs-sync-interaction-options-2074946402769805559 branch March 3, 2026 03:33
Laffery pushed a commit to Laffery/S2 that referenced this pull request Jul 17, 2026
…vis#3324)

* docs: sync interaction API docs with source code

Syncs interaction.en.md and interaction.zh.md API tables and interfaces to match the packages/s2-core/src/common/interface/interaction.ts source code, adding missing scrolling and highlight methods, and missing ScrollOffsetConfig properties in spreadsheet docs.

Co-authored-by: Alexzjt <9548248+Alexzjt@users.noreply.github.com>

* docs: 按 CR 意见修改

* docs: sync interaction API docs with source code

Syncs interaction.en.md and interaction.zh.md API tables and interfaces to match the packages/s2-core/src/common/interface/interaction.ts source code, adding missing scrolling and highlight methods, and missing ScrollOffsetConfig properties in spreadsheet docs.

Co-authored-by: Alexzjt <9548248+Alexzjt@users.noreply.github.com>

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Alexzjt <9548248+Alexzjt@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

next 2.0-next 版本的问题 pr(documentation) documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants