ondemand icon indicating copy to clipboard operation
ondemand copied to clipboard

Dashboard: Get rid of the necessity of a separate "form" section

Open ericfranz opened this issue 5 years ago • 1 comments

The current batch connect setup has form section that is a list of attributes, and then a separate attributes hash that is their definition. This division is unnecessary in most cases, as a single attributes list could serve both purposes.

When they are separate, you can add an attribute to the attributes section, forget to add it also to the form section, and wonder why it doesn't appear in the form.

Supporting the ability to use an attributes: list and drop the form: section should not be difficult.

Also, Ruby 1.9+ preserves the order of Hash keys, so the question is whether the process of parsing the YAML and creating the Hash also preserves the order. If it does, we could just use the order as specified attributes section, and keep it a hash. We could also change this to an array of hashes and optionaly use !!omap for "ordered dict". Maybe a relevant discussion is here https://stackoverflow.com/questions/5956473/preserve-key-order-loading-yaml-from-a-file-in-ruby

┆Issue is synchronized with this Asana task by Unito

ericfranz avatar Jul 26 '18 14:07 ericfranz