Page MenuHomePhabricator

When a new, deleted, draft inline is revived with "Undo", undelete it
ClosedPublic

Authored by epriestley on Oct 19 2020, 7:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 24, 3:03 AM
Unknown Object (File)
Thu, Nov 21, 5:02 PM
Unknown Object (File)
Tue, Nov 19, 2:57 PM
Unknown Object (File)
Fri, Nov 15, 11:02 AM
Unknown Object (File)
Thu, Nov 14, 9:52 AM
Unknown Object (File)
Thu, Nov 14, 9:11 AM
Unknown Object (File)
Thu, Nov 14, 9:08 AM
Unknown Object (File)
Thu, Nov 14, 9:07 AM
Subscribers
None

Details

Summary

See PHI1876. Normally, deleted inlines are undeleted with an "undelete" operation, which clears the "isDeleted" flag.

However, when an inline is deleted implicitly by using "Cancel" without first saving it, the flag currently isn't cleared properly. This can lead to cases where inlines seem to vanish (they are shown to the user in the UI, but treated as deleted on submission).

Test Plan

There are two affected sequences here:

  • Create a new inline, type text, cancel, undo.
  • Create a new inline, type text, cancel, undo, save.

The former sequence triggers an "edit" operation. The subsequent "Save" in the second sequence triggers a "save" operation.

It's normally impossible in the UI to execute a "save" without executing an "edit" first, but "save" clearly should undelete the comment if you get there somehow, so this change clears the deleted flag in both cases for completeness.

  • Executed both sequences, saw comment persist in preview, on reload, and after submission.

Diff Detail

Repository
rP Phabricator
Branch
inline1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 24949
Build 34422: Run Core Tests
Build 34421: arc lint + arc unit