Skip to content

feat(text-editor): insert as many table rows as are selected - #11139

Merged
ArtyomSavchenko merged 1 commit into
hcengineering:developfrom
MichaelUray:feat/table-insert-multiple-rows
Oct 29, 2026
Merged

ArtyomSavchenko merged 1 commit into
hcengineering:developfrom
MichaelUray:feat/table-insert-multiple-rows

Conversation

@MichaelUray

Copy link
Copy Markdown
Contributor

Fixes #8677

Problem and change

The table options menu could only add a single row before or after the
selection, so adding several rows meant repeating the action once per row.

When several rows are selected, "Add before" / "Add after" in the Rows
section now read "Add N rows before" / "Add N rows after" and insert that
many empty rows in a single transaction (one undo step). The insertion
reuses prosemirror-tables' addRow and re-reads the table after each row so
merged cells crossing the insertion point keep growing their row span. A
cursor or a single-row selection keeps the previous behaviour and labels.

The row counting and insertion live in a small addRows helper covered by
unit tests.

Tests

New unit tests plugins/text-editor-resources/src/components/extension/table/addRows.test.ts. Checked manually on a self-hosted instance: with cells of three rows selected the table menu offers "Add 3 rows before/after", which inserts three empty rows that a single undo removes; with only a cursor the single-row entries are shown.

The table options menu could only add a single row before or after the
selection, so adding several rows meant repeating the action once per row.

When several rows are selected, "Add before" / "Add after" in the Rows
section now read "Add N rows before" / "Add N rows after" and insert that
many empty rows in a single transaction (one undo step). The insertion
reuses prosemirror-tables' addRow and re-reads the table after each row so
merged cells crossing the insertion point keep growing their row span. A
cursor or a single-row selection keeps the previous behaviour and labels.

The row counting and insertion live in a small addRows helper covered by
unit tests.

Fixes hcengineering#8677

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>
@MichaelUray
MichaelUray force-pushed the feat/table-insert-multiple-rows branch from 833927d to eae9b26 Compare October 26, 2026 14:22
@ArtyomSavchenko

Copy link
Copy Markdown
Member

@MichaelUray

Copy link
Copy Markdown
Contributor Author

@ArtyomSavchenko Thanks for checking this. I investigated the latest CI run on eae9b263; the formatting failure comes from mixed merge revisions.

The build checks out the moving PR merge ref, while formatting checks out the event’s original merge SHA. The build cache includes source files, so restoring it overlays newer develop changes onto the older checkout:

  • build logs Merge eae9b263… into f292d165… and Cache saved with key: Linux-build-cache-build-results-347185c30fb5273b6957009a68dfdaad9acbb183.
  • formatting logs HEAD is now at 347185c30f Merge eae9b263… into e3f4f168…, logs Cache restored from key: Linux-build-cache-build-results-347185c30fb5273b6957009a68dfdaad9acbb183, then exits 1 on five file diffs.
  • I matched every diff hunk to develop e3f4f168…f292d165, from #11144, #11072, #11068: plugins/tracker-resources/src/components/NewIssueHeader.svelte, plugins/tracker-resources/src/components/issues/edit/ControlPanel.svelte, plugins/view-resources/src/actionImpl.ts, plugins/view-resources/src/components/ActionHandler.svelte, plugins/view-resources/src/components/ActionsPopup.svelte. None of these files is changed by this PR.
  • uitest checks out Merge eae9b263… into e3f4f168… and logs Cache restored from key: Linux-build-cache-node-platform-85c8d52495c8f987db8f51823e4115dc3c73ba8210818d148b9699f1f89f9b15 (Node dependencies). It fails while pulling service_huly-schedule:v0.0.12: dial tcp 140.82.113.34:443: i/o timeout (infrastructure/network).

I’m preparing a separate workflow-fix PR to pin the checkouts to github.sha, make cache consumers restore-only, and rebuild on a cache miss. Re-running an old run keeps its original workflow definition and can repeat these failures.

@ArtyomSavchenko
ArtyomSavchenko merged commit acd8045 into hcengineering:develop Oct 29, 2026
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tables: Insert multiple rows at once

2 participants