Page MenuHomePhabricator

Build an ApplicationEditor abstraction
Closed, ResolvedPublic

Description

Edit forms are currently among the least abstract -- and, theoretically, most abstractable -- parts of modern Phabricator. We have a handful of highly specialized edit forms:

  • Diffusion has a paginated edit form for repositories.
  • Pholio has a fairly complex drag + drop JS interaction.
  • Calendar has some JS interactions between the controls.

Essentially all other edit forms are mundane collections of well-behaved fields.

The actual edits themselves are abstracted via ApplicationTransactions, but exposing the low-level transactions as usable controls is not. In practice, each EditController is mostly hand-written and defines the individual controls in the UI. Instead, we could define the fields more broadly and let the abstraction render controls, like we've done with ApplicationSearch.

Abstracting edit forms is complex, and is something I intentionally avoided doing for a long time, but previous efforts (e.g., in Diffusion) haven't been a total disaster and I think this problem is now ripe.

Increasing the level of abstraction here gives us plausible attacks on a lot of problems with edit workflows:

  • (T8434 / T3320 / T8891) Templating of edit forms (hiding, reordering, defaulting fields)
  • (T4768) Conflict detection and resolution
  • (T5873) Generalized Conduit edit APIs
  • (M1430) Stackable actions
  • (T5031-ish) Draft interaction with edit actions has a messy outlook without this.
  • (T4316) Per-user edit form customization? Not sure I want to go this far, but I think this is maybe better than just putting comment forms on every edit form.
  • Generic batch editing across applications.

Details

Differential Revisions
D14405: (Novelty Only) Randomly disable and reorder fields on edit forms
Commits
D14718 / rP42ef21f8fac9: Document how to customize forms in ApplicationEditor
D14704 / rP59ae0d6ffff8: Allow EditEngine create and edit forms to be reordered
D14702 / rP2f8e409876e6: Allow EditEngine forms to be marked as "edit" forms
D14699 / rP468f785845ce: Support "template objects" generically in EditEngine
D14678 / rP1fcdcddd5f2b: Fix EditEngine preview/draft for first comment on a task you didn't create
D14675 / rP273e22d59f87: Save stacked actions in drafts, not just comments
D14672 / rPeded19a5c6d3: Unify EditEngine preview behavior; prepare for saving complex drafts
D14670 / rPf1744ac6d9f8: Change/drop/reconcile some miscellaneous edit behaviors in Maniphest
D14673 / rP7aa865db2ddf: Swap "Create Task" button over to EditEngine
D14669 / rPf9e84d1a88af: Make "Assign / Claim" stacked action work properly in Maniphest
D14667 / rP92ea07e7879c: Restore "Change Status" and "Change Priority" comment actions to Maniphest
D14666 / rPb3cf00333cfa: Limit number of EditEngine tokenizer tokens in "Owner" field UI to 1
D14663 / rP6bfb101aff20: Replace all Maniphest commenting code with EditEngine commenting code
D14665 / rPdd0b09a610b3: Make "Quote" work with EditEngine in Paste and Maniphest
D14664 / rP8bbea6d41c92: Make "Add Action..." add actions at the bottom instead of the top
D14659 / rPfa273523096f: Rough in EditEngine for Maniphest
D14653 / rPdc0d91413452: Basic stacked action support for EditEngine
D14640 / rPb82863d972a5: Implement versioned drafts in EditEngine comment forms
D14638 / rP618cec23d8f0: Make notification counts properly translatable
D14637 / rPa1c7ba6b8b29: Initial support for comments/append-edits in EditEngine
D14635 / rP773ecb9a4434: Support Conduit application of most CustomField transactions in EditEngine
D14634 / rPc1ae5321d745: Support HTTP parameter prefilling in EditEngine forms for CustomFields
D14617 / rP029b1b673394: Partially support CustomFields in EditEngine
D14598 / rPa407b83dc276: Move Owners to EditEngine
D14607 / rP9d59086d0148: Consolidate transaction generation in EditType objects
D14601 / rP56be70056111: Improve code structure of PHID fields in EditEngine
D14600 / rP50f257adee18: Allow EditEngine Conduit endpoints to accept object IDs and monograms
D14599 / rPacd955c6c9b9: Modularize application extensions to EditEngine
D14584 / rP37893ba2e632: Allow EditEngine configurations to be disabled and marked as "Default"
D14515 / rPc034752578cf: Support comments as an EditEngine field
D14509 / rP269e0bfc943e: Allow EditEngine form fields to be locked and hidden
D14508 / rP53d5cd395077: Allow EditEngine forms to have defaults assigned
D14503 / rP9aee90f8c1e8: Allow form configurations to retitle and reorder forms and add preambles
D14453 / rP039809749869: Allow ApplicationEditor forms to be reconfigured
D14404 / rP621f806e3b54: Provide formal Users/Projects/Mailable fields for EditEngine
D14402 / rP20e4c3fbd46b: Modularize complex HTTP parameter types
D14398 / rP9de4bc6f3acf: Slightly improve organization of PhabricatorApplicationEditEngine
D14393 / rP5030ba040195: Roughly generate transaction-oriented API methods from EditEngines
D14392 / rP3dec4c7dbdd2: Provide contextual documentation explaining how to prefill ApplicationEditor…
D14390 / rP105cbaaee1dd: Implement a basic version of ApplicationEditor in Paste

Related Objects

StatusAssignedTask
OpenNone
Resolvedepriestley
OpenNone
OpenNone
Openepriestley
Resolvedepriestley
Wontfixepriestley
Resolvedbtrahan
Resolvedepriestley
Resolvedepriestley
Resolvedepriestley
DuplicateNone
ResolvedNone
Resolvedepriestley
ResolvedNone
Resolvedepriestley
OpenNone
InvalidNone
ResolvedNone
Resolvedepriestley
Resolvedepriestley
Resolvedchad
Resolvedchad
Resolvedchad
Resolvedchad
Resolvedchad
Resolvedchad
OpenNone
ResolvedNone
DuplicateNone

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
angie added a project: Restricted Project.Nov 9 2015, 11:53 PM
qgil removed a subscriber: qgil.Nov 10 2015, 2:33 PM
nickz added a subscriber: nickz.Nov 18 2015, 12:09 AM
epriestley moved this task from Backlog to vNext on the Transactions board.Dec 9 2015, 2:30 PM
epriestley closed this task as Resolved.Dec 10 2015, 1:43 PM

I'm going to close this out since the infrastructure work it describes is now substantially complete, although a great deal of work remains to be done to bring this infrastructure to all applications and implement the full set of features it enables (mostly described in tasks blocked by this one).

T9905 is the high-level task describing immediate impact in Maniphest.

angie moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Dec 10 2015, 6:51 PM
angie moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Apr 21 2016, 10:22 PM
urzds added a subscriber: urzds.Jul 12 2017, 11:12 AM