-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Description
Assuming we have:
- Trigger1,
- ActionA attached to Trigger1
- ActionB attached to Trigger1
When app executes Trigger1, context menu popup is shown and user has to pick either ActionA or ActionB.
But assume for some cases app knows it wants to execute ActionA
What is the best way to implement this?
Some options I thought of:
- just execute Action1 directly without using a trigger? (is it a hack and uiActions shouldn't be used like this? Or is this fine?)
- Implement more specific trigger: "Trigger2" and attach only ActionA to it. Execute Trigger2
- Introduce concept of "default" action and allow to specify during trigger execution
uiActions.exec(Trigger1, {useDefaultAction: true}), where it knowns default isActionA
Probably related to #47468?
@streamich, @ppisljar, @stacey-gammon what is your take on it?
Real use case where this came up:
After adding nested triggers and actions I refactored explore underlying data to use Apply_filter_action. This enabled "explore underlying data" for Maps. Instead of disabling this functionality completely, I'd like to leave it. But there are advanced cases where this popup spoils the UX and, for now, I'd just like to not show that popup for some cases, but apply filter directly. (see Nathan's comment #71445 (comment))
But I am not sure what is the correct way to do it.