Page MenuHomePhabricator

When a user clicks "Cancel" on an inline comment to leave the "Editing" state, save the state change
ClosedPublic

Authored by epriestley on Apr 29 2020, 6:34 PM.
Tags
None
Referenced Files
F13221594: D21187.diff
Sun, May 19, 2:54 AM
F13220329: D21187.diff
Sun, May 19, 12:55 AM
F13202313: D21187.diff
Tue, May 14, 10:31 PM
F13176639: D21187.diff
Wed, May 8, 3:50 PM
Unknown Object (File)
Sat, May 4, 6:34 PM
Unknown Object (File)
Thu, May 2, 12:01 PM
Unknown Object (File)
Wed, May 1, 7:10 PM
Unknown Object (File)
Sun, Apr 28, 9:59 AM
Subscribers
None

Details

Summary

Ref T13513. Now that the "currently being edited" state of inlines is saved on the server side, clear the flag when the user clicks "Cancel" to leave the "editing" state on the client.

This also serves to delete empty comments.

Test Plan
  • Clicked a line number to create a new comment. Then:
    • Clicked "Cancel". Reloaded page, saw no more comment.
    • Typed text, saved. Reloaded page, saw non-editing draft. Clicked "Edit", reloaded page, saw editing draft. Clicked "Cancel", reloaded page, saw non-editing draft.
    • Typed text, saved. Clicked "Edit", deleted text, saved. Reloaded page, saw no more comment.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable