mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	fix: Performance improvements for demo and docs update (#4454)
This commit is contained in:
		
							parent
							
								
									b927ef8b70
								
							
						
					
					
						commit
						c549280e31
					
				| @ -266,6 +266,12 @@ const copyButtonsActiveInOtherEnv = async () => { | |||||||
|     expect(customEnvStrategyCopyButton).not.toBeDisabled(); |     expect(customEnvStrategyCopyButton).not.toBeDisabled(); | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  | const openEnvironments = async (envNames: string[]) => { | ||||||
|  |     for (const env of envNames) { | ||||||
|  |         (await screen.findAllByText(env))[1].click(); | ||||||
|  |     } | ||||||
|  | }; | ||||||
|  | 
 | ||||||
| test('open mode + non-project member can perform basic change request actions', async () => { | test('open mode + non-project member can perform basic change request actions', async () => { | ||||||
|     const project = 'default'; |     const project = 'default'; | ||||||
|     const featureName = 'test'; |     const featureName = 'test'; | ||||||
| @ -289,6 +295,8 @@ test('open mode + non-project member can perform basic change request actions', | |||||||
|         </UnleashUiSetup> |         </UnleashUiSetup> | ||||||
|     ); |     ); | ||||||
| 
 | 
 | ||||||
|  |     await openEnvironments(['development', 'production', 'custom']); | ||||||
|  | 
 | ||||||
|     await strategiesAreDisplayed('UserIDs', 'Standard'); |     await strategiesAreDisplayed('UserIDs', 'Standard'); | ||||||
|     await deleteButtonsActiveInChangeRequestEnv(); |     await deleteButtonsActiveInChangeRequestEnv(); | ||||||
|     await copyButtonsActiveInOtherEnv(); |     await copyButtonsActiveInOtherEnv(); | ||||||
| @ -317,6 +325,8 @@ test('protected mode + project member can perform basic change request actions', | |||||||
|         </UnleashUiSetup> |         </UnleashUiSetup> | ||||||
|     ); |     ); | ||||||
| 
 | 
 | ||||||
|  |     await openEnvironments(['development', 'production', 'custom']); | ||||||
|  | 
 | ||||||
|     await strategiesAreDisplayed('UserIDs', 'Standard'); |     await strategiesAreDisplayed('UserIDs', 'Standard'); | ||||||
|     await deleteButtonsActiveInChangeRequestEnv(); |     await deleteButtonsActiveInChangeRequestEnv(); | ||||||
|     await copyButtonsActiveInOtherEnv(); |     await copyButtonsActiveInOtherEnv(); | ||||||
| @ -345,6 +355,8 @@ test('protected mode + non-project member cannot perform basic change request ac | |||||||
|         </UnleashUiSetup> |         </UnleashUiSetup> | ||||||
|     ); |     ); | ||||||
| 
 | 
 | ||||||
|  |     await openEnvironments(['development', 'production', 'custom']); | ||||||
|  | 
 | ||||||
|     await strategiesAreDisplayed('UserIDs', 'Standard'); |     await strategiesAreDisplayed('UserIDs', 'Standard'); | ||||||
|     await deleteButtonsInactiveInChangeRequestEnv(); |     await deleteButtonsInactiveInChangeRequestEnv(); | ||||||
|     await copyButtonsActiveInOtherEnv(); |     await copyButtonsActiveInOtherEnv(); | ||||||
|  | |||||||
| @ -429,19 +429,18 @@ export const TOPICS: ITutorialTopic[] = [ | |||||||
|                     <> |                     <> | ||||||
|                         <Description> |                         <Description> | ||||||
|                             <a |                             <a | ||||||
|                                 href="https://docs.getunleash.io/reference/feature-toggle-variants" |                                 href="https://docs.getunleash.io/reference/strategy-variants" | ||||||
|                                 target="_blank" |                                 target="_blank" | ||||||
|                                 rel="noreferrer" |                                 rel="noreferrer" | ||||||
|                             > |                             > | ||||||
|                                 Feature toggle variants |                                 Strategy variants | ||||||
|                             </a>{' '} |                             </a>{' '} | ||||||
|                             allow you to define different values for a feature |                             allow you to define different values for a matching | ||||||
|                             toggle. They can be used for A/B testing or |                             strategy. They can be used for A/B testing or | ||||||
|                             segmenting your users. |                             segmenting your users. | ||||||
|                         </Description> |                         </Description> | ||||||
|                         <Description sx={{ mt: 1 }}> |                         <Description sx={{ mt: 1 }}> | ||||||
|                             Let's try adding a variant to a feature toggle, |                             Let's try adding a variant to a strategy. | ||||||
|                             along with an override so our user can see it. |  | ||||||
|                         </Description> |                         </Description> | ||||||
|                     </> |                     </> | ||||||
|                 ), |                 ), | ||||||
|  | |||||||
| @ -141,6 +141,7 @@ const FeatureOverviewEnvironment = ({ | |||||||
|             show={ |             show={ | ||||||
|                 <StyledFeatureOverviewEnvironment enabled={env.enabled}> |                 <StyledFeatureOverviewEnvironment enabled={env.enabled}> | ||||||
|                     <StyledAccordion |                     <StyledAccordion | ||||||
|  |                         TransitionProps={{ mountOnEnter: true }} | ||||||
|                         data-testid={`${FEATURE_ENVIRONMENT_ACCORDION}_${env.name}`} |                         data-testid={`${FEATURE_ENVIRONMENT_ACCORDION}_${env.name}`} | ||||||
|                         className={`environment-accordion ${ |                         className={`environment-accordion ${ | ||||||
|                             env.enabled ? '' : 'accordion-disabled' |                             env.enabled ? '' : 'accordion-disabled' | ||||||
|  | |||||||
| @ -1,9 +1,9 @@ | |||||||
| --- | --- | ||||||
| title: Feature Strategy Variants | title: Strategy Variants | ||||||
| --- | --- | ||||||
| :::info Availability | :::info Availability | ||||||
| 
 | 
 | ||||||
| **Feature strategy variants** were first introduced in Unleash 5.4. | **Strategy variants** were first introduced in Unleash 5.4. | ||||||
| ::: | ::: | ||||||
| 
 | 
 | ||||||
| Gradual rollout strategies in Unleash can have _strategy variants_. _Strategy variants_ allow each matching activation strategy to return not just simple enabled/disabled status, but | Gradual rollout strategies in Unleash can have _strategy variants_. _Strategy variants_ allow each matching activation strategy to return not just simple enabled/disabled status, but | ||||||
| @ -78,7 +78,7 @@ Since strategy variants are part of activation strategies they have full access | |||||||
| 
 | 
 | ||||||
| In the Unleash UI, you can configure variants by navigating to the gradual strategy view, and then choosing the 'Variants' section. | In the Unleash UI, you can configure variants by navigating to the gradual strategy view, and then choosing the 'Variants' section. | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
| 
 | 
 | ||||||
| ## The `disabled` variant | ## The `disabled` variant | ||||||
| 
 | 
 | ||||||
| @ -330,7 +330,7 @@ module.exports = { | |||||||
|                         'reference/impression-data', |                         'reference/impression-data', | ||||||
|                         'reference/custom-activation-strategies', |                         'reference/custom-activation-strategies', | ||||||
|                         'reference/environments', |                         'reference/environments', | ||||||
|                         'reference/feature-strategy-variants', |                         'reference/strategy-variants', | ||||||
|                         'reference/feature-toggles', |                         'reference/feature-toggles', | ||||||
|                         'reference/feature-toggle-types', |                         'reference/feature-toggle-types', | ||||||
|                         'reference/feature-toggle-variants', |                         'reference/feature-toggle-variants', | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user