Skip to content

Commit

Permalink
Move all flows to non reskinned ui (#98561)
Browse files Browse the repository at this point in the history
* Cleanup and move to latest UI

* Handle videopress

* Cleanup

* Cleanup styling for videopress
  • Loading branch information
ddc22 authored and Jess Boctor committed Jan 22, 2025
1 parent 6d7bbdf commit 1ff840b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 45 deletions.
45 changes: 3 additions & 42 deletions client/signup/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ import { createElement } from 'react';
import store from 'store';
import { notFound } from 'calypso/controller';
import { recordPageView } from 'calypso/lib/analytics/page-view';
import { isWooOAuth2Client } from 'calypso/lib/oauth2-clients';
import { login } from 'calypso/lib/paths';
import { sectionify } from 'calypso/lib/route';
import { addQueryArgs } from 'calypso/lib/url';
import flows from 'calypso/signup/config/flows';
import { isUserLoggedIn } from 'calypso/state/current-user/selectors';
import { getCurrentOAuth2Client } from 'calypso/state/oauth2-clients/ui/selectors';
import { updateDependencies } from 'calypso/state/signup/actions';
import { getSignupDependencyStore } from 'calypso/state/signup/dependency-store/selectors';
import { setCurrentFlowName, setPreviousFlowName } from 'calypso/state/signup/flow/actions';
Expand All @@ -24,7 +22,6 @@ import { getSiteId } from 'calypso/state/sites/selectors';
import { setSelectedSiteId } from 'calypso/state/ui/actions';
import { setLayoutFocus } from 'calypso/state/ui/layout-focus/actions';
import { getStepComponent } from './config/step-components';
import { isReskinnedFlow } from './is-flow';
import SignupComponent from './main';
import {
retrieveSignupDestination,
Expand Down Expand Up @@ -54,14 +51,6 @@ const basePageTitle = 'Signup'; // used for analytics, doesn't require translati
let initialContext;
let previousFlowName;

const removeWhiteBackground = function () {
if ( ! document ) {
return;
}

document.body.classList.remove( 'is-white-signup' );
};

function setReferrerPolicy() {
try {
// Remove existing <meta> tags with name="referrer"
Expand Down Expand Up @@ -104,39 +93,11 @@ export const removeP2SignupClassName = function () {

export default {
redirectTests( context, next ) {
const isLoggedIn = isUserLoggedIn( context.store.getState() );
const currentFlowName = getFlowName( context.params, isLoggedIn );
const isWoo = isWooOAuth2Client( getCurrentOAuth2Client( context.store.getState() ) );

if ( isReskinnedFlow( currentFlowName ) ) {
next();
} else if ( isWoo ) {
// Do nothing, Woo flow background should keep white.
next();
} else if (
context.pathname.indexOf( 'domain' ) >= 0 ||
context.pathname.indexOf( 'plan' ) >= 0 ||
context.pathname.indexOf( 'onboarding-registrationless' ) >= 0 ||
context.pathname.indexOf( 'wpcc' ) >= 0 ||
context.pathname.indexOf( 'launch-only' ) >= 0 ||
context.params.flowName === 'account' ||
context.params.flowName === 'crowdsignal' ||
context.params.flowName === 'clone-site'
) {
removeWhiteBackground();
next();
} else if ( context.pathname.includes( 'p2' ) ) {
addP2SignupClassName();
removeWhiteBackground();
next();
} else if ( context.pathname.includes( 'videopress' ) ) {
if ( context.pathname.includes( 'videopress' ) ) {
addVideoPressSignupClassName();
removeWhiteBackground();
next();
} else {
next();
return;
}

next();
},
redirectWithoutLocaleIfLoggedIn( context, next ) {
const userLoggedIn = isUserLoggedIn( context.store.getState() );
Expand Down
2 changes: 1 addition & 1 deletion client/signup/steps/user/style.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
body.is-section-signup.is-white-signup .signup {
body.is-section-signup.is-white-signup:not(.is-videopress-signup) .signup {
.signup-form.is-horizontal {
.signup-form__terms-of-service-link,
.auth-form__social-buttons-tos,
Expand Down
4 changes: 2 additions & 2 deletions client/signup/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ body.is-section-signup .layout:not(.dops):not(.is-wccom-oauth-flow) .formatted-h
color: var(--color-text-inverted);
}

a {
.signup:not(.is-wpcc):not(.is-crowdsignal) a {
color: var(--color-neutral-0);
text-decoration: underline;

Expand Down Expand Up @@ -393,7 +393,7 @@ body.is-section-signup .layout:not(.dops):not(.is-wccom-oauth-flow) .formatted-h
* Common styles for reskinSignupFlow a/b test
*/
body.is-section-stepper,
body.is-section-signup.is-white-signup .layout:not(.dops):not(.is-wccom-oauth-flow) {
body.is-section-signup.is-white-signup:not(.is-videopress-signup) .layout:not(.dops):not(.is-wccom-oauth-flow) {
$gray-100: #101517;
$gray-60: #50575e;
$gray-50: #646970;
Expand Down
8 changes: 8 additions & 0 deletions config/_shared.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,14 @@
"theme_color": "",
"theme_color_admin_color_scheme_override": true,
"reskinned_flows": [
"__disabled_onboarding",
"account",
"business",
"business-2y",
"business-3y",
"business-monthly",
"clone-site",
"crowdsignal",
"do-it-for-me",
"do-it-for-me-store",
"domain",
Expand All @@ -220,10 +223,12 @@
"hosting",
"hosting-start",
"import",
"launch-only",
"launch-site",
"onboarding",
"onboarding-affiliate",
"onboarding-pm",
"onboarding-registrationless",
"onboarding-with-email",
"personal",
"personal-2y",
Expand All @@ -235,9 +240,12 @@
"premium-3y",
"premium-monthly",
"reader",
"rewind-auto-config",
"rewind-setup",
"setup-site",
"site-content-collection",
"site-selected",
"videopress-account",
"website-design-services",
"with-plugin",
"with-theme",
Expand Down

0 comments on commit 1ff840b

Please sign in to comment.