Page MenuHomePhabricator

Modularize application extensions to EditEngine
ClosedPublic

Authored by epriestley on Nov 29 2015, 6:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Mar 6, 5:28 AM
Unknown Object (File)
Tue, Mar 5, 10:26 AM
Unknown Object (File)
Tue, Mar 5, 4:07 AM
Unknown Object (File)
Tue, Mar 5, 4:07 AM
Unknown Object (File)
Tue, Mar 5, 4:07 AM
Unknown Object (File)
Feb 14 2024, 5:29 AM
Unknown Object (File)
Feb 14 2024, 5:29 AM
Unknown Object (File)
Feb 14 2024, 5:29 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.