Skip to content

Update removedAt for already deleted tree and text nodes when performing range deletion operation #821

Open
@raararaara

Description

@raararaara

Description:
During the process of performing a range deletion operation, if there are nodes within the range that have already been removed, the removedAt field should be updated accordingly.

Locally, there is no need to update removedAt for nodes that are already marked as removed. However, when considering remote scenarios, it is necessary to update removedAt. Currently, the logic does not update removedAt for either treeNode or textNode.

In more detail, when collecting nodes within a range, the logic for treeNode filters out nodes that are already marked as removed(see tokensBetween() and children()), while textNode performs a similar role through the canDelete().

What you expected to happen:
The removedAt field should be updated for nodes that have already been deleted when performing a range deletion operation.

How to reproduce it (as minimally and precisely as possible):
This issue works normally in the current spec, but will recur when undo/redo is added in the future.

Anything else we need to know?:
N/A

Environment:

  • Operating system: N/A
  • Browser and version: N/A
  • Yorkie version (use yorkie version): N/A
  • Yorkie JS SDK version: v0.4.20

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions