cfpb / django-flags

Feature flags for Django projects
https://cfpb.github.io/django-flags/
Creative Commons Zero v1.0 Universal
256 stars 31 forks source link

Remove "optional" from state string language #48

Closed willbarton closed 5 years ago

willbarton commented 5 years ago

"Optional" does not seem like the right word to use in retrospect. The difference between required and non-required conditions is the difference between a boolean AND and a boolean OR. So, no condition is "optional" — at least one of them has to be met.

This change removes the word "optional" from the state string when there are no required conditions, and replaces it with "non-required" when there are.

It also removes "optional" from the code in places where we refer to conditions that are not required.

willbarton commented 5 years ago

@schbetsy Good catch! Thank you. I think I'm just going to leave that column in the table blank if the condition isn't required.

schbetsy commented 5 years ago

I don't think this PR caused this issue directly, but I found I could get it to make this incomplete sentence: [flag] is enabled when all required conditions.

This happened when the flag had all three of (1) a boolean condition set to True, (2) a required condition, and (3) a non-required condition.

Screen Shot 2019-07-10 at 10 53 14 AM

If this is a separate issue, then I :+1: this PR, and we can save the incomplete sentence for a separate PR.

willbarton commented 5 years ago

@schbetsy Good catch. It should probably be fixed here, since this PR is working on that string anyway.

willbarton commented 5 years ago

@schbetsy fixed in f9959f5.