Page MenuHomePhabricator

Fix an issue when undoing mutiple inline comment deletions
ClosedPublic

Authored by epriestley on Mar 25 2021, 9:03 PM.
Tags
None
Referenced Files
F13042968: D21650.diff
Wed, Apr 17, 1:51 PM
Unknown Object (File)
Wed, Apr 10, 8:03 PM
Unknown Object (File)
Mon, Apr 8, 7:52 AM
Unknown Object (File)
Sat, Apr 6, 11:50 AM
Unknown Object (File)
Sat, Apr 6, 7:21 AM
Unknown Object (File)
Thu, Mar 28, 7:15 AM
Unknown Object (File)
Mar 6 2024, 5:36 AM
Unknown Object (File)
Feb 21 2024, 6:29 AM
Subscribers
None

Details

Summary

Ref T13559. If you create comments A and B, then delete comments A and B, then undo the deletion of A, the UI undoes the deletion of B instead.

This is becasue the undo rows are shipped down with a static scalar metadata reference. When copied multiple times to create multiple undo rows, they reference the same data object.

Preventing this in the general case is a problem with greater scope. For now, just avoid rendering these rows with any metadata so they don't alias a single data object.

Test Plan
  • Created comments A, B.
  • Deleted comments A, B.
  • Clicked "Undo" on A.
    • Before: Deletion of "B" undone.
    • After: Deletion of "A" undone.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable