2023-04-19 20:40:29 +02:00
|
|
|
import { Typography, TypographyProps } from '@mui/material';
|
|
|
|
import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
|
|
|
|
import { Badge } from 'component/common/Badge/Badge';
|
|
|
|
import { Step } from 'react-joyride';
|
|
|
|
import { gradualRollout, variants } from './demo-setup';
|
2023-04-27 09:15:17 +02:00
|
|
|
import { basePath } from 'utils/formatPath';
|
2023-04-19 20:40:29 +02:00
|
|
|
|
|
|
|
export interface ITutorialTopicStep extends Step {
|
|
|
|
href?: string;
|
|
|
|
nextButton?: boolean;
|
|
|
|
backCloseModal?: boolean;
|
|
|
|
backCollapseExpanded?: boolean;
|
|
|
|
preventDefault?: boolean;
|
|
|
|
anyClick?: boolean;
|
|
|
|
optional?: boolean;
|
2023-04-28 13:54:58 +02:00
|
|
|
focus?: boolean | string;
|
2023-05-09 09:04:39 +02:00
|
|
|
delay?: number;
|
2023-04-19 20:40:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface ITutorialTopic {
|
|
|
|
title: string;
|
|
|
|
setup?: () => Promise<void>;
|
|
|
|
steps: ITutorialTopicStep[];
|
|
|
|
}
|
|
|
|
|
|
|
|
const Description = (props: TypographyProps) => (
|
|
|
|
<Typography variant="body2" color="text.secondary" {...props} />
|
|
|
|
);
|
|
|
|
|
2023-04-27 09:15:17 +02:00
|
|
|
const PROJECT = 'demo-app';
|
|
|
|
const ENVIRONMENT = 'dev';
|
|
|
|
|
2023-04-19 20:40:29 +02:00
|
|
|
export const TOPICS: ITutorialTopic[] = [
|
|
|
|
{
|
|
|
|
title: 'Enable/disable a feature toggle',
|
|
|
|
steps: [
|
|
|
|
{
|
2023-05-02 15:20:23 +02:00
|
|
|
href: `/projects/${PROJECT}?sort=name`,
|
2023-04-19 20:40:29 +02:00
|
|
|
target: 'body',
|
|
|
|
placement: 'center',
|
|
|
|
content: (
|
|
|
|
<>
|
|
|
|
<Description>
|
|
|
|
<a
|
|
|
|
href="https://docs.getunleash.io/reference/feature-toggles"
|
|
|
|
target="_blank"
|
|
|
|
>
|
|
|
|
Feature toggles
|
|
|
|
</a>{' '}
|
|
|
|
are the central concept of Unleash.
|
|
|
|
</Description>
|
|
|
|
<Description sx={{ mt: 1 }}>
|
|
|
|
Feature toggles are organized within{' '}
|
|
|
|
<a
|
|
|
|
href="https://docs.getunleash.io/reference/projects"
|
|
|
|
target="_blank"
|
|
|
|
>
|
|
|
|
projects
|
|
|
|
</a>
|
|
|
|
.
|
|
|
|
</Description>
|
|
|
|
</>
|
|
|
|
),
|
|
|
|
nextButton: true,
|
|
|
|
},
|
|
|
|
{
|
2023-05-02 15:20:23 +02:00
|
|
|
href: `/projects/${PROJECT}?sort=name`,
|
2023-04-27 09:15:17 +02:00
|
|
|
target: `div[data-testid="TOGGLE-demoApp.step1-${ENVIRONMENT}"]`,
|
2023-04-19 20:40:29 +02:00
|
|
|
content: (
|
|
|
|
<>
|
|
|
|
<Description>
|
|
|
|
The simplest way to use a feature toggle is to
|
|
|
|
enable or disable it for everyone (on/off).
|
|
|
|
</Description>
|
|
|
|
<Badge
|
|
|
|
sx={{ marginTop: 2 }}
|
|
|
|
icon={<InfoOutlinedIcon />}
|
|
|
|
>
|
|
|
|
Look at the demo page when toggling!
|
|
|
|
</Badge>
|
|
|
|
</>
|
|
|
|
),
|
|
|
|
nextButton: true,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: 'Enable for a specific user',
|
|
|
|
steps: [
|
|
|
|
{
|
2023-05-02 15:20:23 +02:00
|
|
|
href: `/projects/${PROJECT}?sort=name`,
|
2023-04-19 20:40:29 +02:00
|
|
|
target: 'body',
|
|
|
|
placement: 'center',
|
|
|
|
content: (
|
|
|
|
<>
|
|
|
|
<Description>
|
|
|
|
<a
|
|
|
|
href="https://docs.getunleash.io/reference/activation-strategies"
|
|
|
|
target="_blank"
|
|
|
|
>
|
|
|
|
Activation strategies
|
|
|
|
</a>{' '}
|
|
|
|
give you more control over when a feature should be
|
|
|
|
enabled.
|
|
|
|
</Description>
|
|
|
|
<Description sx={{ mt: 1 }}>
|
|
|
|
Let's try enabling a feature toggle only for a
|
|
|
|
specific user.
|
|
|
|
</Description>
|
|
|
|
</>
|
|
|
|
),
|
|
|
|
nextButton: true,
|
|
|
|
},
|
|
|
|
{
|
2023-05-02 15:20:23 +02:00
|
|
|
href: `/projects/${PROJECT}?sort=name`,
|
2023-04-27 09:15:17 +02:00
|
|
|
target: `a[href="${basePath}/projects/${PROJECT}/features/demoApp.step2"]`,
|
2023-04-19 20:40:29 +02:00
|
|
|
content: (
|
|
|
|
<Description>
|
|
|
|
First, let's open the feature toggle configuration for{' '}
|
2023-04-27 09:15:17 +02:00
|
|
|
<Badge as="span">demoApp.step2</Badge>
|
2023-04-19 20:40:29 +02:00
|
|
|
</Description>
|
|
|
|
),
|
|
|
|
preventDefault: true,
|
|
|
|
},
|
|
|
|
{
|
2023-04-27 09:15:17 +02:00
|
|
|
href: `/projects/${PROJECT}/features/demoApp.step2`,
|
|
|
|
target: `div[data-testid="FEATURE_ENVIRONMENT_ACCORDION_${ENVIRONMENT}"] button`,
|
2023-04-19 20:40:29 +02:00
|
|
|
content: (
|
|
|
|
<Description>
|
|
|
|
Add a new strategy to this environment by clicking this
|
|
|
|
button.
|
|
|
|
</Description>
|
|
|
|
),
|
|
|
|
},
|
|
|
|
{
|
2023-04-27 09:15:17 +02:00
|
|
|
target: `a[href="${basePath}/projects/${PROJECT}/features/demoApp.step2/strategies/create?environmentId=${ENVIRONMENT}&strategyName=default"]`,
|
2023-04-19 20:40:29 +02:00
|
|
|
content: (
|
|
|
|
<Description>
|
2023-04-24 14:02:06 +02:00
|
|
|
Select the <Badge as="span">Standard</Badge> strategy
|
2023-04-19 20:40:29 +02:00
|
|
|
type.
|
|
|
|
</Description>
|
|
|
|
),
|
|
|
|
placement: 'right',
|
|
|
|
backCloseModal: true,
|
|
|
|
},
|
|
|
|
{
|
2023-04-24 14:02:06 +02:00
|
|
|
target: 'button[data-testid="ADD_CONSTRAINT_BUTTON"]',
|
|
|
|
content: (
|
|
|
|
<>
|
|
|
|
<Description>
|
|
|
|
<a
|
|
|
|
href="https://docs.getunleash.io/reference/strategy-constraints"
|
|
|
|
target="_blank"
|
|
|
|
>
|
|
|
|
Strategy constraints
|
|
|
|
</a>{' '}
|
|
|
|
are conditions that must be satisfied for an{' '}
|
|
|
|
<a
|
|
|
|
href="https://docs.getunleash.io/reference/activation-strategies"
|
|
|
|
target="_blank"
|
|
|
|
>
|
|
|
|
activation strategy
|
|
|
|
</a>{' '}
|
|
|
|
to be evaluated for a feature toggle.
|
|
|
|
</Description>
|
|
|
|
<Description sx={{ mt: 1 }}>
|
|
|
|
Click this button to add a constraint.
|
|
|
|
</Description>
|
|
|
|
</>
|
|
|
|
),
|
|
|
|
backCloseModal: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
target: '#context-field-select',
|
|
|
|
content: (
|
|
|
|
<Description>
|
|
|
|
<a
|
|
|
|
href="https://docs.getunleash.io/reference/unleash-context"
|
|
|
|
target="_blank"
|
|
|
|
>
|
|
|
|
Unleash context
|
|
|
|
</a>{' '}
|
|
|
|
contains information relating to the current feature
|
|
|
|
toggle request.
|
|
|
|
</Description>
|
|
|
|
),
|
|
|
|
backCloseModal: true,
|
|
|
|
anyClick: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
target: 'li[data-testid="SELECT_ITEM_ID-userId"]',
|
|
|
|
content: (
|
|
|
|
<Description>
|
|
|
|
Select the <Badge as="span">userId</Badge> context
|
|
|
|
field.
|
|
|
|
</Description>
|
|
|
|
),
|
|
|
|
placement: 'right',
|
|
|
|
backCloseModal: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
target: 'div[data-testid="CONSTRAINT_VALUES_INPUT"]',
|
2023-04-19 20:40:29 +02:00
|
|
|
content: (
|
|
|
|
<>
|
|
|
|
<Description>
|
2023-04-27 09:15:17 +02:00
|
|
|
Enter your <Badge as="span">userId</Badge>
|
2023-04-19 20:40:29 +02:00
|
|
|
</Description>
|
|
|
|
<Badge
|
|
|
|
sx={{ marginTop: 2 }}
|
|
|
|
icon={<InfoOutlinedIcon />}
|
|
|
|
>
|
|
|
|
You can find your userId on the demo page.
|
|
|
|
</Badge>
|
|
|
|
</>
|
|
|
|
),
|
|
|
|
nextButton: true,
|
2023-04-28 13:54:58 +02:00
|
|
|
focus: 'input',
|
2023-04-24 14:02:06 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
target: 'button[data-testid="CONSTRAINT_VALUES_ADD_BUTTON"]',
|
|
|
|
content: <Description>Add the constraint value.</Description>,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
target: 'button[data-testid="CONSTRAINT_SAVE_BUTTON"]',
|
|
|
|
content: <Description>Save the constraint.</Description>,
|
2023-04-19 20:40:29 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
target: 'button[data-testid="STRATEGY_FORM_SUBMIT_ID"]',
|
2023-05-03 20:47:35 +02:00
|
|
|
content: <Description>Save your strategy.</Description>,
|
2023-04-24 14:02:06 +02:00
|
|
|
backCloseModal: true,
|
2023-04-19 20:40:29 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
target: 'button[data-testid="DIALOGUE_CONFIRM_ID"]',
|
2023-05-03 20:47:35 +02:00
|
|
|
content: <Description>Confirm your changes.</Description>,
|
|
|
|
optional: true,
|
|
|
|
backCloseModal: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
href: `/projects/${PROJECT}?sort=name`,
|
|
|
|
target: `div[data-testid="TOGGLE-demoApp.step2-${ENVIRONMENT}"]`,
|
2023-04-19 20:40:29 +02:00
|
|
|
content: (
|
|
|
|
<>
|
2023-05-03 20:47:35 +02:00
|
|
|
<Description>
|
|
|
|
Finally, toggle{' '}
|
|
|
|
<Badge as="span">demoApp.step2</Badge>
|
|
|
|
</Description>
|
2023-04-19 20:40:29 +02:00
|
|
|
<Badge
|
|
|
|
sx={{ marginTop: 2 }}
|
|
|
|
icon={<InfoOutlinedIcon />}
|
|
|
|
>
|
2023-05-03 20:47:35 +02:00
|
|
|
Look at the demo page to see your changes!
|
2023-04-19 20:40:29 +02:00
|
|
|
</Badge>
|
|
|
|
</>
|
|
|
|
),
|
2023-05-03 20:47:35 +02:00
|
|
|
nextButton: true,
|
2023-05-09 09:04:39 +02:00
|
|
|
delay: 500,
|
2023-04-19 20:40:29 +02:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: 'Adjust gradual rollout',
|
|
|
|
setup: gradualRollout,
|
|
|
|
steps: [
|
|
|
|
{
|
2023-05-02 15:20:23 +02:00
|
|
|
href: `/projects/${PROJECT}?sort=name`,
|
2023-04-19 20:40:29 +02:00
|
|
|
target: 'body',
|
|
|
|
placement: 'center',
|
|
|
|
content: (
|
|
|
|
<>
|
|
|
|
<Description>
|
|
|
|
<a
|
|
|
|
href="https://docs.getunleash.io/reference/activation-strategies#gradual-rollout"
|
|
|
|
target="_blank"
|
|
|
|
>
|
|
|
|
Gradual rollout
|
|
|
|
</a>{' '}
|
|
|
|
is one of the available{' '}
|
|
|
|
<a
|
|
|
|
href="https://docs.getunleash.io/reference/activation-strategies"
|
|
|
|
target="_blank"
|
|
|
|
>
|
|
|
|
activation strategies
|
|
|
|
</a>
|
|
|
|
.
|
|
|
|
</Description>
|
|
|
|
<Description sx={{ mt: 1 }}>
|
|
|
|
Let's try enabling a feature toggle only for a
|
|
|
|
certain percentage of users.
|
|
|
|
</Description>
|
|
|
|
</>
|
|
|
|
),
|
|
|
|
nextButton: true,
|
|
|
|
},
|
|
|
|
{
|
2023-05-02 15:20:23 +02:00
|
|
|
href: `/projects/${PROJECT}?sort=name`,
|
2023-04-27 09:15:17 +02:00
|
|
|
target: `a[href="${basePath}/projects/${PROJECT}/features/demoApp.step3"]`,
|
2023-04-19 20:40:29 +02:00
|
|
|
content: (
|
|
|
|
<Description>
|
|
|
|
First, let's open the feature toggle configuration for{' '}
|
2023-04-27 09:15:17 +02:00
|
|
|
<Badge as="span">demoApp.step3</Badge>
|
2023-04-19 20:40:29 +02:00
|
|
|
</Description>
|
|
|
|
),
|
|
|
|
preventDefault: true,
|
|
|
|
},
|
|
|
|
{
|
2023-04-27 09:15:17 +02:00
|
|
|
href: `/projects/${PROJECT}/features/demoApp.step3`,
|
|
|
|
target: `div[data-testid="FEATURE_ENVIRONMENT_ACCORDION_${ENVIRONMENT}"] .MuiAccordionSummary-expandIconWrapper`,
|
2023-04-19 20:40:29 +02:00
|
|
|
content: (
|
|
|
|
<Description>
|
|
|
|
Expand the environment card to see all the defined
|
|
|
|
strategies.
|
|
|
|
</Description>
|
|
|
|
),
|
|
|
|
},
|
|
|
|
{
|
2023-04-27 09:15:17 +02:00
|
|
|
target: `div[data-testid="FEATURE_ENVIRONMENT_ACCORDION_${ENVIRONMENT}"].Mui-expanded a[data-testid="STRATEGY_EDIT-flexibleRollout"]`,
|
2023-04-19 20:40:29 +02:00
|
|
|
content: (
|
|
|
|
<Description>
|
|
|
|
Edit the existing gradual rollout strategy.
|
|
|
|
</Description>
|
|
|
|
),
|
|
|
|
backCollapseExpanded: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
target: 'span[data-testid="ROLLOUT_SLIDER_ID"]',
|
|
|
|
content: (
|
|
|
|
<Description>Change the rollout percentage.</Description>
|
|
|
|
),
|
|
|
|
backCloseModal: true,
|
2023-04-24 14:02:06 +02:00
|
|
|
nextButton: true,
|
2023-04-19 20:40:29 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
target: 'button[data-testid="STRATEGY_FORM_SUBMIT_ID"]',
|
2023-05-03 20:47:35 +02:00
|
|
|
content: <Description>Save your strategy.</Description>,
|
2023-04-19 20:40:29 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
target: 'button[data-testid="DIALOGUE_CONFIRM_ID"]',
|
2023-05-03 20:47:35 +02:00
|
|
|
content: <Description>Confirm your changes.</Description>,
|
|
|
|
optional: true,
|
|
|
|
backCloseModal: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
href: `/projects/${PROJECT}?sort=name`,
|
|
|
|
target: `div[data-testid="TOGGLE-demoApp.step3-${ENVIRONMENT}"]`,
|
2023-04-19 20:40:29 +02:00
|
|
|
content: (
|
|
|
|
<>
|
2023-05-03 20:47:35 +02:00
|
|
|
<Description>
|
|
|
|
Finally, toggle{' '}
|
|
|
|
<Badge as="span">demoApp.step3</Badge>
|
|
|
|
</Description>
|
2023-04-19 20:40:29 +02:00
|
|
|
<Badge
|
|
|
|
sx={{ marginTop: 2 }}
|
|
|
|
icon={<InfoOutlinedIcon />}
|
|
|
|
>
|
2023-05-03 20:47:35 +02:00
|
|
|
Look at the demo page to see your changes!
|
2023-04-19 20:40:29 +02:00
|
|
|
</Badge>
|
|
|
|
</>
|
|
|
|
),
|
2023-05-03 20:47:35 +02:00
|
|
|
nextButton: true,
|
2023-05-09 09:04:39 +02:00
|
|
|
delay: 500,
|
2023-04-19 20:40:29 +02:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: 'Adjust variants',
|
|
|
|
setup: variants,
|
|
|
|
steps: [
|
|
|
|
{
|
2023-05-02 15:20:23 +02:00
|
|
|
href: `/projects/${PROJECT}?sort=name`,
|
2023-04-19 20:40:29 +02:00
|
|
|
target: 'body',
|
|
|
|
placement: 'center',
|
|
|
|
content: (
|
|
|
|
<>
|
|
|
|
<Description>
|
|
|
|
<a
|
|
|
|
href="https://docs.getunleash.io/reference/feature-toggle-variants"
|
|
|
|
target="_blank"
|
|
|
|
>
|
|
|
|
Feature toggle variants
|
|
|
|
</a>{' '}
|
|
|
|
allow you to define different values for a feature
|
|
|
|
toggle. They can be used for A/B testing or
|
|
|
|
segmenting your users.
|
|
|
|
</Description>
|
|
|
|
<Description sx={{ mt: 1 }}>
|
|
|
|
Let's try adding a variant to a feature toggle,
|
|
|
|
along with an override so our user can see it.
|
|
|
|
</Description>
|
|
|
|
</>
|
|
|
|
),
|
|
|
|
nextButton: true,
|
|
|
|
},
|
|
|
|
{
|
2023-05-02 15:20:23 +02:00
|
|
|
href: `/projects/${PROJECT}?sort=name`,
|
2023-04-27 09:15:17 +02:00
|
|
|
target: `a[href="${basePath}/projects/${PROJECT}/features/demoApp.step4"]`,
|
2023-04-19 20:40:29 +02:00
|
|
|
content: (
|
|
|
|
<Description>
|
2023-05-09 12:47:55 +02:00
|
|
|
First, open the feature toggle configuration for{' '}
|
|
|
|
<Badge as="span">demoApp.step4</Badge> by using this
|
|
|
|
link.
|
2023-04-19 20:40:29 +02:00
|
|
|
</Description>
|
|
|
|
),
|
|
|
|
preventDefault: true,
|
|
|
|
},
|
|
|
|
{
|
2023-04-27 09:15:17 +02:00
|
|
|
href: `/projects/${PROJECT}/features/demoApp.step4`,
|
2023-04-19 20:40:29 +02:00
|
|
|
target: 'button[data-testid="TAB-Variants"]',
|
2023-05-09 12:47:55 +02:00
|
|
|
content: <Description>Select the "Variants" tab.</Description>,
|
2023-04-19 20:40:29 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
target: 'button[data-testid="EDIT_VARIANTS_BUTTON"]',
|
2023-05-09 12:47:55 +02:00
|
|
|
content: (
|
|
|
|
<Description>
|
|
|
|
Edit the existing variants by using this button.
|
|
|
|
</Description>
|
|
|
|
),
|
2023-04-19 20:40:29 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
target: 'button[data-testid="MODAL_ADD_VARIANT_BUTTON"]',
|
|
|
|
content: (
|
2023-05-09 12:47:55 +02:00
|
|
|
<Description>
|
|
|
|
Add a new variant to the list by using this button.
|
|
|
|
</Description>
|
2023-04-19 20:40:29 +02:00
|
|
|
),
|
|
|
|
backCloseModal: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
target: 'div[data-testid="VARIANT"]:last-of-type div[data-testid="VARIANT_NAME_INPUT"]',
|
|
|
|
content: (
|
|
|
|
<>
|
|
|
|
<Description>
|
2023-05-09 12:47:55 +02:00
|
|
|
Enter a unique name for your variant.
|
|
|
|
</Description>
|
|
|
|
<Description sx={{ mt: 1 }}>
|
|
|
|
When you're done, use the "Next" button in the
|
|
|
|
dialog.
|
2023-04-19 20:40:29 +02:00
|
|
|
</Description>
|
|
|
|
</>
|
|
|
|
),
|
|
|
|
backCloseModal: true,
|
|
|
|
nextButton: true,
|
2023-04-28 13:54:58 +02:00
|
|
|
focus: 'input',
|
2023-04-19 20:40:29 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
target: 'div[data-testid="VARIANT"]:last-of-type #variant-payload-value',
|
|
|
|
content: (
|
2023-05-09 12:47:55 +02:00
|
|
|
<>
|
|
|
|
<Description>
|
|
|
|
Enter a{' '}
|
|
|
|
<a
|
|
|
|
href="https://developer.mozilla.org/en-US/docs/Web/CSS/named-color"
|
|
|
|
target="_blank"
|
|
|
|
>
|
|
|
|
color
|
|
|
|
</a>{' '}
|
|
|
|
as the payload. It will be passed along and used in
|
|
|
|
the demo website.
|
|
|
|
</Description>
|
|
|
|
<Description sx={{ mt: 1 }}>
|
|
|
|
It can be any color. For example, you can use one of
|
|
|
|
these: <Badge as="span">teal</Badge>,{' '}
|
|
|
|
<Badge as="span">orange</Badge> or{' '}
|
|
|
|
<Badge as="span">purple</Badge>
|
|
|
|
</Description>
|
|
|
|
<Description sx={{ mt: 1 }}>
|
|
|
|
When you're done, use the "Next" button in the
|
|
|
|
dialog.
|
|
|
|
</Description>
|
|
|
|
</>
|
2023-04-19 20:40:29 +02:00
|
|
|
),
|
|
|
|
nextButton: true,
|
2023-04-28 13:54:58 +02:00
|
|
|
focus: true,
|
2023-04-19 20:40:29 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
target: 'div[data-testid="VARIANT"]:last-of-type button[data-testid="VARIANT_ADD_OVERRIDE_BUTTON"]',
|
|
|
|
content: (
|
2023-05-09 12:47:55 +02:00
|
|
|
<>
|
|
|
|
<Description>
|
|
|
|
By adding an override, we can specify that your user
|
|
|
|
will always get this variant.
|
|
|
|
</Description>
|
|
|
|
<Description sx={{ mt: 1 }}>
|
|
|
|
Let's add an override for your user by using this
|
|
|
|
button.
|
|
|
|
</Description>
|
|
|
|
</>
|
2023-04-19 20:40:29 +02:00
|
|
|
),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
target: 'div[data-testid="VARIANT"]:last-of-type #override-context-name',
|
2023-05-09 12:47:55 +02:00
|
|
|
content: (
|
|
|
|
<Description>
|
|
|
|
Select the context field by using this dropdown.
|
|
|
|
</Description>
|
|
|
|
),
|
2023-04-19 20:40:29 +02:00
|
|
|
anyClick: true,
|
|
|
|
backCloseModal: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
target: 'li[data-testid="SELECT_ITEM_ID-userId"]',
|
|
|
|
content: (
|
|
|
|
<Description>
|
|
|
|
Select the <Badge as="span">userId</Badge> context
|
|
|
|
field.
|
|
|
|
</Description>
|
|
|
|
),
|
|
|
|
placement: 'right',
|
|
|
|
backCloseModal: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
target: 'div[data-testid="VARIANT"]:last-of-type div[data-testid="OVERRIDE_VALUES"]',
|
|
|
|
content: (
|
|
|
|
<>
|
|
|
|
<Description>
|
2023-04-27 09:15:17 +02:00
|
|
|
Enter your <Badge as="span">userId</Badge>
|
2023-04-19 20:40:29 +02:00
|
|
|
</Description>
|
|
|
|
<Badge
|
|
|
|
sx={{ marginTop: 2 }}
|
|
|
|
icon={<InfoOutlinedIcon />}
|
|
|
|
>
|
|
|
|
You can find your userId on the demo page.
|
|
|
|
</Badge>
|
2023-05-09 12:47:55 +02:00
|
|
|
<Description sx={{ mt: 1 }}>
|
|
|
|
When you're done, use the "Next" button in the
|
|
|
|
dialog.
|
|
|
|
</Description>
|
2023-04-19 20:40:29 +02:00
|
|
|
</>
|
|
|
|
),
|
|
|
|
nextButton: true,
|
|
|
|
backCloseModal: true,
|
2023-04-28 13:54:58 +02:00
|
|
|
focus: 'input',
|
2023-04-19 20:40:29 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
target: 'button[data-testid="DIALOGUE_CONFIRM_ID"]',
|
2023-05-09 12:47:55 +02:00
|
|
|
content: (
|
|
|
|
<Description>
|
|
|
|
Save your variants by using this button.
|
|
|
|
</Description>
|
|
|
|
),
|
2023-05-03 20:47:35 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
href: `/projects/${PROJECT}?sort=name`,
|
|
|
|
target: `div[data-testid="TOGGLE-demoApp.step4-${ENVIRONMENT}"]`,
|
2023-04-19 20:40:29 +02:00
|
|
|
content: (
|
|
|
|
<>
|
|
|
|
<Description>
|
2023-05-09 12:47:55 +02:00
|
|
|
Finally, enable or disable the feature with the new
|
|
|
|
variant by toggling the highlighted switch.
|
2023-04-19 20:40:29 +02:00
|
|
|
</Description>
|
2023-05-09 12:47:55 +02:00
|
|
|
<Badge sx={{ mt: 2 }} icon={<InfoOutlinedIcon />}>
|
2023-05-03 20:47:35 +02:00
|
|
|
Look at the demo page to see your changes!
|
2023-04-19 20:40:29 +02:00
|
|
|
</Badge>
|
|
|
|
</>
|
|
|
|
),
|
2023-05-03 20:47:35 +02:00
|
|
|
nextButton: true,
|
2023-05-09 09:04:39 +02:00
|
|
|
delay: 500,
|
2023-04-19 20:40:29 +02:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
];
|