Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make feature definitions require a human readable description. #5

Closed
drewdeponte opened this issue May 3, 2015 · 5 comments
Closed
Assignees

Comments

@drewdeponte
Copy link
Owner

I think it is crucial that from a long term maintenance standpoint of feature toggles we have some human readable description explain what that particular feature toggle is/means.

@drewdeponte
Copy link
Owner Author

So, I guess I am saying we should make the gem more opinionated and only let features be defined if a human readable description is provided. @BRIMIL01 or @RyanHedges have any thoughts?

@RyanHedges
Copy link
Contributor

What's the use case? I call something like the following to get some information about the feature I'm working with from inside my code?

Togls.feature.(:pop_up_login_form).description
#=> "Provides a pop up for logging into our system instead of sending to login page"

Or would it be something you'd use from a command line?

$ Togls describe --all

Pop up login form:    ON
                      Provides a pop up for logging into our 
                      system instead of sending to login page.

Send follup email:    OFF
                      Sends an email after confirming xyz action.

I guess it would make sense because you might have 100's of features that you'd want to verify.

@drewdeponte drewdeponte self-assigned this May 18, 2015
@drewdeponte
Copy link
Owner Author

The use case I am implementing now related to this is as follows:

Togls.feature(:pop_up_login_form, "control if pop up login form is used instead of normal login form").on

The following will be mechanism for accessing an individual features description.

Togls.feature(:pop_up_login_form).description

The following will be a method that will return all the defined features, feature objects.

Togls.features

The following is going to be a provide rake task that will display all the features, their description, and their status.

rake togls:features

@drewdeponte
Copy link
Owner Author

From an outermost perspective this really results in the following interfaces:

  1. defining a feature toggle with its required description

    Togls.features do
      feature(:pop_up_login_form, "control if pop up login form is used instead of the normal one").on
    end
  2. outputting all of the feature toggles including their status, key, and description via rake task

    rake togls:features

drewdeponte added a commit that referenced this issue May 19, 2015
I did this because without a required feature description after a while it
gets very hard to keep track what each of the feature toggles is for.
Especially if a feature toggle ends up sticking around for a while. Part of
issue #5.
drewdeponte added a commit that referenced this issue May 19, 2015
I did this so that there would be an easy way to display the current state of
all of the feature toggles within the system. It outputs the state (on, off, ?
- unkown due to complex rule), the key used to identify the feature, and a
  human readable description. Part of issue #5.
drewdeponte added a commit that referenced this issue May 19, 2015
I did this so that it would show up when running `rake -T` as well as to help
people understand what it does. Part of issue #5.
drewdeponte added a commit that referenced this issue May 19, 2015
I did this so that people would properly understand how to use the `togls` gem
with the new changes around the description features (required descriptions
and output of features). Part of issue #5.
drewdeponte added a commit that referenced this issue May 19, 2015
I did this so that people would know able the significant changes of the
description based features. Part of issue #5.
@drewdeponte
Copy link
Owner Author

This was resolved by pull request #6 so I am closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants