HomePhabricator

When draft inline comments are submitted, disengage the editor

Description

When draft inline comments are submitted, disengage the editor

Summary:
Ref T13513. If you submit top-level comments while an inline comment editor is open, kick the comment out of the editing state.

(An improvement to this behavior would be to warn the user that we're going to do this first, but this is currently less straightforward.)

Test Plan:

  • Clicked a line number to create an inline.
  • Type text, save, click edit.
  • (Optional: reload page.)
  • Save changes overall using the form at the bottom of the page.
  • Outcome: published inline is no longer in an "editing" state.

Weirdness:

  • If you click a line number (and, optionally, type text), then submit without using "Save", the server-side version of the inline has no content.
    • This gives you a no-effect warning. Instead, these inlines should probably just be marked as deleted somewhere in the pipeline.
  • This saves the last "Saved" copy of the inline. That's (probably?) desired, but somewhat destructive without a warning.

Maniphest Tasks: T13513

Differential Revision: https://secure.phabricator.com/D21188