flipt-io / flipt

Enterprise-ready, GitOps enabled, CloudNative feature management solution
https://flipt.io
GNU General Public License v3.0
3.83k stars 218 forks source link

Bring back toggle for boolean #3618

Open vgwizardx opened 1 week ago

vgwizardx commented 1 week ago

Problem

On the Flipt Flags page, the "Evaluation" field is always shown as "Enabled" for boolean flags, which is redundant since it cannot be toggled off. Currently, users must navigate to the flag configuration page, scroll down to the "Default Rollout" section, and use a dropdown to set the default value. This process can be cumbersome and unintuitive for quickly changing a flag's default value.

Ideal Solution

While the old screen was a little confusing. I did like using it more for boolean flags. I have included what would be the best of both worlds.

  1. Add a Toggle for Default Value on Flag Config Page: Reintroduce a toggle at the top of the flag configuration page (where the old Evaluation enable/disable toggle was located) to set the default value to true or false. This toggle would replace the "Default Rollout" section, making it faster and more intuitive for users to adjust the default value directly on the config page without needing to scroll or use a dropdown.

  2. Remove Default Rollout Section: Eliminate the "Default Rollout" section as the new toggle would cover its functionality. This simplifies the user interface on the config page and reduces redundant controls for setting the default value.

  3. Improve Default Value Visibility on Flags Page: On the Flags page, visually emphasize the default value by displaying it as a pill icon—green with "true" and red with "false." This provides a quick, high-level view of each flag's default value (and the actual flag state if rollouts are not being used), making it easy to identify without requiring navigation to the flag config page.

Rationale This proposed change enhances the user experience by:

Search

Additional Context

I don't plan on using the rollout section, and I feel that many teams may prefer using boolean flags for simplicity. This change would allow teams to leverage boolean flags more effectively without the confusion introduced by the past and current setup.