Skip to content

Conversation

@caio-pizzol
Copy link
Contributor

No description provided.

@linear
Copy link

linear bot commented Dec 17, 2025

@andrii-harbour
Copy link
Contributor

@caio-pizzol can you please test that this version of SD would work while being used in SuperDoc Services?

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +235 to +239
for (let i = 0; i < insertIndex; i++) {
insertPos += tableNode.child(i).nodeSize;
}

tr.insert(insertPos, newRow);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Handle rowspans when inserting rows

The new insertRowAtIndex path just clones the source row and inserts it at the computed position without running the prosemirror-tables row insertion logic that splits or adjusts cells spanning multiple rows. If the table contains any rowspan > 1 cells around the insertion point (e.g., a merged cell above or below the cursor), those spans are left intact while the cloned row reuses the same rowspan attrs, causing overlapping cells and an invalid TableMap when the document is next read. The previous originalAddRowBefore/After implementations handled rowspans; this change regresses merged-row tables.

Useful? React with 👍 / 👎.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this may be a relevant concern for complex tables. if you start with:
Screenshot 2025-12-18 at 11 36 50 AM

then 'add row before' on the first row: Screenshot 2025-12-18 at 11 37 18 AM

there may be other weird cases. Should check vertical and horizontally merged cases.

Copy link
Collaborator

@harbournick harbournick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls check cases with v or h merged cells

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.

command addRowAfter() should maintain the style of the previous row

4 participants