-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding type as a valid constraint for app actions #326
adding type as a valid constraint for app actions #326
Conversation
Codecov Report
@@ Coverage Diff @@
## master #326 +/- ##
=======================================
Coverage 73.71% 73.71%
=======================================
Files 7 7
Lines 506 506
Branches 145 145
=======================================
Hits 373 373
Misses 101 101
Partials 32 32
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM assuming others are cool with the change in general.
Hi friends! Sorry for the late addition here, but I've got some input to share! I totally agree that this is a use case worth solving. More flexibility in routing is a win. My input is that I think we can do this in a way that adds even more value to users if we embrace the type system. For example, wouldn't it be nice if Bolt could tell you that you were doing something wrong here?
The Or what about just helping a developer understand what the options might be for the What this would require is instead of using I'd be happy to help make this sort of an adjustment, but I'd prefer to work with someone on it so that I'm not the only one familiar with those parts of the code. Does anyone want to work on this with me? |
Summary
This adds
type
as an additional constraint for actions. Motivation for this is to allow slightly more flexibility for routing specific types of actions to certain handlers. Being able to constrain bytype
allows you to route actions that may have differenttypes
but the sameaction_id
(or other constraint properties), or even route all actions of a specifictype
to one handler (regardless ofcallback_id
,action_id
orblock_id
.In response to #325
Requirements (place an
x
in each[ ]
)