Page MenuHomePhabricator

Give Almanac generic, custom-field-based properties
ClosedPublic

Authored by epriestley on Nov 3 2014, 5:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 29, 2:12 PM
Unknown Object (File)
Fri, Apr 26, 4:22 PM
Unknown Object (File)
Wed, Apr 24, 10:16 PM
Unknown Object (File)
Sun, Apr 21, 5:10 AM
Unknown Object (File)
Fri, Apr 12, 10:04 AM
Unknown Object (File)
Sat, Apr 6, 10:18 PM
Unknown Object (File)
Sat, Apr 6, 1:55 PM
Unknown Object (File)
Mar 21 2024, 2:25 AM
Subscribers

Details

Summary

Ref T5833. Currently, we have an AlmanacDeviceProperty, but it doesn't use CustomFields and is specific to devices. Make this more generic:

  • Reuse most of the CustomField infrastructure (so we can eventually get easy support for nice editor UIs, etc).
  • Make properties more generic so Services, Bindings and Devices can all have them.

The major difference between this implementation and existing CustomField implementations is that all other implementations are application-authoritative: the application code determines what the available list of fields is.

I want Almanac to be a bit more freeform (basically: you can write whatever properties you want, and we'll put nice UIs on them if we have a nice UI available). For example, we might have some sort of "ServiceTemplate" that says "a database binding should usually have the fields 'writable', 'active', 'credential'", which would do things like offer these as options and put a nice UI on them, but you should also be able to write whatever other properties you want and add services without building a specific service template for them.

This involves a little bit of rule bending, but ends up pretty clean. We can adjust CustomField to accommodate this a bit more gracefully later on if it makes sense.

Test Plan

Screen_Shot_2014-11-03_at_9.03.13_AM.png (1×1 px, 197 KB)

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Give Almanac generic, custom-field-based properties.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.

Cool beans; I think this is pretty clean overall too.

btrahan edited edge metadata.

meant to accept before...

This revision is now accepted and ready to land.Nov 5 2014, 6:11 PM
This revision was automatically updated to reflect the committed changes.