feature-switch icon indicating copy to clipboard operation
feature-switch copied to clipboard

Feature request: enable feature for subset of users

Open jbardnz opened this issue 8 years ago • 4 comments

Hey,

Great library - I have been looking for a Laravel package that does this for some time. I have a feature request but not sure if it is in the scope of this package.

It would be great to be able to roll out a feature to a certain % of users. Say 1% of users initially and then scale that up to 100% as you become more confident you haven't introduced any bugs.

Thoughts?

jbardnz avatar Jun 08 '16 05:06 jbardnz

Glad you like it :) it's been on my list for a long time and I got sick of the half-baked versions out there. This is still beta obviously but seems to work well for our project at work. I'll keep improving it as I find things.

That's an interesting feature - I'm trying to think how you'd be able to get that to work from a technical perspective. Any suggestions? Google Analytics does this via A/B testing so you might have 2 versions of the same page.

jonathan-bird avatar Jun 08 '16 06:06 jonathan-bird

Have a look at Launch Darkly for some feature ideas: https://launchdarkly.com

From a technical point of view it would need to be able to persist the users that had the feature enabled - it wouldn't be great if the user refreshed the page and the feature switched off.

Have a look at Rollout it is a Ruby library that achieves this. Their is a inactive PHP port here.

You could probably hook into the Laravel driver system and either have file/database/cache storage options.

jbardnz avatar Jun 08 '16 06:06 jbardnz

Ah gotcha! Interesting, I'll keep that one in mind. It's a pretty big feature but I may be able to get some of that information from Laravel that I'm unsure about to get things like targeting for countries, IP address, new vs old users etc.

Feel free to create a pull request with the feature if you want ;-)

jonathan-bird avatar Jun 08 '16 06:06 jonathan-bird

A percentage based rollout and manually specifying a batch of user id's would cover most use cases.

Then it can be left to implement your own new vs old logic/location/type of user.

kyranb avatar Jun 08 '16 15:06 kyranb