U4-2693 - Make package.manifest less complext

Created by Per Ploug 22 Aug 2013, 10:07:49 Updated by Shannon Deminick 10 Sep 2013, 07:20:41

The package.manifest is starting to get complex and the naming is not super transparent, suggest format changes to something like this:

{ id: "0BA0F832-D759-4526-9B3E-94BBFC98F92E", name: "Regex", defaultConfig: { regex: "\d*$" }, editor: { view: "~/App_Plugins/MyPackage/PropertyEditors/Views/RegexEditor.html", required: true, <-- shorthand for validation/required field regex: "\d*$" <-- shorthand for validation/regex field }, prevalues: { <-- instead of prevalueEditor/fields array regex: { label: "Regular expression", description: "Enter a regular expression to use to validate this editor", view: "requiredfield", required: true } } }

Comments

Shannon Deminick 23 Aug 2013, 04:14:29

We can do some of that but we'll have to meet in the middle due to the validators. I'd rather not put the validators at the root of editor or a pre-val field because we will inevitably add more validators, we already have required, regex, delimited and each validator can be given a config object (i.e. delimited can get an object assigned instead of a string).

But even if we put them in a validators property it will still make the manifest less complex that it is now like:

{ id: "0BA0F832-D759-4526-9B3E-94BBFC98F92E", name: "Regex", defaultConfig: { regex: "\d*$" }, editor: { view: "~/App_Plugins/MyPackage/PropertyEditors/Views/RegexEditor.html", validators: { required: true, regex: "\d*$", delimited: { delimiter: ",", regex: "^\d*$" } }

},
prevalues: { 
        myField: {
            label: "Regular expression",
            description: "Enter a regular expression to use to validate this editor",
            view: "requiredfield",
            validators: {
				required: true
			}				
        }
}    

}

I like the idea of using a dictionary with a key name instead of an array with a complex object!

Now, to figure out how to deserialize that :)... will need to be done manually unfortunately, but will be nicer for people in the long run.


Shannon Deminick 10 Sep 2013, 07:20:41

Completed in 4957acb8d32ec1ece4a38891b4ea24837aeab70d

What I've referenced above was completed.


Priority: Normal

Type: Bug

State: Fixed

Assignee: Shannon Deminick

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.0.0

Due in version: 7.0.0

Sprint:

Story Points:

Cycle: