Skip to content

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

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

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

Conversation

@Rui-Sun

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

Copy link
Copy Markdown
Contributor

🤔 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

Supersedes #5319 with the same implementation commit, submitted from a branch in this repository so repository CI secrets are available.

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.

Upstream CI verification

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