The idea is to support multiple variations of a behavior in an easy way, for example 'Instagram with Comments' and 'Instagram without Comments', and also allow the generic autoscroll behavior to be always available.
Perhaps update the API as follows:
Each behavior can have an optional 'rank' metadata, from say, 0 to 100 to indicate its ordering. The best behavior will have a rank of 100 (default). The generic autoscroll behavior will always have the lowest rank (0)
/info can return a list of behaviors that match a given regex, ordered from best to worst.
/behavior can return the best behavior by default, but also accept rank= query arg to return a different behavior, closest to that rank, eg. rank=0 would generally return the autoscroll behavior.
The rank will determine the order in which behaviors are shown to the user in the UI, so should avoid having same rank for two behaviors generally..
For sake of simplicity, as well as, enable the quick update of behaviors it would be best to not have multiple behaviors per say but rather a way to indicate to a behavior which actions are deselected
The idea is to support multiple variations of a behavior in an easy way, for example 'Instagram with Comments' and 'Instagram without Comments', and also allow the generic autoscroll behavior to be always available.
Perhaps update the API as follows:
/info
can return a list of behaviors that match a given regex, ordered from best to worst./behavior
can return the best behavior by default, but also acceptrank=
query arg to return a different behavior, closest to that rank, eg.rank=0
would generally return the autoscroll behavior.The rank will determine the order in which behaviors are shown to the user in the UI, so should avoid having same rank for two behaviors generally..