Skip to content

feat(vtable): auto-merge rectangular body multi-ranges - #5319

Closed
Rui-Sun wants to merge 2 commits into
VisActor:developfrom
Rui-Sun:codex/oncall-409732aa860f6e669014eacf1f037598
Closed

Rui-Sun wants to merge 2 commits into
VisActor:developfrom
Rui-Sun:codex/oncall-409732aa860f6e669014eacf1f037598

Conversation

@Rui-Sun

@Rui-Sun Rui-Sun commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Superseded by #5320, which contains the same implementation commit on a branch in this repository and can use the existing repository CI secrets.

🤔 This is a ...

  • New feature
  • TypeScript definition update
  • Test Case

🔗 Related issue link

None.

💡 Background and solution

Add opt-in select.autoMergeRanges (default false) to merge adjacent or overlapping ordinary body selections when their connected union fills a rectangle. L-shaped, holed and disconnected selections retain their separate ranges. Header, row-series and frozen-partition selections are excluded.

selectCells evaluates the complete batch after per-range normalization and deduplication, including when the final input range is a duplicate. Ctrl selection and drag selection use the same merge routine. Selection borders and selected_cell payloads reflect the final ranges.

const table = new ListTable({
  // ...existing options
  select: { autoMergeRanges: true }
});

📝 Changelog

Language Changelog
English Add optional rectangular multi-range auto-merge for body selections; existing behavior remains the default.
Chinese 新增可选的 body 多选区矩形自动合并能力,默认选择行为不变。

Validation

Regression coverage includes disabled behavior, adjacent/overlapping rectangles, L-shapes, holes, disconnected ranges, duplicate final ranges, Ctrl/event behavior, drag selection and frozen boundaries. Host validation details are recorded below. Product Electron tests must run in CI before review/merge; this remains a Draft PR.

☑️ Self-Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

🚀 Summary

copilot:summary

🔍 Walkthrough

copilot:walkthrough

Runner validation

  • Targeted Rush install and build passed; scope, diff and test-file checks passed.
  • NOT RUN: product Jest/Electron tests; this runner has no xvfb-run/headless display.
  • Draft only: run the added tests and full product suite in CI before review/merge.

CI results

  • Unit test CI passed for commit 068ce10bf9952261756398061882419a3fc8dfea, including listTable-select-auto-merge.test.ts.
  • Bug Server CI built successfully but failed at service token validation. A maintainer must resolve the CI credential access; this check is not marked as passing.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant