flagr
flagr copied to clipboard
Distribution modal saves checked value if settings not saved
In the flagr UI, the modal that comes up for editing a segment's distribution can save the checkbox value for a variant, even if the distribution settings aren't saved (e.g. the settings are invalid, close the modal manually, etc).
Expected Behavior
Subsequent opens of the distribution modal dialog should get the freshest state of the distribution.
Current Behavior
The modal can have stale state. This causes you a couple extra clicks (uncheck / recheck box) in order to be able to assign some of the distribution to that variant.
Possible Solution
a) reset the modal contents on close b) make sure to get fresh modal content every time it is shown (from being hidden)
Steps to Reproduce (for bugs)
- Go to https://try-flagr.herokuapp.com/#/flags/1
- Click 'edit' the distribution on the default segment
- Check the box for 'control'
- Click the 'X' box in the upper right to dismiss the modal
- Click 'edit' the distribution on the default segment again
- Observe the check box for 'control' is still checked, but you can't edit the distribution slider to include an amount for that option. If you uncheck / check the 'control' box again, you are able to edit the distribution to include 'control'
Context
Minor inconvenience when editing distribution
Your Environment
- Version used (
flagr version
): 1.1.4 - Server type and version: N/A
- Operating System and version (
uname -a
): OS X - Browser: Chrome