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

Bring back toggle for boolean #3618

Open
1 task done
vgwizardx opened this issue Nov 15, 2024 · 4 comments
Open
1 task done

Bring back toggle for boolean #3618

vgwizardx opened this issue Nov 15, 2024 · 4 comments
Labels
enhancement Created by Linear-GitHub Sync

Comments

@vgwizardx
Copy link

vgwizardx commented Nov 15, 2024

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:

  • Making the default value easier and faster to set directly on the flag configuration page.
  • Reducing the number of steps and visual clutter in the interface by removing redundant controls.
  • Providing a more intuitive and visually clear overview of default values on the Flags page.

Search

  • I searched for other open and closed issues before opening this

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.

@vgwizardx vgwizardx added the enhancement Created by Linear-GitHub Sync label Nov 15, 2024
@vgwizardx
Copy link
Author

@markphelps I'm not sure if you got a chance to look at this. Do I need to provide more details or anything?

@markphelps
Copy link
Collaborator

@vgwizardx sorry for the delay. We've since redone the flags list page in v1.53, but I agree it is still confusing as it's always 'Enabled'.
CleanShot 2024-12-10 at 16 17 36
CleanShot 2024-12-10 at 16 17 40

What we are really trying to convey is that evaluation wont fail with an error, like it does for variant flags if you try to evaluate them without them being 'enabled'.

But now that we've moved from a table view where all the columns had to be the same to a 'card' view, we can now show boolean and variant flag details differently on the Flags list page.

Here's what I propose:

  1. Change the flags list view to show default value for boolean flags like you mentioned and remove the 'Enabled' language for boolean flags
  2. Add back the toggle like you suggested but make it clear it is the default value returned.
  3. Hide the rollouts 'default value' if there are no rollouts configured.
  4. If there are rollouts configured we show the default value as we do now but don't make it editable, as its tied directly to the toggle in 2.

Wdyt?

cc @erka

@erka
Copy link
Collaborator

erka commented Dec 11, 2024

I wish Flipt could display a precomputed label for the enabled/disabled state of a boolean flag in the UI. This would simplify understanding the flag's behavior based on its configuration. Here's how it could work:

  1. No Additional Rollouts:

    • Use the disabled label when the toggle is off.
    • Use the enabled label when the toggle is on.
  2. Threshold Rollout:

    • Disabled: When the toggle is off and the threshold rollout value is false.
    • Enabled: When the toggle is on and the threshold rollout value is true.
    • Alternative View: For cases where the toggle is off but the threshold rollout value is true, or the toggle is on but the value is false. The UI could show a distinct label (e.g., a different color, text, or symbol) or adjust to enabled/disabled if the percentage value like 0% or 100%.
  3. Segment Rollout:

    • This case is less straightforward. If the segment rollout value differs from the toggle's on/off state, the UI could append an indicator (like *) to the enabled or disabled label as a hint of an edge case.

The default value of a boolean flag might not represent its actual behavior. For example, if the toggle is off but a Threshold Rollout is configured with 100% and a true value, the flag's UI should show enabled label.

@vgwizardx
Copy link
Author

vgwizardx commented Dec 18, 2024

@markphelps and @erka I think simple is best. So please do what you suggest Mark and we could do something like as follows for the flags view when there is a rollout.

No Rollouts
The flags view shows the default value.

Threshold or Segment Rollout
The flags view will show the Rollout Type and then show enabled or disabled with high-level info for the rollout settings (If this is too hard, just a note to click for more details, which opens the flag). Basically, are we using the rollout yes or no.?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Created by Linear-GitHub Sync
Projects
Status: No status
Development

No branches or pull requests

3 participants