Skip to content

Commit

Permalink
Remove flow progress from domain transfers flow (#79721)
Browse files Browse the repository at this point in the history
Reverts #79629 and removes useFlowProgress instead.
  • Loading branch information
lsl authored and pull[bot] committed Jan 9, 2024
1 parent 9c6f96e commit 7966380
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 21 deletions.
9 changes: 3 additions & 6 deletions client/landing/stepper/declarative-flow/domain-transfer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useLocale } from '@automattic/i18n-utils';
import { useFlowProgress, DOMAIN_TRANSFER } from '@automattic/onboarding';
import { useSelect, useDispatch } from '@wordpress/data';
import { DOMAIN_TRANSFER } from '@automattic/onboarding';
import { useSelect } from '@wordpress/data';
import { translate } from 'i18n-calypso';
import { useEffect } from 'react';
import { useSelector } from 'react-redux';
Expand All @@ -10,7 +10,7 @@ import {
setSignupCompleteFlowName,
} from 'calypso/signup/storageUtils';
import { isUserLoggedIn } from 'calypso/state/current-user/selectors';
import { USER_STORE, ONBOARD_STORE } from '../stores';
import { USER_STORE } from '../stores';
import { recordSubmitStep } from './internals/analytics/record-submit-step';
import {
Flow,
Expand Down Expand Up @@ -56,14 +56,11 @@ const domainTransfer: Flow = {

useStepNavigation( _currentStepSlug, navigate ) {
const flowName = this.name;
const { setStepProgress } = useDispatch( ONBOARD_STORE );
const flowProgress = useFlowProgress( { stepName: _currentStepSlug, flowName } );
const userIsLoggedIn = useSelect(
( select ) => ( select( USER_STORE ) as UserSelect ).isCurrentUserLoggedIn(),
[]
);
const locale = useLocale();
setStepProgress( flowProgress );

const logInUrl =
locale && locale !== 'en'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
align-items: center;
gap: 30px;

.flow-progress.progress-bar {
display: none;
}

button:disabled {
pointer-events: none;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ $heading-font-family: "SF Pro Display", $sans;
display: flex;
align-items: center;

.flow-progress.progress-bar {
display: none;
}

// Same style also on transfer-domains step
.bulk-domain-transfer__cta-container {
display: flex;
Expand Down
7 changes: 0 additions & 7 deletions packages/onboarding/src/flow-progress/use-flow-progress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
FREE_FLOW,
COPY_SITE_FLOW,
ONBOARDING_PM_FLOW,
DOMAIN_TRANSFER,
} from '../utils/flows';

/* eslint-disable no-restricted-imports */
Expand Down Expand Up @@ -101,12 +100,6 @@ const flows: Record< string, { [ step: string ]: number } > = {
/** Phantom step that is outside stepper */
checkout: 5,
},
[ DOMAIN_TRANSFER ]: {
user: 0,
intro: 1,
domains: 2,
processing: 3,
},
};

export const useFlowProgress = ( { stepName, flowName, variantSlug }: FlowProgress = {} ) => {
Expand Down

0 comments on commit 7966380

Please sign in to comment.