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)
Sat, Nov 2, 6:06 AM
Unknown Object (File)
Sat, Nov 2, 6:05 AM
Unknown Object (File)
Sat, Nov 2, 5:46 AM
Unknown Object (File)
Thu, Oct 10, 10:12 PM
Unknown Object (File)
Thu, Oct 10, 10:12 PM
Unknown Object (File)
Thu, Oct 10, 10:12 PM
Unknown Object (File)
Oct 5 2024, 4:46 PM
Unknown Object (File)
Sep 9 2024, 10:25 AM
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