1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-21 22:32:41 +01:00
phorge-phorge/src/infrastructure
epriestley 1308a5555f Update client logic for inline comment "Save" and "Cancel" actions
Summary: Ref T13559. Substantially correct the client logic for "Save" and "Cancel" actions to handle unusual cases.

Test Plan:
Quoting behavior:

  - Quoted a comment.
  - Cancelled the quoted comment without modifying anything.
  - Reloaded page.
    - Before changes: quoted comment still exists.
    - After changes: quoted comment is deleted.
  - Looked at comment count in header, saw consistent behavior (before: weird behavior).

Empty suggestion behavior:

  - Created a new comment on a suggestable file.
  - Clicked "Suggest Edit" to enable suggestions.
  - Without making any text or suggestion changes, clicked "Save".
    - Before changes: comment saves, but is empty.
    - After changes: comment deletes itself without undo.

General behavior:

  - Created and saved an empty comment (deletes itself).
  - Created and saved a nonempty comment (saves as draft).
  - Created and saved an empty comment with an edit suggestion (saves).
  - Created and saved an empty comment with a suggestion to entirely delete lines -- that is, no suggestion text (saves).
  - Edited a comment, saved without changes (save).
  - Edited a comment, save deleting all text (saves -- note that this is intentionally without undo, since this is a lot of steps to do by accident).
  - Cancel editing an unchanged comment (cancels without undo).
  - Cancel editing a changed comment (cancels with undo).
    - Undo'd, got text back.
  - Cancel new comment with no text (deletes without undo).
  - Cancel new comment with text (deletes with undo).
    - Undo'd, got text back.
  - Saved a quoted comment with no changes (saves -- note that this is intentionally not a "delete", since just quoting someone seems fine if you click "Save" -- maybe you want to come back to it later).

Maniphest Tasks: T13559

Differential Revision: https://secure.phabricator.com/D21654
2021-03-29 09:00:27 -07:00
..
cache Use "@" to silence "GC list" warnings from "apc_store()" and "apcu_store()" 2020-04-28 04:13:37 -07:00
cluster Fix additional "xprintf()"-class static parameter lint errors 2020-09-08 11:45:48 -07:00
contentsource Redesign Config Application 2016-08-29 15:49:49 -07:00
customfield Fix additional "xprintf()"-class static parameter lint errors 2020-09-08 11:45:48 -07:00
daemon Remove or correct various "phabricator/" references to "libphutil" 2021-03-16 10:28:07 -07:00
diff Update client logic for inline comment "Save" and "Cancel" actions 2021-03-29 09:00:27 -07:00
edges Fix an issue where loading a mangled project graph could fail too abruptly 2020-02-03 08:54:04 -08:00
editor Restore editor behavior to Diffusion and support "\" shortcut 2020-04-19 09:41:37 -07:00
env Make it easier to parse "X-Forwarded-For" with one or more load balancers 2019-09-05 04:30:13 -07:00
events Remove "PhabricatorEventType::TYPE_DIFFUSION_LOOKUPUSER" event 2019-11-19 09:38:03 -08:00
export Export "date" and "remarkup" custom fields to Excel + "zip" extension check 2019-07-18 09:59:20 -07:00
graph Render user hovercards with context information about their ability to see the context object 2021-02-13 13:37:37 -08:00
internationalization Add "bin/worker delay" and "bin/worker priority" utilities for managing task queues 2021-02-02 13:40:11 -08:00
javelin When printing timestamps on paper: use an absolute, context-free date format 2020-09-04 16:36:34 -07:00
lint/linter Linter fixes 2015-12-03 07:44:23 +11:00
lipsum Continue moving classes with no callers in libphutil or Arcanist to Phabricator 2020-02-12 13:14:04 -08:00
log Proxy the "git upload-pack" wire protocol 2019-04-18 04:57:51 -07:00
management Add additional flags to "bin/repository rebuild-identities" to improve flexibility 2019-11-19 09:39:48 -08:00
markup Add a negative lookbehind to the Remarkup "bare URI" regular expression pattern 2021-02-18 11:59:02 -08:00
parser Continue moving classes with no callers in libphutil or Arcanist to Phabricator 2020-02-12 13:14:04 -08:00
query Remove "final" from "private" methods in Phabricator 2021-02-03 14:13:29 -08:00
ssh Generate a random unique "Request ID" for SSH requests so processes can coordinate better 2018-03-22 13:44:30 -07:00
status Give Drydock Leases more modern status treatment 2018-02-13 13:15:57 -08:00
storage Remove or correct various "phabricator/" references to "libphutil" 2021-03-16 10:28:07 -07:00
syntax Pass the new default syntax highlighting map to the remarkup engine 2016-05-05 02:51:19 -07:00
testing When running unit tests, ignore any custom task fields 2017-04-02 09:36:17 -07:00
time Render timezone names more readably, with spaces rather than underscores ("America/Los Angeles", not "America/Los_Angeles"). 2019-05-30 15:03:11 -07:00
util Never return external connections to the GlobalLock connection pool 2021-03-02 13:44:17 -08:00
PhabricatorEditor.php Mark some strings for translation 2015-06-09 23:06:52 +10:00