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

Gutenboarding: show Launch modal in editor just on free sites #47421

Merged
merged 1 commit into from
Nov 13, 2020
Merged
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
5 changes: 4 additions & 1 deletion client/gutenberg/editor/calypsoify-iframe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
isJetpackSite,
getSite,
} from 'calypso/state/sites/selectors';
import { getCurrentPlan } from 'calypso/state/sites/plans/selectors';
import { addQueryArgs } from 'calypso/lib/route';
import { getEnabledFilters, getDisabledDataSources, mediaCalypsoToGutenberg } from './media-utils';
import { replaceHistory, navigate } from 'calypso/state/ui/actions';
Expand Down Expand Up @@ -371,7 +372,7 @@ class CalypsoifyIframe extends Component<
}

if ( EditorActions.GetGutenboardingStatus === action ) {
const isGutenboarding = this.props.siteCreationFlow === 'gutenboarding';
const isGutenboarding = this.props.siteCreationFlow === 'gutenboarding' && ! this.props.plan;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This variable is evaluated in ET plugin to decide if the Launch modal should open or the user should be redirected to the classic Launch flow: https://github.com/Automattic/wp-calypso/blob/master/apps/editing-toolkit/editing-toolkit-plugin/editor-gutenboarding-launch/index.ts#L92

const isSiteUnlaunched = this.props.isSiteUnlaunched;
const launchUrl = `${ window.location.origin }/start/launch-site?siteSlug=${ this.props.siteSlug }`;
const isNewLaunchMobile = config.isEnabled( 'gutenboarding/new-launch-mobile' );
Expand Down Expand Up @@ -786,6 +787,7 @@ const mapStateToProps = (
const currentRoute = getCurrentRoute( state );
const postTypeTrashUrl = getPostTypeTrashUrl( state, postType );
const siteOption = isJetpackSite( state, siteId ) ? 'jetpack_frame_nonce' : 'frame_nonce';
const plan = getCurrentPlan( state, siteId );

let queryArgs = pickBy( {
post: postId,
Expand Down Expand Up @@ -861,6 +863,7 @@ const mapStateToProps = (
isSiteUnlaunched: isUnlaunchedSite( state, siteId ),
site: getSite( state, siteId ),
parentPostId,
plan,
};
};

Expand Down