Page MenuHomePhabricator

Modularize application extensions to EditEngine
ClosedPublic

Authored by epriestley on Nov 29 2015, 6:14 PM.
Tags
None
Referenced Files
F14062958: D14599.diff
Mon, Nov 18, 3:41 PM
F14058096: D14599.diff
Sun, Nov 17, 9:25 AM
F14052160: D14599.diff
Fri, Nov 15, 7:01 AM
F14039767: D14599.id35336.diff
Mon, Nov 11, 6:16 AM
F14032957: D14599.diff
Sat, Nov 9, 4:18 PM
F14026896: D14599.id35335.diff
Fri, Nov 8, 3:26 AM
F14026705: D14599.id35335.diff
Fri, Nov 8, 1:58 AM
F14026703: D14599.id.diff
Fri, Nov 8, 1:58 AM
Subscribers
None

Details

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

Screen Shot 2015-11-29 at 10.07.14 AM.png (951×1 px, 172 KB)

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

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Modularize application extensions to EditEngine.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Nov 30 2015, 3:15 PM
epriestley edited edge metadata.
  • Move the Owners changes out from under this, since they weren't quite ready to land.
This revision was automatically updated to reflect the committed changes.