Skip to content

Conversation

@palmer-cl
Copy link
Collaborator

  • The document nodes are the source of truth for what appears in the editor, so they should define the comment text.
  • Also keep the fallbacks
  • added tests
image

@linear
Copy link

linear bot commented Feb 4, 2026

Copy link
Contributor

@caio-pizzol caio-pizzol left a comment

Choose a reason for hiding this comment

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

clean one @palmer-cl!

the only addition I would say here is that in this case, it also impacts rendering and interactions with the editor. we should definitely write interaction stories and upload a sample file for visual testing.

if (!hasInsertNode && nodes?.length) fallbackNodes.push(...nodes);
if (!hasDeleteNode && deletionNodes?.length) fallbackNodes.push(...deletionNodes);

// Remove duplicates by comparing node identity
Copy link
Contributor

Choose a reason for hiding this comment

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

this comment is stale -- the Set isn't doing the heavy lifting anymore, the conditional above is. maybe just drop the comment or change to // safety net for identity dedup

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated comment!

node.marks.find((nodeMark) => nodeMark.type.name === TrackDeleteMarkName),
);

const fallbackNodes = [];
Copy link
Contributor

Choose a reason for hiding this comment

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

could be one expression but reads fine either way -- no strong opinion

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added as one expression .

@palmer-cl
Copy link
Collaborator Author

@caio-pizzol added VRTs and updated comments.

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.

3 participants