Skip to content

Commit

Permalink
disable onboarding (#1211)
Browse files Browse the repository at this point in the history
  • Loading branch information
cescoferraro authored Sep 14, 2022
1 parent 2a66be0 commit 858a836
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 26 deletions.
2 changes: 1 addition & 1 deletion web/cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Cypress.Commands.add('cancelOnBoarding', () => {
const parsedValue = value ? JSON.parse(value) : undefined;

if (!parsedValue || parsedValue.trace === false) {
cy.get('[data-cy=no-thanks]').click();
// cy.get('[data-cy=no-thanks]').click();
}
});

Expand Down
30 changes: 5 additions & 25 deletions web/src/components/Header/HeaderMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,38 +1,18 @@
import {useTour} from '@reactour/tour';
import {Popover, Typography} from 'antd';
import {useMemo} from 'react';
import {useLocation, useParams} from 'react-router-dom';

import {DOCUMENTATION_URL, GITHUB_URL} from 'constants/Common.constants';
import {useGuidedTour} from 'providers/GuidedTour/GuidedTour.provider';
import HomeAnalyticsService from 'services/Analytics/HomeAnalytics.service';
import {useLocation} from 'react-router-dom';
import * as S from './Header.styled';
import {ShowOnboardingContent} from './ShowOnboardingContent';

const {onGuidedTourClick} = HomeAnalyticsService;

export const HeaderMenu = () => {
const {pathname} = useLocation();
const params = useParams();
const {setIsOpen} = useTour();
const {isTriggerVisible, onCloseTrigger, setIsTriggerVisible} = useGuidedTour();

const content = useMemo(
() =>
ShowOnboardingContent(
onGuidedTourClick,
() => setIsOpen(true),
() => onCloseTrigger()
),
[onCloseTrigger, setIsOpen]
);

return (
<Popover
arrowContent={null}
content={content}
content={() => null}
title={() => <Typography.Title level={2}>Take a quick tour of Tracetest?</Typography.Title>}
visible={isTriggerVisible}
visible={false}
>
<S.NavMenu
selectedKeys={[pathname]}
Expand All @@ -59,9 +39,9 @@ export const HeaderMenu = () => {
},
{
key: 'Onboarding',
disabled: !params.runId,
disabled: true,
label: (
<a key="guidedTour" onClick={() => setIsTriggerVisible(!isTriggerVisible)}>
<a key="guidedTour" aria-disabled>
Show Onboarding
</a>
),
Expand Down

0 comments on commit 858a836

Please sign in to comment.