diff options
author | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2018-11-22 16:13:46 +0100 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-12-07 20:21:04 +0100 |
commit | d639ccca707ae55c95bf0578a73bea503d836d0c (patch) | |
tree | 2c7719a8503cb61cfdfbade23f17b023d364b4f6 /server/sonar-web/src/main/js/apps/tutorials | |
parent | 1ea65862086353a3bf23d52e9dc7c87effa8a005 (diff) | |
download | sonarqube-d639ccca707ae55c95bf0578a73bea503d836d0c.tar.gz sonarqube-d639ccca707ae55c95bf0578a73bea503d836d0c.zip |
SONARCLOUD-178 Simplify SC onboarding popup
Diffstat (limited to 'server/sonar-web/src/main/js/apps/tutorials')
5 files changed, 3 insertions, 59 deletions
diff --git a/server/sonar-web/src/main/js/apps/tutorials/onboarding/OnboardingModal.tsx b/server/sonar-web/src/main/js/apps/tutorials/onboarding/OnboardingModal.tsx index 719ba4d4ba1..6805ac22c76 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/onboarding/OnboardingModal.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/onboarding/OnboardingModal.tsx @@ -21,7 +21,6 @@ import * as React from 'react'; import { connect } from 'react-redux'; import handleRequiredAuthentication from '../../../app/utils/handleRequiredAuthentication'; import Modal from '../../../components/controls/Modal'; -import OnboardingPrivateIcon from '../../../components/icons-components/OnboardingPrivateIcon'; import OnboardingProjectIcon from '../../../components/icons-components/OnboardingProjectIcon'; import OnboardingTeamIcon from '../../../components/icons-components/OnboardingTeamIcon'; import { Button, ResetButtonLink } from '../../../components/ui/buttons'; @@ -32,7 +31,6 @@ import '../styles.css'; interface OwnProps { onClose: () => void; - onOpenOrganizationOnboarding: () => void; onOpenProjectOnboarding: () => void; onOpenTeamOnboarding: () => void; } @@ -73,24 +71,13 @@ export class OnboardingModal extends React.PureComponent<Props> { <div className="modal-simple-body text-center onboarding-choices"> <Button className="onboarding-choice" onClick={this.handleOpenProjectOnboarding}> <OnboardingProjectIcon className="big-spacer-bottom" /> - <h6 className="onboarding-choice-name"> - {translate('onboarding.analyze_public_code')} - </h6> - <p className="note">{translate('onboarding.analyze_public_code.note')}</p> - </Button> - <Button className="onboarding-choice" onClick={this.props.onOpenOrganizationOnboarding}> - <OnboardingPrivateIcon className="big-spacer-bottom" /> - <h6 className="onboarding-choice-name"> - {translate('onboarding.analyze_private_code')} - </h6> - <p className="note">{translate('onboarding.analyze_private_code.note')}</p> + <h6 className="onboarding-choice-name">{translate('onboarding.analyze_your_code')}</h6> </Button> <Button className="onboarding-choice" onClick={this.props.onOpenTeamOnboarding}> <OnboardingTeamIcon className="big-spacer-bottom" /> <h6 className="onboarding-choice-name"> {translate('onboarding.contribute_existing_project')} </h6> - <p className="note">{translate('onboarding.contribute_existing_project.note')}</p> </Button> </div> <div className="modal-simple-footer text-center"> diff --git a/server/sonar-web/src/main/js/apps/tutorials/onboarding/OnboardingPage.tsx b/server/sonar-web/src/main/js/apps/tutorials/onboarding/OnboardingPage.tsx index 7aa040268ff..f8884dd68f1 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/onboarding/OnboardingPage.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/onboarding/OnboardingPage.tsx @@ -54,15 +54,6 @@ export class OnboardingPage extends React.PureComponent<OwnProps & DispatchProps this.props.router.replace('/'); }; - closeOrganizationOnboarding = ({ key }: Pick<T.Organization, 'key'>) => { - this.closeOnboarding(); - this.props.router.push(`/organizations/${key}`); - }; - - openOrganizationOnboarding = () => { - this.props.router.push({ pathname: '/create-organization', state: { paid: true } }); - }; - openTeamOnboarding = () => { this.setState({ modal: ModalKey.teamOnboarding }); }; @@ -74,7 +65,6 @@ export class OnboardingPage extends React.PureComponent<OwnProps & DispatchProps {modal === ModalKey.onboarding && ( <OnboardingModal onClose={this.closeOnboarding} - onOpenOrganizationOnboarding={this.openOrganizationOnboarding} onOpenProjectOnboarding={this.context.openProjectOnboarding} onOpenTeamOnboarding={this.openTeamOnboarding} /> diff --git a/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/OnboardingModal-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/OnboardingModal-test.tsx index 76c801faaf8..3ff570e8cde 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/OnboardingModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/OnboardingModal-test.tsx @@ -28,7 +28,6 @@ it('renders correctly', () => { <OnboardingModal currentUser={{ isLoggedIn: true }} onClose={jest.fn()} - onOpenOrganizationOnboarding={jest.fn()} onOpenProjectOnboarding={jest.fn()} onOpenTeamOnboarding={jest.fn()} /> @@ -38,7 +37,6 @@ it('renders correctly', () => { it('should correctly open the different tutorials', () => { const onClose = jest.fn(); - const onOpenOrganizationOnboarding = jest.fn(); const onOpenProjectOnboarding = jest.fn(); const onOpenTeamOnboarding = jest.fn(); const push = jest.fn(); @@ -46,7 +44,6 @@ it('should correctly open the different tutorials', () => { <OnboardingModal currentUser={{ isLoggedIn: true }} onClose={onClose} - onOpenOrganizationOnboarding={onOpenOrganizationOnboarding} onOpenProjectOnboarding={onOpenProjectOnboarding} onOpenTeamOnboarding={onOpenTeamOnboarding} />, @@ -57,7 +54,6 @@ it('should correctly open the different tutorials', () => { expect(onClose).toHaveBeenCalled(); wrapper.find('Button').forEach(button => click(button)); - expect(onOpenOrganizationOnboarding).toHaveBeenCalled(); expect(onOpenProjectOnboarding).toHaveBeenCalled(); expect(onOpenTeamOnboarding).toHaveBeenCalled(); }); diff --git a/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/__snapshots__/OnboardingModal-test.tsx.snap b/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/__snapshots__/OnboardingModal-test.tsx.snap index 5888278c63d..1b5da9e7124 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/__snapshots__/OnboardingModal-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/__snapshots__/OnboardingModal-test.tsx.snap @@ -32,31 +32,8 @@ exports[`renders correctly 1`] = ` <h6 className="onboarding-choice-name" > - onboarding.analyze_public_code + onboarding.analyze_your_code </h6> - <p - className="note" - > - onboarding.analyze_public_code.note - </p> - </Button> - <Button - className="onboarding-choice" - onClick={[MockFunction]} - > - <OnboardingPrivateIcon - className="big-spacer-bottom" - /> - <h6 - className="onboarding-choice-name" - > - onboarding.analyze_private_code - </h6> - <p - className="note" - > - onboarding.analyze_private_code.note - </p> </Button> <Button className="onboarding-choice" @@ -70,11 +47,6 @@ exports[`renders correctly 1`] = ` > onboarding.contribute_existing_project </h6> - <p - className="note" - > - onboarding.contribute_existing_project.note - </p> </Button> </div> <div diff --git a/server/sonar-web/src/main/js/apps/tutorials/styles.css b/server/sonar-web/src/main/js/apps/tutorials/styles.css index 86f633a3a3b..41fbedac1b5 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/styles.css +++ b/server/sonar-web/src/main/js/apps/tutorials/styles.css @@ -62,7 +62,7 @@ .onboarding-choices { display: flex; justify-content: space-around; - padding: 44px 0; + padding: 44px 100px; background-color: var(--barBackgroundColor); } @@ -86,7 +86,6 @@ .onboarding-choice-name { padding-top: var(--gridSize); - padding-bottom: calc(0.5 * var(--gridSize)); color: inherit; font-size: var(--mediumFontSize); } |