featurehub
featurehub copied to clipboard
Better UX for inputing multiple string values in targeting rules
Is your feature request related to a problem? Please describe. There are use cases when we'd want to have a rule like "userId in a list". Currently the only way to this right now is have a field rule with fields like "userId - string - equals -" then manually input all the ids in by copy pasting, then clicking 'Add'. Sometimes the UI would lag losing progress, the labor work is frustrating if the list is somewhat long.
Describe the solution you'd like I'm hoping we can have a "contains in" kind of evaluation. So the rule can be "userId - string - in -" then a comma separated list of strings. Something like this would be a great quality of life improvement.
Describe alternatives you've considered A different approach is to have a field that we can group the target audience and use that instead, for example: "userTag - string - equals - {tags}". But in our case that would require a product build, which besides from ease in toggling we don't have other use case for it. Another approach is integrate the Admin SDK and expose an endpoint to do that. This has same problem which is requiring we specifically build.
Additional context
Can help let me know if there's already a solution to this already im not aware of. Great service, thanks for all the hardwork also orz
Heya! Yeah, the include mapping goes the other way, it says if the custom values is included in the value provided in the SDK, but you actually want it the other way around? We could support that, but we would need to change all the SDKs - which isn't a big deal - there is a new major revision going out shortly, so we could probably tack it onto that. The usual caveat applies for splits i suppose - we would need to make sure we know what character you are using for the split and would need to make sure the text started and ended with that character. Then you couldn't get partial matches - e.g. userid "fred" in /winifred/ for example because we would add the /fred/ around it it to prevent it?
hi hi, thanks for reply, actually i'm not fully understanding what you're saying, but 'change all the SDKs' sounds like a lot of work haha. Not sure if the case is common enough to justify such changes, i'm currently thinking maybe an 'Add List' button/functionality from frontend side would suffice, all other logic can stay the same. What do you think?
yeah, that would do - as long as its what you need? copy/paste with a delimeter?
yes, paste with delimiter
halo @rvowles wanna check again on this, in the mean time, is there another (simple) way we can do it programmatically through API calls? im not sure which one to use currently
Hey @axblueblader - if you are generating code for your chosen language from the OpenAPI spec, there is a method called updateFeatureForEnvironment
- which updates the feature value for a specific key. So you can get the feature value for the environment + key (getFeatureForEnvironment
), update it, and save it again. the FeatureValue has a field rolloutStrategies
which hopefully you should be able to follow from there?
Ok thanks, i'll look around https://github.com/featurehub-io/featurehub/blob/main/adks/final.yaml with the method names u provided
The current API is https://github.com/featurehub-io/featurehub/blob/main/infra/api-bucket/files/mrapi/1.1.9.yaml
Hi hi, I saw the roadmap so wanna check if there's any plans to support this? Our use case is slowly relying on this more and more. Using the API can workaround a couple of times but it's harder to use and prone to mistakes than from UI so it's not really scalable as we have to teach other devs how to use it as well. We try to have many types of groupings to avoid this but even so there are still cases where a list of 'ids', 'group ids', 'type ids' need to be whitelist or blacklist and the list can be long
hi @axblueblader, we should be able to take a look at this request and hopefully have it ready for the next release. Just confirming that the feature request is to add ability to bulk load a list of values on a Custom Value field. Cheers
add ability to bulk load a list of values on a Custom Value field
yepp, thank you so much y'all
will be able to input comma separated list of strings as mentioned above. Added to string, number and also to the user key, version, date, date-time and ip address type fields.
@axblueblader this is now in the 1.6.1-RC which was pushed to dockerhub if you wish to try it out?
yep checked out the 1.6.1-RC image, it's exactly what we'll need thank you so much