cds-hooks / docs

CDS Hooks website & specification
http://cds-hooks.org
Apache License 2.0
167 stars 61 forks source link

Add selectionBehavior option of 'any' #498

Closed mattvarghese closed 4 years ago

mattvarghese commented 5 years ago

Added "any" and "all" as options for selectionBehavior. Also cleaned up to remove redundant language.

alexander-ivanov commented 5 years ago

We were asked for some use-cases for 'all' and 'any' types of selection behavior. We use cds-hooks with own type of cds-hooks, this hook returns several independent actions which can be performed. We can encode them as a permutation of all actions, each permutation as separate suggestions, and use selection behavior - 'at-most-one' but it produces very large output and hurts performance. So we would like to encode each action as a separate suggestion and give the user the possibility to take several of them.

@Sergey778 may want to add some comments.

mattvarghese commented 5 years ago

I've updated the PR per Josh's suggested change, to only include 'at-most-one' and 'any', and removed 'all' option.

mattvarghese commented 5 years ago

@isaacvetter , @brynrhodes , @dennispatterson - requesting reviews :)