FeatureToggle icon indicating copy to clipboard operation
FeatureToggle copied to clipboard

Add the ability to have sub features inside a feature

Open SeanFarrow opened this issue 10 years ago • 4 comments

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.

SeanFarrow avatar Jun 09 '15 18:06 SeanFarrow

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??

jason-roberts avatar Jun 10 '15 07:06 jason-roberts

Hi,

Possibly, although the other approach is to have an IEnumerable<ISubFeatureToggle> 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:[email protected]] 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.

SeanFarrow avatar Jun 10 '15 07:06 SeanFarrow

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.

Odonno avatar Jun 12 '15 14:06 Odonno

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:[email protected]] 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.

SeanFarrow avatar Jun 12 '15 16:06 SeanFarrow