HomePhorge

Modularize application extensions to EditEngine

Description

Modularize application extensions to EditEngine

Summary:
Ref T9132. Currently, EditEngine had some branchy-instanceof code like this:

if ($object instanceof Whatever) {
  do_magic();
}

if ($object instanceof SomethingElse) {
  do_other_magic();
}

...where Whatever and SomethingElse are first-party applications like ProjectsInterface and SubscribersInterface.

This kind of code is generally bad because third-parties can't add new stuff, and it suggest something is kind of hacky in its architecture. Ideally, we would eventually get rid of almost all of this.

T9789 is a similar discussion of this for the next layer down (TransactionEditor) and plans to get rid of branchy-instanceofs there too.

Since I'm about to add more stuff here (for Custom Fields), split it out first so I'm not digging us any deeper than I already dug us.

Broadly, this allows third-party extensions to add fields to every EditEngine UI if they want, like we do for Policies, Subscribers, Projects and Comments today (and CustomFields soon).

Test Plan:
{F1007575}

  • Observed that all fields still appear on the form and seem to work correctly.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9132

Differential Revision: https://secure.phabricator.com/D14599

Details

Provenance
epriestleyAuthored on Nov 29 2015, 10:05 AM
themackabuPushed on Mar 25 2025, 8:07 PM
Parents
rP9a193093459f: Update PhameBlogView UI
Branches
Unknown
Tags
Unknown

Event Timeline