Page MenuHomePhabricator

Reduce code duplication in Herald fields
ClosedPublic

Authored by epriestley on Jul 9 2015, 3:42 PM.

Details

Summary

Ref T8726. I want to modularize values and reduce how hard-coded / copypasta'd they are.

  • Rename get...StandardCondition() to get...StandardType(), since we can drive both conditions and values from it.
  • Rename STANDARD_LIST to STANDARD_PHID_LIST for consistency: all "lists" are lists of PHIDs.
  • For all standard types which don't require typehaeads, lift their logic into the base class.
  • I'll lift typeaheads soon, but need to generalize them first.
Test Plan

Edited various Herald rules, saw value UI generate correctly.

Diff Detail

Repository
rP Phabricator
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley updated this revision to Diff 32894.Jul 9 2015, 3:42 PM
epriestley retitled this revision from to Reduce code duplication in Herald fields.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
btrahan accepted this revision.Jul 16 2015, 8:36 PM
btrahan edited edge metadata.
This revision is now accepted and ready to land.Jul 16 2015, 8:36 PM
This revision was automatically updated to reflect the committed changes.