mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	chore: remove unleash.beta.variants flag
This commit is contained in:
		
							parent
							
								
									73881e2cd4
								
							
						
					
					
						commit
						106085cb63
					
				| @ -9,6 +9,7 @@ The latest version of this document is always available in | ||||
| 
 | ||||
| ## [3.2.3] | ||||
| - fix: Cleanup logut flow | ||||
| - chore: remove unleash.beta.variants flag | ||||
| 
 | ||||
| ## [3.2.2] | ||||
| - fix: Use toggle/on/off endoints to ensure correct state | ||||
|  | ||||
| @ -97,6 +97,11 @@ exports[`renders correctly with one feature 1`] = ` | ||||
|     > | ||||
|       Metrics | ||||
|     </react-mdl-Tab> | ||||
|     <react-mdl-Tab | ||||
|       onClick={[Function]} | ||||
|     > | ||||
|       Variants | ||||
|     </react-mdl-Tab> | ||||
|     <react-mdl-Tab | ||||
|       onClick={[Function]} | ||||
|     > | ||||
|  | ||||
| @ -32,7 +32,6 @@ test('renders correctly with one feature', () => { | ||||
|                 activeTab={'strategies'} | ||||
|                 featureToggleName="another" | ||||
|                 features={[feature]} | ||||
|                 betaFlags={[]} | ||||
|                 featureToggle={feature} | ||||
|                 fetchFeatureToggles={jest.fn()} | ||||
|                 history={{}} | ||||
|  | ||||
| @ -1,18 +1,6 @@ | ||||
| import React from 'react'; | ||||
| import PropTypes from 'prop-types'; | ||||
| import { | ||||
|     Tabs, | ||||
|     Tab, | ||||
|     ProgressBar, | ||||
|     Button, | ||||
|     Card, | ||||
|     CardText, | ||||
|     CardTitle, | ||||
|     CardActions, | ||||
|     Textfield, | ||||
|     Switch, | ||||
|     Badge, | ||||
| } from 'react-mdl'; | ||||
| import { Tabs, Tab, ProgressBar, Button, Card, CardText, CardTitle, CardActions, Textfield, Switch } from 'react-mdl'; | ||||
| import { Link } from 'react-router-dom'; | ||||
| 
 | ||||
| import HistoryComponent from '../history/history-list-toggle-container'; | ||||
| @ -41,7 +29,6 @@ export default class ViewFeatureToggleComponent extends React.Component { | ||||
|         activeTab: PropTypes.string.isRequired, | ||||
|         featureToggleName: PropTypes.string.isRequired, | ||||
|         features: PropTypes.array.isRequired, | ||||
|         betaFlags: PropTypes.array, | ||||
|         toggleFeature: PropTypes.func, | ||||
|         removeFeatureToggle: PropTypes.func, | ||||
|         revive: PropTypes.func, | ||||
| @ -53,10 +40,6 @@ export default class ViewFeatureToggleComponent extends React.Component { | ||||
|         hasPermission: PropTypes.func.isRequired, | ||||
|     }; | ||||
| 
 | ||||
|     static defaultProps = { | ||||
|         betaFlags: [], | ||||
|     }; | ||||
| 
 | ||||
|     componentWillMount() { | ||||
|         if (this.props.features.length === 0) { | ||||
|             if (this.isFeatureView) { | ||||
| @ -102,7 +85,6 @@ export default class ViewFeatureToggleComponent extends React.Component { | ||||
|         const { | ||||
|             featureToggle, | ||||
|             features, | ||||
|             betaFlags, | ||||
|             activeTab, | ||||
|             revive, | ||||
|             // setValue, | ||||
| @ -112,9 +94,6 @@ export default class ViewFeatureToggleComponent extends React.Component { | ||||
|             hasPermission, | ||||
|         } = this.props; | ||||
| 
 | ||||
|         // TODO: Find better solution for this | ||||
|         const showVariants = betaFlags.includes('unleash.beta.variants'); | ||||
| 
 | ||||
|         if (!featureToggle) { | ||||
|             if (features.length === 0) { | ||||
|                 return <ProgressBar indeterminate />; | ||||
| @ -249,15 +228,7 @@ export default class ViewFeatureToggleComponent extends React.Component { | ||||
|                 > | ||||
|                     <Tab onClick={() => this.goToTab('strategies', featureToggleName)}>Strategies</Tab> | ||||
|                     <Tab onClick={() => this.goToTab('view', featureToggleName)}>Metrics</Tab> | ||||
|                     {showVariants ? ( | ||||
|                         <Tab onClick={() => this.goToTab('variants', featureToggleName)}> | ||||
|                             <Badge text="beta" noBackground> | ||||
|                                 Variants | ||||
|                             </Badge> | ||||
|                         </Tab> | ||||
|                     ) : ( | ||||
|                         [] | ||||
|                     )} | ||||
|                     <Tab onClick={() => this.goToTab('variants', featureToggleName)}>Variants</Tab> | ||||
|                     <Tab onClick={() => this.goToTab('history', featureToggleName)}>History</Tab> | ||||
|                 </Tabs> | ||||
|                 {tabContent} | ||||
|  | ||||
| @ -13,11 +13,6 @@ import { hasPermission } from '../../permissions'; | ||||
| export default connect( | ||||
|     (state, props) => ({ | ||||
|         features: state.features.toJS(), | ||||
|         betaFlags: state.features | ||||
|             .toJS() | ||||
|             .filter(t => t.enabled) | ||||
|             .filter(t => t.name.startsWith('unleash.beta')) | ||||
|             .map(t => t.name), | ||||
|         featureToggle: state.features.toJS().find(toggle => toggle.name === props.featureToggleName), | ||||
|         activeTab: props.activeTab, | ||||
|         hasPermission: hasPermission.bind(null, state.user.get('profile')), | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user