@@ -36,6 +36,7 @@ const CreateFlag = class extends Component {
3636 initial_value : Utils . getTypedValue ( feature_state_value ) ,
3737 description,
3838 multivariate_options : _ . cloneDeep ( multivariate_options ) ,
39+ identityVariations : this . props . identityFlag && this . props . identityFlag . multivariate_feature_state_values ? _ . cloneDeep ( this . props . identityFlag . multivariate_feature_state_values ) : [ ] ,
3940 selectedIdentity : null ,
4041 allowEditDescription,
4142 enabledIndentity : false ,
@@ -115,7 +116,7 @@ const CreateFlag = class extends Component {
115116 projectFlag,
116117 environmentFlag,
117118 identityFlag : Object . assign ( { } , identityFlag || { } , {
118- multivariate_options : [ ] ,
119+ multivariate_options : this . state . identityVariations ,
119120 feature_state_value : initial_value ,
120121 enabled : default_enabled ,
121122 } ) ,
@@ -370,6 +371,23 @@ const CreateFlag = class extends Component {
370371 </ FormGroup >
371372 ) }
372373
374+ { identity && description && (
375+ < FormGroup className = "mb-4 mr-3 ml-3" >
376+ < InputGroup
377+ value = { description }
378+ data-test = "featureDesc"
379+ inputProps = { {
380+ className : 'full-width' ,
381+ readOnly : ! ! identity ,
382+ name : 'featureDesc' ,
383+ } }
384+ onChange = { e => this . setState ( { description : Utils . safeParseEventValue ( e ) } ) }
385+ isValid = { name && name . length }
386+ type = "text" title = { identity ? 'Description' : 'Description (optional)' }
387+ placeholder = "No description"
388+ />
389+ </ FormGroup >
390+ ) }
373391 < FormGroup className = "mb-4 mr-3 ml-3" >
374392 < div >
375393 < label > { enabledString } </ label >
@@ -384,7 +402,7 @@ const CreateFlag = class extends Component {
384402 </ FormGroup >
385403
386404 { ! ( ! ! identity && ( multivariate_options && ! ! multivariate_options . length ) ) && (
387- < FormGroup className = "ml -3 mb-4 mr-3" >
405+ < FormGroup className = "mx -3 mb-4 mr-3" >
388406 < InputGroup
389407 component = { (
390408 < ValueEditor
@@ -402,6 +420,25 @@ const CreateFlag = class extends Component {
402420 </ FormGroup >
403421 ) }
404422
423+ { ! ! identity && hasFeature ( 'mv' ) && (
424+ < div >
425+ < FormGroup className = "mb-4 mx-3" >
426+ < VariationOptions
427+ disabled
428+ select
429+ controlValue = { this . props . environmentFlag . feature_state_value }
430+ variationOverrides = { this . state . identityVariations }
431+ setVariations = { ( identityVariations ) => {
432+ this . setState ( { identityVariations } ) ;
433+ } }
434+ updateVariation = { ( ) => { } }
435+ weightTitle = "Override Weight %"
436+ multivariateOptions = { projectFlag . multivariate_options }
437+ removeVariation = { ( ) => { } }
438+ />
439+ </ FormGroup >
440+ </ div >
441+ ) }
405442 { this . props . hasFeature ( 'mv' ) && ! identity && (
406443 < div >
407444 < FormGroup className = "ml-3 mb-4 mr-3" >
@@ -419,23 +456,6 @@ const CreateFlag = class extends Component {
419456 </ div >
420457
421458 ) }
422- { identity && (
423- < FormGroup className = "mb-4 mr-3 ml-3" >
424- < InputGroup
425- value = { description }
426- data-test = "featureDesc"
427- inputProps = { {
428- className : 'full-width' ,
429- readOnly : ! ! identity ,
430- name : 'featureDesc' ,
431- } }
432- onChange = { e => this . setState ( { description : Utils . safeParseEventValue ( e ) } ) }
433- isValid = { name && name . length }
434- type = "text" title = { identity ? 'Description' : 'Description (optional)' }
435- placeholder = "e.g. 'This determines what size the header is' "
436- />
437- </ FormGroup >
438- ) }
439459 { ! isEdit && ! identity && Settings }
440460 </ >
441461 ) ;
0 commit comments