Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: small fixes for the interactive demo guide #3713

Merged
merged 4 commits into from
May 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions frontend/src/component/demo/DemoSteps/DemoSteps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,15 @@ export const DemoSteps = ({
const currentStep = currentTopic.steps[step];
if (!currentStep) return;

if (
currentStep.href &&
!location.pathname.endsWith(currentStep.href.split('?')[0])
) {
navigate(currentStep.href);
}

waitForLoad(currentStep);
setTimeout(() => {
if (
currentStep.href &&
!location.pathname.endsWith(currentStep.href.split('?')[0])
) {
navigate(currentStep.href);
}
waitForLoad(currentStep);
}, currentStep.delay ?? 0);
}, [topic, step]);

useEffect(() => {
Expand Down Expand Up @@ -247,7 +248,7 @@ export const DemoSteps = ({
disableAnimation: true,
styles: {
floater: {
filter: `drop-shadow(${theme.palette.primary.main} 0px 0px 3px)`,
filter: `drop-shadow(rgba(32, 32, 33, .2) 0px 4px 12px)`,
},
},
}}
Expand All @@ -263,7 +264,7 @@ export const DemoSteps = ({
animation: 'pulse 2s infinite',
},
overlay: {
backgroundColor: 'rgba(0, 0, 0, 0.3)',
backgroundColor: 'rgba(0, 0, 0, 0.4)',
},
}}
tooltipComponent={(
Expand Down
1 change: 1 addition & 0 deletions frontend/src/component/demo/DemoTopics/DemoTopics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const StyledAccordion = styled(Accordion)(({ theme }) => ({
width: '100%',
maxWidth: theme.spacing(30),
zIndex: theme.zIndex.fab,
boxShadow: theme.boxShadows.popup,
'&&&': {
borderRadius: 0,
borderTopLeftRadius: theme.shape.borderRadiusLarge,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/demo/demo-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const gradualRollout = async () => {
constraints: [],
parameters: {
rollout: '50',
stickiness: 'userId',
stickiness: 'default',
groupId: featureId,
},
}),
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/component/demo/demo-topics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export interface ITutorialTopicStep extends Step {
anyClick?: boolean;
optional?: boolean;
focus?: boolean | string;
delay?: number;
}

export interface ITutorialTopic {
Expand Down Expand Up @@ -252,6 +253,7 @@ export const TOPICS: ITutorialTopic[] = [
</>
),
nextButton: true,
delay: 500,
},
],
},
Expand Down Expand Up @@ -355,6 +357,7 @@ export const TOPICS: ITutorialTopic[] = [
</>
),
nextButton: true,
delay: 500,
},
],
},
Expand Down Expand Up @@ -521,6 +524,7 @@ export const TOPICS: ITutorialTopic[] = [
</>
),
nextButton: true,
delay: 500,
},
],
},
Expand Down