Skip to content

ref(onobarding): Remove old onboarding experience #14066

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

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
30 changes: 8 additions & 22 deletions src/sentry/static/sentry/app/components/createProject.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {openCreateTeamModal} from 'app/actionCreators/modal';
import {t} from 'app/locale';
import Alert from 'app/components/alert';
import Button from 'app/components/button';
import HookStore from 'app/stores/hookStore';
import PageHeading from 'app/components/pageHeading';
import PlatformIconTile from 'app/components/platformIconTile';
import PlatformPicker from 'app/components/platformPicker';
Expand All @@ -28,12 +27,6 @@ class CreateProject extends React.Component {
api: PropTypes.object,
teams: PropTypes.arrayOf(SentryTypes.Team),
organization: SentryTypes.Organization,
nextStepUrl: PropTypes.func,
};

static defaultProps = {
nextStepUrl: ({slug, projectSlug, platform}) =>
`/onboarding/${slug}/${projectSlug}/configure/${platform}`,
};

static contextTypes = {
Expand Down Expand Up @@ -61,7 +54,7 @@ class CreateProject extends React.Component {

createProject = e => {
e.preventDefault();
const {organization, api, nextStepUrl} = this.props;
const {organization, api} = this.props;
const {projectName, platform, team} = this.state;
const {slug} = organization;

Expand All @@ -71,7 +64,7 @@ class CreateProject extends React.Component {
Sentry.withScope(scope => {
scope.setExtra('props', this.props);
scope.setExtra('state', this.state);
Sentry.captureMessage('Onboarding no project name');
Sentry.captureMessage('No project name');
});
}

Expand All @@ -84,19 +77,12 @@ class CreateProject extends React.Component {
success: data => {
ProjectActions.createSuccess(data);

const urlData = {
slug: organization.slug,
projectSlug: data.slug,
platform: platform || 'other',
};

const defaultNextUrl = nextStepUrl(urlData);
const hookNextUrl =
organization.projects.length === 0 &&
HookStore.get('utils:onboarding-survey-url').length &&
HookStore.get('utils:onboarding-survey-url')[0](urlData, organization);
const platformKey = platform || 'other';
const nextUrl = `/${organization.slug}/${
data.slug
}/getting-started/${platformKey}/`;

browserHistory.push(hookNextUrl || defaultNextUrl);
browserHistory.push(nextUrl);
},
error: err => {
this.setState({
Expand All @@ -112,7 +98,7 @@ class CreateProject extends React.Component {
scope.setExtra('err', err);
scope.setExtra('props', this.props);
scope.setExtra('state', this.state);
Sentry.captureMessage('Onboarding project creation failed');
Sentry.captureMessage('Project creation failed');
});
}
},
Expand Down
27 changes: 1 addition & 26 deletions src/sentry/static/sentry/app/routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ const OrganizationMembersView = HookOrDefault({
import(/* webpackChunkName: "OrganizationMembers" */ 'app/views/settings/organizationMembers'),
});

const OnboardingNewProjectView = HookOrDefault({
hookName: 'component:onboarding-new-project',
defaultComponentPromise: () =>
import(/* webpackChunkName: "OnboardingNewProject" */ 'app/views/onboarding/newProject'),
});

function routes() {
const accountSettingsRoutes = (
<React.Fragment>
Expand Down Expand Up @@ -786,33 +780,14 @@ function routes() {
/>

<Route path="/onboarding/:orgId/" component={errorHandler(OrganizationContext)}>
{/* The current (old) version of the onboarding experience does not
route to anything here. So even though this is new, the route can
live where it will eventually live. */}
<IndexRedirect to="welcome/" />
<Route
path=":step/"
componentPromise={() =>
import(/* webpackChunkName: "OnboardingWizardNew" */ 'app/views/onboarding/wizardNew')
}
component={errorHandler(LazyLoad)}
/>
{/* TODO(epurkhiser): Old style onboarding experience routes. To be removed in the future */}
<Route
componentPromise={() =>
import(/* webpackChunkName: "OnboardingWizard" */ 'app/views/onboarding/wizard')
}
component={errorHandler(LazyLoad)}
>
<IndexRoute component={errorHandler(OnboardingNewProjectView)} />
<Route
path=":projectId/configure/:platform/"
componentPromise={() =>
import(/* webpackChunkName: "OnboardingConfigure" */ 'app/views/onboarding/configure')
}
component={errorHandler(LazyLoad)}
/>
{hook('routes:onboarding')}
</Route>
</Route>
<Route component={errorHandler(OrganizationDetails)}>
<Route path="/settings/" name="Settings" component={SettingsWrapper}>
Expand Down
5 changes: 0 additions & 5 deletions src/sentry/static/sentry/app/stores/hookStore.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const validHookNames = new Set([
// Additional routes
'routes',
'routes:admin',
'routes:onboarding',
'routes:organization',
'routes:organization-root',

Expand Down Expand Up @@ -40,11 +39,7 @@ const validHookNames = new Set([
'sidebar:item-label',

// Onboarding experience
// TODO(epurkhiser): These all should become less getsentry specific
'utils:onboarding-survey-url',
'sidebar:onboarding-assets',
'onboarding:invite-members',
'component:onboarding-new-project',

// Used to provide a component for integration features.
'integrations:feature-gates',
Expand Down
115 changes: 0 additions & 115 deletions src/sentry/static/sentry/app/views/onboarding/configure.jsx

This file was deleted.

14 changes: 0 additions & 14 deletions src/sentry/static/sentry/app/views/onboarding/newProject.jsx

This file was deleted.

3 changes: 2 additions & 1 deletion src/sentry/static/sentry/app/views/onboarding/platform.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class OnboardingPlatform extends React.Component {
progressing: false,
};

componentDidUpdate(prevProps, prevState) {
componentDidUpdate(prevProps) {
if (prevProps.active && !this.props.active) {
// eslint-disable-next-line react/no-did-update-set-state
this.setState({progressing: false});
Expand Down Expand Up @@ -144,6 +144,7 @@ class OnboardingPlatform extends React.Component {
setPlatform={this.handleSetPlatform}
/>
<Button
data-test-id="platform-select-next"
priority="primary"
disabled={continueDisabled}
onClick={this.handleContinue}
Expand Down
Loading