-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Multivariate flags UI #5725
Multivariate flags UI #5725
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, apologies this took long to review, but I think this looks good! Approved, but with two comments. See if they make sense to address.
- As one small change, I'd still add the PR or issue ID inside the feature flag, like the other ones have.
- As one bigger change, it would be cool if you would limit the multivariate sliders so that none can be dragged such that the total is over 100%.
Thank you @mariusandra! Regarding the sliders — TL;DR I had considered doing that, but felt it would arbitrarily limit the user. Consider some example percentages are [50%, 50%] Preventing the total from exceeding 100, even temporarily, would force the user to decrease the rollout of one to 30% before increasing the other to 70% (forcing an order of operations). But this intermediate value of (50 + 30) = 80% is just as incorrect as an intermediate value of (70 + 50) = 120% as the final allocation must sum to exactly 100. |
Makes sense and agreed, that proposal is also not ideal, and ultimately not better than what's in the PR. cc @clarkus for thoughts. |
Just wanted to provide some quick late feedback here. I think we can make the "Boolean" & "String variant" labels clearer for a less technical audience. |
Circling back here to review - I think this is a good v1 especially with the notes @mariusandra and @paolodamico added. The boolean and string options could have some inline tooltips to explain them to less technical audiences or we could change the nomenclature to "true / false" or "text". Whatever we do here should probably align with any data types we expose in the rest of the product. Sliders are a really challenging component to use for users and a challenging one to validate for engineers. It really comes down to implementation and how accurate a user can be with their input. The input fields here that capture the value are a good idea - you can skip sliders altogether and just type in your distribution. |
Changes
Contributes to #5440. Adds a UI in PostHog for configuring multivariate feature flags.
Notes
5440-multivariate-support
The feature flag rollout page:

Validations:


Distribute evenly (handling remainders from integer rounding):

Data loss warning if switching from variants to Boolean (default) behavior:

Checklist