Summary
Currently, parameters can be ordered but not related to each other. There are many templates where one parameter is only relevant if another is used, or if one is used then another no longer applies. Adding dependent parameters to TemplateData would allow users to add this logic. When editing a parameter in the TemplateData editor, there would be an option to make it dependent on another existing parameter. Then if that other parameter is in use (added to template and has a value), the current parameter can either be hidden or shown. If shown, then it is grouped with the dependent parameter in the template dialog UI.
Mock
Questions
- How complicated is it to create dependent parameters?
- How will this affect existing templates which have unmarked dependent parameters? How could this new feature be applied to existing templates?
- How would this work for those editing TemplateData without the editor (ie. by writing JSON)?
- How would making a parameter dependent interact with the options to make it required or recommended? Does it create conflicts? Generally look for and collect any potential conflicts as they are discovered.
Scope
- This ticket looks at the interrelation of TemplateData/JSON, the TemplateData editor, TemplateWizard and the Visual Editor template dialog. The first step is to examine how adding a new parameter type to TemplateData itself can be represented in the TemplateData editor. These changes can be made without being usable by VE or TemplateWizard.
- We should make sure we are not breaking things in TemplateWizard, but it is not a requirement that anything implemented in VE must then be implemented in TemplateWizard. The two are not currently in alignment and it is out of scope to bring them into alignment.
- More complex dependencies are not in scope, including: having one parameter being dependent on if two parameters are both used or making a parameter dependent on which value is chosen for another parameter. These would be much more complicated to implement and would not be as commonly used.
Note: This ticket also requires UX investigation into how making parameters dependent on each other could be done in the UI and how this would affect adding/deleting parameters in VE.
Related ticket: T52407
