Any flag conditions of type "boolean" don't appear in the Wagtail flags UI, because of this use of conditions_without_bool. I gather this is to support the use of a boolean condition to toggle a flag on or off from the UI, but it can lead to some confusing behavior:
If you add a new boolean condition and save it, it doesn't show up on the flag's index page, but might impact how the enable/disable button works.
If you try to change an existing condition's type from something else to boolean, the form submission won't succeed, but no error message is shown.
It seems like if you try to add a boolean condition when one is already defined, the form submission won't succeed, but no error message is shown.
I encountered this problem because I wanted to manually disable a flag that already had an existing condition from Django settings, and thought that adding a boolean False flag would be a useful way to do that. But after trying to add that condition, it was unclear whether it had done anything or what the current logic was.
Two immediate ideas to address this: prevent use of boolean conditions in the UI, or migrate existing boolean conditions to some new "wagtail-flags-toggle" type which is deliberately distinct from booleans.
A related issue: if you define a flag in settings with "FLAG_NAME": [("boolean", True)], the UI still shows you a "DISABLE FLAG_NAME FOR ALL REQUESTS" button, but clicking it doesn't seem to do anything.
Any flag conditions of type "boolean" don't appear in the Wagtail flags UI, because of this use of
conditions_without_bool
. I gather this is to support the use of a boolean condition to toggle a flag on or off from the UI, but it can lead to some confusing behavior:I encountered this problem because I wanted to manually disable a flag that already had an existing condition from Django settings, and thought that adding a boolean False flag would be a useful way to do that. But after trying to add that condition, it was unclear whether it had done anything or what the current logic was.
Two immediate ideas to address this: prevent use of boolean conditions in the UI, or migrate existing boolean conditions to some new "wagtail-flags-toggle" type which is deliberately distinct from booleans.