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 Wed, Apr 29, 6:34 PM.

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
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Wed, Apr 29, 6:34 PM
epriestley requested review of this revision.Wed, Apr 29, 6:35 PM
epriestley updated this revision to Diff 50455.Wed, Apr 29, 6:36 PM
  • Remove a redundant call to "setLoading(true)".
This revision was not accepted when it landed; it landed in state Needs Review.Mon, May 4, 8:10 PM
This revision was automatically updated to reflect the committed changes.