Skip to content

Commit

Permalink
Launchpad Navigator: Remove from Calypso
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla committed Jan 15, 2025
1 parent 7e59ffa commit f746d71
Show file tree
Hide file tree
Showing 40 changed files with 5 additions and 562 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ const assemblerFirstFlow: Flow = {
switch ( _currentStep ) {
case 'launchpad':
skipLaunchpad( {
checklistSlug: ASSEMBLER_FIRST_FLOW,
siteId,
siteSlug,
} );
Expand Down
1 change: 0 additions & 1 deletion client/landing/stepper/declarative-flow/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ const build: Flow = {
switch ( _currentStep ) {
case 'launchpad':
skipLaunchpad( {
checklistSlug: 'build',
siteId,
siteSlug,
} );
Expand Down
1 change: 0 additions & 1 deletion client/landing/stepper/declarative-flow/design-first.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ const designFirst: Flow = {
switch ( currentStep ) {
case 'launchpad':
skipLaunchpad( {
checklistSlug: site?.options?.site_intent,
siteId,
siteSlug,
} );
Expand Down
1 change: 0 additions & 1 deletion client/landing/stepper/declarative-flow/link-in-bio-tld.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ const linkInBio: Flow = {
switch ( _currentStepSlug ) {
case 'launchpad':
skipLaunchpad( {
checklistSlug: 'link-in-bio-tld',
siteId,
siteSlug,
} );
Expand Down
1 change: 0 additions & 1 deletion client/landing/stepper/declarative-flow/newsletter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ const newsletter: Flow = {
switch ( _currentStep ) {
case 'launchpad':
skipLaunchpad( {
checklistSlug: 'newsletter',
siteId,
siteSlug,
} );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ const readymadeTemplateFlow: Flow = {
switch ( _currentStep ) {
case 'launchpad':
skipLaunchpad( {
checklistSlug: READYMADE_TEMPLATE_FLOW,
siteId,
siteSlug,
} );
Expand Down
1 change: 0 additions & 1 deletion client/landing/stepper/declarative-flow/start-writing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ const startWriting: Flow = {
switch ( currentStep ) {
case 'launchpad':
skipLaunchpad( {
checklistSlug: 'start-writing',
siteId,
siteSlug,
} );
Expand Down
1 change: 0 additions & 1 deletion client/landing/stepper/declarative-flow/write.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ const write: Flow = {
switch ( _currentStep ) {
case 'launchpad':
skipLaunchpad( {
checklistSlug: 'write',
siteId,
siteSlug,
} );
Expand Down
21 changes: 3 additions & 18 deletions client/landing/stepper/utils/skip-launchpad.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,14 @@
import { isEnabled } from '@automattic/calypso-config';
import { LaunchpadNavigator, updateLaunchpadSettings } from '@automattic/data-stores';
import { dispatch } from '@wordpress/data';
import { updateLaunchpadSettings } from '@automattic/data-stores';

type SkipLaunchpadProps = {
checklistSlug?: string | null;
siteId: string | number | null;
siteSlug: string | null;
};

export const skipLaunchpad = async ( { checklistSlug, siteId, siteSlug }: SkipLaunchpadProps ) => {
export const skipLaunchpad = async ( { siteId, siteSlug }: SkipLaunchpadProps ) => {
const siteIdOrSlug = siteId || siteSlug;
if ( siteIdOrSlug ) {
// Only set the active checklist if we have the checklist slug AND the feature is enabled.
if ( checklistSlug && isEnabled( 'launchpad/navigator' ) ) {
// If we're making both API calls, allow them to happen concurrently.
await Promise.allSettled( [
updateLaunchpadSettings( siteIdOrSlug, { launchpad_screen: 'skipped' } ),
dispatch( LaunchpadNavigator.store ).setActiveChecklist(
String( siteIdOrSlug ),
checklistSlug
),
] );
} else {
await updateLaunchpadSettings( siteIdOrSlug, { launchpad_screen: 'skipped' } );
}
await updateLaunchpadSettings( siteIdOrSlug, { launchpad_screen: 'skipped' } );
}

return window.location.assign( `/home/${ siteIdOrSlug }` );
Expand Down
9 changes: 0 additions & 9 deletions client/layout/masterbar/logged-in.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -548,14 +548,6 @@ class MasterbarLoggedIn extends Component {
);
}

renderLaunchpadNavigator() {
if ( config.isEnabled( 'launchpad/navigator' ) ) {
return <AsyncLoad require="./masterbar-launchpad-navigator" />;
}

return null;
}

renderBackHomeButton() {
const { translate } = this.props;

Expand Down Expand Up @@ -607,7 +599,6 @@ class MasterbarLoggedIn extends Component {
</div>
<div className="masterbar__section masterbar__section--right">
{ this.renderCart() }
{ this.renderLaunchpadNavigator() }
{ this.renderReader() }
{ loadHelpCenterIcon && this.renderHelpCenter() }
{ this.renderNotifications() }
Expand Down
41 changes: 0 additions & 41 deletions client/layout/masterbar/masterbar-launchpad-navigator.tsx

This file was deleted.

1 change: 0 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
"@automattic/languages": "workspace:^",
"@automattic/lasagna": "^0.6.1",
"@automattic/launchpad": "workspace:^",
"@automattic/launchpad-navigator": "workspace:^",
"@automattic/load-script": "workspace:^",
"@automattic/material-design-icons": "workspace:^",
"@automattic/mini-cart": "workspace:^",
Expand Down
1 change: 0 additions & 1 deletion config/development.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@
"jitms": true,
"lasagna": true,
"launchpad-updates": true,
"launchpad/navigator": false,
"launchpad/new-task-definition-parser": true,
"launchpad/new-task-definition-parser/free": true,
"launchpad/new-task-definition-parser/start-writing": true,
Expand Down
1 change: 0 additions & 1 deletion config/horizon.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
"jitms": true,
"lasagna": true,
"launchpad-updates": false,
"launchpad/navigator": false,
"launchpad/new-task-definition-parser": true,
"layout/app-banner": true,
"layout/guided-tours": true,
Expand Down
1 change: 0 additions & 1 deletion config/production.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
"jitms": true,
"lasagna": true,
"launchpad-updates": false,
"launchpad/navigator": false,
"launchpad/new-task-definition-parser": true,
"launchpad/new-task-definition-parser/free": true,
"launchpad/new-task-definition-parser/start-writing": true,
Expand Down
1 change: 0 additions & 1 deletion config/stage.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@
"jitms": true,
"lasagna": true,
"launchpad-updates": false,
"launchpad/navigator": false,
"launchpad/new-task-definition-parser": true,
"launchpad/new-task-definition-parser/free": true,
"launchpad/new-task-definition-parser/start-writing": true,
Expand Down
1 change: 0 additions & 1 deletion config/test.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
"jitms": true,
"lasagna": false,
"launchpad-updates": false,
"launchpad/navigator": false,
"launchpad/new-task-definition-parser": true,
"launchpad/new-task-definition-parser/free": true,
"launchpad/new-task-definition-parser/start-writing": true,
Expand Down
1 change: 0 additions & 1 deletion config/wpcalypso.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@
"jitms": true,
"lasagna": true,
"launchpad-updates": false,
"launchpad/navigator": false,
"layout/app-banner": true,
"layout/guided-tours": true,
"layout/query-selected-editor": true,
Expand Down
3 changes: 0 additions & 3 deletions packages/data-stores/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import * as Analyzer from './analyzer';
import * as AutomatedTransferEligibility from './automated-transfer-eligibility';
import * as DomainSuggestions from './domain-suggestions';
import * as HelpCenter from './help-center';
import * as LaunchpadNavigator from './launchpad-navigator';
import * as Onboard from './onboard';
import * as Plans from './plans';
import * as ProductsList from './products-list';
Expand All @@ -28,7 +27,6 @@ export * from './theme';
export * from './user/types';
export * from './wpcom-plans-ui/types';
export * from './queries/use-launchpad';
export * from './queries/use-launchpad-navigator';
export * from './queries/use-all-domains-query';
export * from './queries/use-site-domains-query';
export * from './queries/use-site-query';
Expand All @@ -45,7 +43,6 @@ export {
User,
DomainSuggestions,
HelpCenter,
LaunchpadNavigator,
Site,
Plans,
Purchases,
Expand Down
85 changes: 0 additions & 85 deletions packages/data-stores/src/launchpad-navigator/actions.ts

This file was deleted.

4 changes: 0 additions & 4 deletions packages/data-stores/src/launchpad-navigator/constants.ts

This file was deleted.

16 changes: 0 additions & 16 deletions packages/data-stores/src/launchpad-navigator/index.ts

This file was deleted.

35 changes: 0 additions & 35 deletions packages/data-stores/src/launchpad-navigator/reducer.ts

This file was deleted.

6 changes: 0 additions & 6 deletions packages/data-stores/src/launchpad-navigator/selectors.ts

This file was deleted.

Loading

0 comments on commit f746d71

Please sign in to comment.