mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	feat: demo sorts features by name (#3663)
https://linear.app/unleash/issue/2-983/can-we-we-reverse-order-of-the-toggles This PR makes it so that, on topic navigation to the project overview page, we assume a feature toggle name sorting by default:  Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item: #3537
This commit is contained in:
		
							parent
							
								
									f172c8851f
								
							
						
					
					
						commit
						2e1064b1f7
					
				| @ -193,7 +193,10 @@ export const DemoSteps = ({ | |||||||
|         const currentStep = currentTopic.steps[currentStepIndex]; |         const currentStep = currentTopic.steps[currentStepIndex]; | ||||||
|         if (!currentStep) return; |         if (!currentStep) return; | ||||||
| 
 | 
 | ||||||
|         if (currentStep.href && location.pathname !== currentStep.href) { |         if ( | ||||||
|  |             currentStep.href && | ||||||
|  |             location.pathname !== currentStep.href.split('?')[0] | ||||||
|  |         ) { | ||||||
|             navigate(currentStep.href); |             navigate(currentStep.href); | ||||||
|         } |         } | ||||||
|         waitForLoad(currentStep); |         waitForLoad(currentStep); | ||||||
|  | |||||||
| @ -34,7 +34,7 @@ export const TOPICS: ITutorialTopic[] = [ | |||||||
|         title: 'Enable/disable a feature toggle', |         title: 'Enable/disable a feature toggle', | ||||||
|         steps: [ |         steps: [ | ||||||
|             { |             { | ||||||
|                 href: `/projects/${PROJECT}`, |                 href: `/projects/${PROJECT}?sort=name`, | ||||||
|                 target: 'body', |                 target: 'body', | ||||||
|                 placement: 'center', |                 placement: 'center', | ||||||
|                 content: ( |                 content: ( | ||||||
| @ -63,7 +63,7 @@ export const TOPICS: ITutorialTopic[] = [ | |||||||
|                 nextButton: true, |                 nextButton: true, | ||||||
|             }, |             }, | ||||||
|             { |             { | ||||||
|                 href: `/projects/${PROJECT}`, |                 href: `/projects/${PROJECT}?sort=name`, | ||||||
|                 target: `div[data-testid="TOGGLE-demoApp.step1-${ENVIRONMENT}"]`, |                 target: `div[data-testid="TOGGLE-demoApp.step1-${ENVIRONMENT}"]`, | ||||||
|                 content: ( |                 content: ( | ||||||
|                     <> |                     <> | ||||||
| @ -87,7 +87,7 @@ export const TOPICS: ITutorialTopic[] = [ | |||||||
|         title: 'Enable for a specific user', |         title: 'Enable for a specific user', | ||||||
|         steps: [ |         steps: [ | ||||||
|             { |             { | ||||||
|                 href: `/projects/${PROJECT}`, |                 href: `/projects/${PROJECT}?sort=name`, | ||||||
|                 target: 'body', |                 target: 'body', | ||||||
|                 placement: 'center', |                 placement: 'center', | ||||||
|                 content: ( |                 content: ( | ||||||
| @ -111,7 +111,7 @@ export const TOPICS: ITutorialTopic[] = [ | |||||||
|                 nextButton: true, |                 nextButton: true, | ||||||
|             }, |             }, | ||||||
|             { |             { | ||||||
|                 href: `/projects/${PROJECT}`, |                 href: `/projects/${PROJECT}?sort=name`, | ||||||
|                 target: `a[href="${basePath}/projects/${PROJECT}/features/demoApp.step2"]`, |                 target: `a[href="${basePath}/projects/${PROJECT}/features/demoApp.step2"]`, | ||||||
|                 content: ( |                 content: ( | ||||||
|                     <Description> |                     <Description> | ||||||
| @ -263,7 +263,7 @@ export const TOPICS: ITutorialTopic[] = [ | |||||||
|         setup: gradualRollout, |         setup: gradualRollout, | ||||||
|         steps: [ |         steps: [ | ||||||
|             { |             { | ||||||
|                 href: `/projects/${PROJECT}`, |                 href: `/projects/${PROJECT}?sort=name`, | ||||||
|                 target: 'body', |                 target: 'body', | ||||||
|                 placement: 'center', |                 placement: 'center', | ||||||
|                 content: ( |                 content: ( | ||||||
| @ -293,7 +293,7 @@ export const TOPICS: ITutorialTopic[] = [ | |||||||
|                 nextButton: true, |                 nextButton: true, | ||||||
|             }, |             }, | ||||||
|             { |             { | ||||||
|                 href: `/projects/${PROJECT}`, |                 href: `/projects/${PROJECT}?sort=name`, | ||||||
|                 target: `a[href="${basePath}/projects/${PROJECT}/features/demoApp.step3"]`, |                 target: `a[href="${basePath}/projects/${PROJECT}/features/demoApp.step3"]`, | ||||||
|                 content: ( |                 content: ( | ||||||
|                     <Description> |                     <Description> | ||||||
| @ -369,7 +369,7 @@ export const TOPICS: ITutorialTopic[] = [ | |||||||
|         setup: variants, |         setup: variants, | ||||||
|         steps: [ |         steps: [ | ||||||
|             { |             { | ||||||
|                 href: `/projects/${PROJECT}`, |                 href: `/projects/${PROJECT}?sort=name`, | ||||||
|                 target: 'body', |                 target: 'body', | ||||||
|                 placement: 'center', |                 placement: 'center', | ||||||
|                 content: ( |                 content: ( | ||||||
| @ -394,7 +394,7 @@ export const TOPICS: ITutorialTopic[] = [ | |||||||
|                 nextButton: true, |                 nextButton: true, | ||||||
|             }, |             }, | ||||||
|             { |             { | ||||||
|                 href: `/projects/${PROJECT}`, |                 href: `/projects/${PROJECT}?sort=name`, | ||||||
|                 target: `a[href="${basePath}/projects/${PROJECT}/features/demoApp.step4"]`, |                 target: `a[href="${basePath}/projects/${PROJECT}/features/demoApp.step4"]`, | ||||||
|                 content: ( |                 content: ( | ||||||
|                     <Description> |                     <Description> | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user