feat: overhaul preset definitions #182
Draft
+221
−73
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
bitfocus/companion#3931
The aim here is to formalise a slightly more hierarchical structure for presets.
Instead of a flat structure with a 'category' name set on each preset, this has changed to a lightly nested structure.
Instead of arbitrary 'text' presets, there is now a concept of groups instead. Each 'section' (previously category) can now contain either an array of groups or presets.
Local variables are supported! Currently limited to just 'user value' type.
There is a new concept of a 'matrix' group. Inspired a little by the github actions matrix syntax.
Instead of having to define the same preset multiple times with just changing an option to an action/feedback, some value substitution can be done. This is done via local-variables, with the matrix overriding the default value of those local variables
Types have been tweaked a little too, to tidy up a few patches of messiness that have crept in.
TODO: