Homec4science

Add "Undo" for editing Differential inline comments

Authored by epriestley <git@epriestley.com> on Jun 8 2011, 01:11.

Description

Add "Undo" for editing Differential inline comments

Summary:
When a user hits 'cancel' on a 'new', 'edit', or 'reply' operation, add a little
"Changes discarded. Undo" insert so they can get their change back. No undo
for delete since there's an explicit prompt. Once this lands we can make
'escape' work again to close dialogs.

This change started feeling really good when I was merging all the duplicate
code and making things more consistent, but by the time I started writing client
rendering it felt gross. I'm not really thrilled with it but I guess it's a step
forward? The feature seems pretty OK in practice. Let me know how much barfing
this causes and I can try to remedy the most acute concerns.

This also fixes a bug where replies always (?) appear on the 'new' side of the
diff (I think?).

Test Plan:
Applied 'new', 'edit', 'delete' and 'reply' operations, pressed 'cancel' and
'okay' in each case, with and without changing text where relevant. All
behaviors seem to conform with expectations, except that canceling out of 'edit'
without changing the text gives you an option to undo when it shouldn't really.
There's no super easy way to get at the original text right now.

Reviewed By: aran
Reviewers: aran, jungejason, tuomaspelkonen
CC: simpkins, aran, epriestley
Differential Revision: 406

Details

Committed
epriestley <git@epriestley.com>Jun 8 2011, 19:44
Pushed
aubortJan 31 2017, 17:16
Parents
rPH19d0d2808984: Use keyboard shortcuts for the "`" darkconsole toggle.
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH94d0adb1406d: Add "Undo" for editing Differential inline comments (authored by epriestley <git@epriestley.com>).Jun 8 2011, 19:44