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

Move all flows to non reskinned ui #98561

Merged
merged 4 commits into from
Jan 22, 2025
Merged
Changes from 3 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
45 changes: 3 additions & 42 deletions client/signup/controller.js
Original file line number Diff line number Diff line change
@@ -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';
@@ -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,
@@ -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"
@@ -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();
Comment on lines +96 to 97
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Keep videopress class since that has a completely different theme.

removeWhiteBackground();
next();
} else {
next();
return;
}

next();
},
redirectWithoutLocaleIfLoggedIn( context, next ) {
const userLoggedIn = isUserLoggedIn( context.store.getState() );
4 changes: 2 additions & 2 deletions client/signup/style.scss
Original file line number Diff line number Diff line change
@@ -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;

@@ -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;
8 changes: 8 additions & 0 deletions config/_shared.json
Original file line number Diff line number Diff line change
@@ -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",
@@ -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",
@@ -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",