Page MenuHomePhabricator

[native] Apply pending delete before dispatching RawEntryInfo updates
AbandonedPublic

Authored by ashoat on May 31 2024, 6:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 20, 7:07 PM
Unknown Object (File)
Thu, Jun 13, 2:45 AM
Unknown Object (File)
Mon, Jun 10, 4:52 AM
Unknown Object (File)
Sun, Jun 9, 3:43 PM
Unknown Object (File)
Sun, Jun 9, 1:26 PM
Unknown Object (File)
Sun, Jun 9, 11:01 AM
Unknown Object (File)
Sun, Jun 9, 6:16 AM
Unknown Object (File)
Sat, Jun 8, 5:23 PM
Subscribers
None

Details

Reviewers
tomek
Summary

If you're editing an Entry, change the text, and then hit the "Delete" button, the first event that fires now is onBlur (see here for more context).

This means that we first attempt to save the updated text, and then we attempt to delete the Entry. This leads to an issue: we optimistically set deleted: true for the Entry, but when the save comes in it flips that to false, resulting in a weird behavior in the UI.

This diff avoids that by patching the result from the save to have deleted: true.

Depends on D12260

Test Plan

Make sure that the Entry doesn't "rise from the dead" after disappearing when you hit "Delete" after editing and changing the text

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.May 31 2024, 6:38 PM
Harbormaster failed remote builds in B29338: Diff 40818!

Not sure this is necessary after this realization. Will investigate more before submitting to review again

This is no longer necessary after D12276