Page MenuHomePhabricator

Undoing multiple inline comments on the same line will restore the comment out of position.
Closed, ResolvedPublic

Description

  1. On a diff revision, click on a line to leave a comment
  2. Type a comment in the field
  3. Hit Cancel which will cause an "Undo" link to appear
  4. On the same line click again to create new comment
  5. Type a comment in the field
  6. Hit Cancel which will cause an "Undo" link to appear
  7. Click "Undo" - this will cause the comment to restore way below where it should

Screen Shot 2015-08-26 at 11.51.34 AM.png (1×3 px, 646 KB)

One of the first times I did this (though possibly slightly different set of steps), an error appeared on the page. I couldn't get it to happen again. The stacktrace on the server is: P1847

Phabricator is on f2b2264e8def0a69d1431f38c1d202273f95842b

Event Timeline

cspeckmim updated the task description. (Show Details)
cspeckmim added a project: Differential.
cspeckmim added a subscriber: cspeckmim.

Here's a similar failure case:

  • Click line X, type comment, click Cancel, leaving "Undo".
  • Click any other line, opening editor.
  • Click "Undo".

Screen Shot 2015-09-29 at 7.44.36 AM.png (1×1 px, 202 KB)

In both cases, I think opening the editor thrashes the internal "Undo" state but doesn't wipe the UI.

epriestley claimed this task.

This no longer reproduces after D17916.

Note that, broadly, inline editing used to be very singleton-ey and modal and to use a bunch of global state (you could only edit one comment at a time on the whole page).

Inline editing is now very flexible, and each entity supports independent simultaneous editing. It is possibly too flexible and we may need to lock down how this works a bit, but you can currently open a thousand editors and put half of them into undo states all at once if you want.

Sorry, yes, that was a disappointing way to phrase it. You may open a thousand editors and put any number of them between zero and all of them, inclusive, into any of the various undo states.