Horreum
Horreum copied to clipboard
The Add Action UI could be made more easily usable
Feature idea.
The Add Action UI has pulldowns for "event", "action", and "formatter" which are so tightly inter-dependent that the UI could and should make this easier for the user.
Most actions support only one event type (only HTTP currently supports more than one, although Slack will also), and each event has a fixed formatter which depends on the event's associated Horreum object (e.g., test, change, experiment). If you select an event and action that aren't compatible, the formatter pulldown will be empty, which is unnecessarily confusing.
E.g., if I select "run/new" event and "Github issue comment", there's no formatter available, which means I can't create the action.
Describe the solution you'd like
The UI should help the user select compatible event and action, perhaps by graying out or otherwise de-emphasizing incompatible choices. When I select "run/new", the "Github issue comment" action should be grayed out. However, if I select "Github issue comment" anyway, the event pulldown should gray out most events and default to "experiment_result/new", which is the only event compatible with "Github issue comment". This sort of model supports exploration without forcing the user to guess at how event and action are interdependent.
With a compatible event and action, the formatter becomes implicit. The event (currently) uniquely determines the formatter, so there's no point in forcing the user to select a formatter at all. If the intent is to support multiple formatters for each event, that's fine, but the UI should at least default to a reasonable choice. The UI should not allow a combination of event and action for which there are no compatible formatters.
Additional information
This could be considered a part of #1357, but if that's "a ways out" then doing this within the existing framework would improve usability.
👋 @dbutenhof Thanks for opening your first issue here! Be sure to follow the issue template!