Provide "Change Projects" and "Change Subscribers" (instead of "Add ...") in comment actions

Summary:
Ref T9908. Fixes T6205.

This is largely some refactoring to improve the code. The new structure is:

  - Each EditField has zero or one "submit" (normal edit form) controls.
  - Each EditField has zero or one "comment" (stacked actions) controls.
    - If we want more than one in the future, we'd just add two fields.
  - Each EditField can have multiple EditTypes which provide Conduit transactions.
  - EditTypes are now lower-level and less involved on the Submit/Comment pathways.

Test Plan:
  - Added and removed projects and subscribers.
  - Changed task statuses.
  - In two windows: added some subscribers in one, removed different ones in the other. The changes did not conflict.
  - Applied changes via Conduit.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T6205, T9908

Differential Revision: https://secure.phabricator.com/D14789
This commit is contained in:
epriestley
2015-12-15 06:57:32 -08:00
parent 6c4c93a091
commit d7693a93b3
21 changed files with 417 additions and 321 deletions

View File

@@ -54,7 +54,7 @@ final class PhabricatorProjectsEditEngineExtension
pht('Add projects.'),
pht('Remove projects.'),
pht('Set associated projects, overwriting current value.'))
->setCommentActionLabel(pht('Add Projects'))
->setCommentActionLabel(pht('Change Projects'))
->setTransactionType($edge_type)
->setMetadataValue('edge:type', $project_edge_type)
->setValue($project_phids);