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
F15472378: D21187.id50454.diff
Sat, Apr 5, 12:53 PM
F15469013: D21187.id50455.diff
Fri, Apr 4, 8:20 AM
F15454529: D21187.id50454.diff
Sat, Mar 29, 6:59 PM
F15451793: D21187.id.diff
Fri, Mar 28, 11:50 PM
F15448414: D21187.id50455.diff
Fri, Mar 28, 4:42 AM
F15443384: D21187.diff
Thu, Mar 27, 4:09 AM
F15427815: D21187.id50454.diff
Sun, Mar 23, 4:08 PM
F15409489: D21187.id50454.diff
Wed, Mar 19, 4:35 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