1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-03 12:12:43 +01:00
phorge-phorge/src/aphront
epriestley a1f5d37357 Improve the behavior of PhabricatorFileEditField for Macros
Summary:
See D17848. This improves things a little bit in two cases:

Case 1:

  - Create a macro.
  - Pick a valid file.
  - Pick an invalid name.
  - Submit form.
  - Before patch: your file is lost and you have to pick it again.
  - After patch: your file is "held" in the form, you just can't see it in the UI. If you submit again, it keeps the same file. If you pick a new file, it uses that one instead.

Case 2:

  - Apply D17848.
  - Delete the `if ($value) {` thing that I'm weirded out about (see inline).
  - Edit a macro.
  - Don't pick a new file.
  - Before patch: error, can't null the image PHID.
  - Afer patch: not picking a new file means "keep the same file", but you can't tell from the UI.

Basically, the behaviors are good now, they just aren't very clear from the UI since "the field has an existing/just-submitted value" and "the field is empty" look the same. I think this is still a net win and we can fix up the UI later.

Test Plan: See workflows above.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D17853
2017-05-08 16:23:12 -07:00
..
__tests__ phtize all the things 2015-05-22 21:16:39 +10:00
configuration Update rate limiting for APCu and X-Forwarded-For 2017-04-21 20:39:14 -07:00
exception Convert some whiny exceptions into quiet MalformedRequest exceptions 2016-08-16 15:50:21 -07:00
handler Convert some whiny exceptions into quiet MalformedRequest exceptions 2016-08-16 15:50:21 -07:00
httpparametertype Improve the behavior of PhabricatorFileEditField for Macros 2017-05-08 16:23:12 -07:00
interface Allow Controllers to return a wider range of "response-like" objects 2015-09-01 15:52:52 -07:00
response Make "Range" HTTP header work for Celerity static resource requests 2017-04-18 13:46:27 -07:00
sink Don't combine automatic output compression with "Content-Length" 2016-12-13 14:25:49 -08:00
site Allow custom Sites to have custom 404 controllers 2016-11-30 15:25:09 -08:00
AphrontController.php Provide an AphrontController implementation of willSendResponse() 2015-09-07 17:18:35 -07:00
AphrontRequest.php Preserve nonstandard ports during 404 redirects which add "/" to the ends of URIs 2017-01-04 06:55:10 -08:00