jason-roberts / FeatureToggle

Simple, reliable feature toggles in .NET
http://dontcodetired.com/blog/?tag=/featuretoggle
Apache License 2.0
689 stars 111 forks source link

Add the ability to have sub features inside a feature #89

Open SeanFarrow opened 9 years ago

SeanFarrow commented 9 years ago

It would be nice to allow a user to have sub features inside a main feature. The justification for this would be if for example a library like JQuery was being upgraded on a site with many pages and you wanted to do this one page at a time. You could then have a main toggle and then a sub toggle for each page. Also it would be nice to allow things other than Boolean in sub toggles.

jason-roberts commented 9 years ago

Thanks @SeanFarrow for the suggestion, let me have a think about it :) Just want to keep things as simple as possible... Would this be like some kind of dictionary of toggles where each page was an entry in the dictionary and each page had a separate toggle??

SeanFarrow commented 9 years ago

Hi,

Possibly, although the other approach is to have an IEnumerable where ISubFeatureToggle could look something like this: Public interface ISubFeatureToggle { String Name { get;} Object Value {get; } } Hope this helps. I did think about using Generics, to strongly type the Value, but that’s up to you. Cheers Sean. From: Jason Roberts [mailto:notifications@github.com] Sent: 10 June 2015 08:13 To: jason-roberts/FeatureToggle Cc: Sean Farrow Subject: Re: [FeatureToggle] Add the ability to have sub features inside a feature (#89)

Thanks @SeanFarrowhttps://github.com/SeanFarrow for the suggestion, let me have a think about it :) Just want to keep things as simple as possible... Would this be like some kind of dictionary of toggles where each page was an entry in the dictionary and each page had a separate toggle??

— Reply to this email directly or view it on GitHubhttps://github.com/jason-roberts/FeatureToggle/issues/89#issuecomment-110626110.

Odonno commented 9 years ago

Hi,

@SeanFarrow Clearly, I don't see what you're expected and maybe the word subfeature is not obvious. But, you may think triggered feature (or dependant features) where activating/deactivating a toggle will activate/deactivate another.

In fact, this is a more general way to do subfeatures like you said, I think.

SeanFarrow commented 9 years ago

Hi,

I wasn’t thinking that, I can activate the top level feature, and then can activate any other feature(s) below this. Features below this don’t just have to be true/false, I’ll fork and set something up to give you an idea. Cheers Sean.

From: Odonno [mailto:notifications@github.com] Sent: 12 June 2015 15:19 To: jason-roberts/FeatureToggle Cc: Sean Farrow Subject: Re: [FeatureToggle] Add the ability to have sub features inside a feature (#89)

Hi,

@SeanFarrowhttps://github.com/SeanFarrow Clearly, I don't see what you're expected and maybe the word subfeature is not obvious. But, you may think triggered feature (or dependant features) where activating/deactivating a toggle will activate/deactivate another.

In fact, this is a more general way to do subfeatures like you said, I think.

— Reply to this email directly or view it on GitHubhttps://github.com/jason-roberts/FeatureToggle/issues/89#issuecomment-111509169.