-
Notifications
You must be signed in to change notification settings - Fork 66
fix: ensure we do not duplicate bubble text #1934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix: ensure we do not duplicate bubble text #1934
Conversation
palmer-cl
commented
Feb 4, 2026
- 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
caio-pizzol
left a comment
There was a problem hiding this 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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 = []; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added as one expression .
|
@caio-pizzol added VRTs and updated comments. |