I’m playing around with a state machine helper custom component and trying to figure out how best to handle dynamic user configuration input.
What I’d like is for the user to:
- Input a list of states:
- solid
- liquid
- gas
- Select one of the states as initial:
- liquid
- Input triggers and transitions, this is 3 inputs per entry and there can be any number of these.
- melt, solid, liquid
- freeze, liquid, solid
- evaporate, liquid, gas
- condense, gas, liquid
- sublimate, solid, gas
My current approach is to:
- Have a single String input that I split on comma and turn that into the state list
- Show a drop down for the initial state picker (this works well)
- Show an input and two drop downs for the trigger, source, and dest and then a checkbox for “add more triggers”
Is there a better way to do these sorts of dynamic configuration UIs?