File tree 2 files changed +16
-5
lines changed
2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -51,15 +51,26 @@ const FeatureListProvider = class extends React.Component {
51
51
this . editFeatureValue (
52
52
projectId ,
53
53
environmentId ,
54
+ /* todo: Saving features involves sending an adjusted project flag rather than a feature state (old tech debt).
55
+ This will be removed when migrating to RTK. The following converts the feature state to the accepted format.
56
+ */
54
57
{
55
58
...projectFlag ,
56
59
default_enabled : ! environmentFlag . enabled ,
60
+ initial_value : environmentFlag . feature_state_value ,
61
+ multivariate_options : projectFlag . multivariate_options . map ( ( mv ) => {
62
+ const matching =
63
+ environmentFlag . multivariate_feature_state_values . find (
64
+ ( v ) => v . multivariate_feature_option == mv . id ,
65
+ )
66
+ return {
67
+ ...mv ,
68
+ default_percentage_allocation : matching . percentage_allocation ,
69
+ }
70
+ } ) ,
57
71
} ,
58
72
projectFlag ,
59
- {
60
- ...environmentFlag ,
61
- enabled : ! environmentFlag . enabled ,
62
- } ,
73
+ environmentFlag ,
63
74
)
64
75
}
65
76
Original file line number Diff line number Diff line change @@ -433,7 +433,7 @@ const App = class extends Component {
433
433
/>
434
434
) }
435
435
{ user && showBanner && (
436
- < Row >
436
+ < Row className = { 'px-3' } >
437
437
< InfoMessage
438
438
title = { announcementValue . title }
439
439
infoMessageClass = { 'announcement' }
You can’t perform that action at this time.
0 commit comments