cfpb / django-flags

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

Use clearer language for booleans with required conditions #45

Closed willbarton closed 5 years ago

willbarton commented 5 years ago

This change will say 'MYFLAG is disabled for all requests, even when all required conditions are met.' when there are required conditions along with a non-required boolean condition and no other non-required conditions.

This is a change from 'MYFLAG is disabled when all required conditions are met.' which is somewhat confusing.

This change also refactors the string creation somewhat to reduce the duplication of strings. Hopefully the way I'm slicing makes eventual translation doable... but I'm not entirely sure that'll be the case.

With the Flag conditions Debug Toolbar panel this looks like:

image

With https://github.com/cfpb/wagtail-flags/pull/35 this looks like:

image

willbarton commented 5 years ago

@schbetsy I used slightly different language than you suggested because of the ease of fitting it into the existing set of conditionals. Let me know what you think!