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.
|
stevengill
left a comment
There was a problem hiding this comment.
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
typeas 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 bytypeallows you to route actions that may have differenttypesbut the sameaction_id(or other constraint properties), or even route all actions of a specifictypeto one handler (regardless ofcallback_id,action_idorblock_id.In response to #325
Requirements (place an
xin each[ ])