Skip to content

Commit aa2c86e

Browse files
authored
Remove Is Reskinned Flag: Remove from user and notice sections (#99112)
* Remove Is Reskinned Flag: Remove is reskinned flag from user and notice sections * Center notice * Fix snapshots
1 parent 1a4a11d commit aa2c86e

File tree

20 files changed

+17
-68
lines changed

20 files changed

+17
-68
lines changed

client/blocks/signup-form/index.jsx

+3-22
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import FormPasswordInput from 'calypso/components/forms/form-password-input';
3232
import FormSettingExplanation from 'calypso/components/forms/form-setting-explanation';
3333
import FormTextInput from 'calypso/components/forms/form-text-input';
3434
import LoggedOutForm from 'calypso/components/logged-out-form';
35-
import LoggedOutFormBackLink from 'calypso/components/logged-out-form/back-link';
3635
import LoggedOutFormFooter from 'calypso/components/logged-out-form/footer';
3736
import LoggedOutFormLinkItem from 'calypso/components/logged-out-form/link-item';
3837
import LoggedOutFormLinks from 'calypso/components/logged-out-form/links';
@@ -724,7 +723,7 @@ class SignupForm extends Component {
724723
{ this.displayUsernameInput() && (
725724
<>
726725
<FormLabel htmlFor="username">
727-
{ this.props.isReskinned || ( this.props.isWoo && ! this.props.isWooJPC )
726+
{ this.props.isWoo && ! this.props.isWooJPC
728727
? this.props.translate( 'Username' )
729728
: this.props.translate( 'Choose a username' ) }
730729
</FormLabel>
@@ -1063,7 +1062,7 @@ class SignupForm extends Component {
10631062
}
10641063

10651064
footerLink() {
1066-
const { flowName, translate, isWoo, isBlazePro } = this.props;
1065+
const { isWoo, isBlazePro } = this.props;
10671066

10681067
if ( this.props.isP2Flow ) {
10691068
return (
@@ -1095,25 +1094,7 @@ class SignupForm extends Component {
10951094
);
10961095
}
10971096

1098-
return (
1099-
<>
1100-
{ ! this.props.isReskinned && (
1101-
<LoggedOutFormLinks>
1102-
<LoggedOutFormLinkItem href={ this.getLoginLink() }>
1103-
{ flowName === 'onboarding' || flowName === 'onboarding-pm'
1104-
? translate( 'Log in to create a site for your existing account.' )
1105-
: translate( 'Already have a WordPress.com account?' ) }
1106-
</LoggedOutFormLinkItem>
1107-
{ this.props.oauth2Client && (
1108-
<LoggedOutFormBackLink
1109-
oauth2Client={ this.props.oauth2Client }
1110-
recordClick={ this.recordBackLinkClick }
1111-
/>
1112-
) }
1113-
</LoggedOutFormLinks>
1114-
) }
1115-
</>
1116-
);
1097+
return null;
11171098
}
11181099

11191100
handleOnChangeAccount = () => {

client/blocks/time-mismatch-warning/test/__snapshots__/index.jsx.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ exports[`TimeMismatchWarning to render if GMT offsets do not match 1`] = `
44
<div>
55
<div
66
aria-label="Notice"
7-
class="notice is-warning is-dismissable"
7+
class="notice is-reskinned is-warning is-dismissable"
88
role="status"
99
>
1010
<span

client/components/global-notices/test/__snapshots__/index.js.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ exports[`<GlobalNotices /> should render notices with the expected structure 1`]
88
>
99
<div
1010
aria-label="Notice"
11-
class="notice is-success is-dismissable"
11+
class="notice is-reskinned is-success is-dismissable"
1212
role="status"
1313
>
1414
<span

client/components/notice/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ function MyNotice() {
2828
| `text` | `string` | null | The message that shows in the notice. |
2929
| `showDismiss` | `bool` | true | Whether to show a close action on the right of the notice. |
3030
| `isCompact` | `bool` | false | Whether this is a compact notice (smaller and not full width). |
31-
| `isReskinned` | `bool` | false | Whether to use the newer/updated version used for the plans pages. |
3231
| `duration` | `integer` | 0 | How long to show the notice for in milliseconds. |
3332
| `onDismissClick` | `function` | null | A function to call when the notice is dismissed. |
3433
| `children` | `string` | null | You can also pass the content on the notice within children. |

client/components/notice/index.jsx

+1-5
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ export class Notice extends Component {
3636
onDismissClick: noop,
3737
status: null,
3838
text: null,
39-
isReskinned: false,
4039
};
4140

4241
static propTypes = {
@@ -57,7 +56,6 @@ export class Notice extends Component {
5756
] ),
5857
text: PropTypes.node,
5958
translate: PropTypes.func.isRequired,
60-
isReskinned: PropTypes.bool,
6159
};
6260

6361
dismissTimeout = null;
@@ -119,13 +117,11 @@ export class Notice extends Component {
119117
status,
120118
text,
121119
translate,
122-
isReskinned,
123120
} = this.props;
124-
const classes = clsx( 'notice', status, className, {
121+
const classes = clsx( 'notice is-reskinned', status, className, {
125122
'is-compact': isCompact,
126123
'is-loading': isLoading,
127124
'is-dismissable': showDismiss,
128-
'is-reskinned': isReskinned,
129125
} );
130126

131127
let iconNeedsDrop = false;

client/components/notice/style.scss

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
background: var(--color-neutral-80);
2222
color: var(--color-text-inverted);
2323
line-height: 1.5;
24+
align-items: center;
2425

2526
@include breakpoint-deprecated( ">660px" ) {
2627
margin-bottom: 24px;

client/jetpack-connect/test/__snapshots__/jetpack-connect-notices.js.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ exports[`JetpackConnectNotices Should render non-terminal notice if callback sup
77
>
88
<div
99
aria-label="Notice"
10-
class="notice is-warning"
10+
class="notice is-reskinned is-warning"
1111
role="status"
1212
>
1313
<span
@@ -49,7 +49,7 @@ exports[`JetpackConnectNotices Should render notice 1`] = `
4949
>
5050
<div
5151
aria-label="Notice"
52-
class="notice is-error"
52+
class="notice is-reskinned is-error"
5353
role="status"
5454
>
5555
<span

client/my-sites/plans-features-main/components/plan-notice-credit-update.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ const PlanNoticeCreditUpgrade = ( { className, onDismissClick, siteId, visiblePl
4242
onDismissClick={ onDismissClick }
4343
icon="info-outline"
4444
status="is-success"
45-
isReskinned
4645
>
4746
{ translate(
4847
'You have {{b}}%(amountInCurrency)s{{/b}} in {{a}}upgrade credits{{/a}} available from your current plan. This credit will be applied to the pricing below at checkout if you upgrade today!',

client/my-sites/plans-features-main/components/plan-notice.tsx

-5
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ export default function PlanNotice( props: PlanNoticeProps ) {
111111
onDismissClick={ handleDismissNotice }
112112
icon="info-outline"
113113
status="is-success"
114-
isReskinned
115114
>
116115
{ translate(
117116
'This plan was purchased by a different WordPress.com account. To manage this plan, log in to that account or contact the account owner.'
@@ -126,7 +125,6 @@ export default function PlanNotice( props: PlanNoticeProps ) {
126125
onDismissClick={ handleDismissNotice }
127126
icon="info-outline"
128127
status="is-warning"
129-
isReskinned
130128
>
131129
{ translate(
132130
'Your plan currently has a legacy feature that provides 200GB of space. ' +
@@ -153,7 +151,6 @@ export default function PlanNotice( props: PlanNoticeProps ) {
153151
onDismissClick={ handleDismissNotice }
154152
icon="info-outline"
155153
status="is-success"
156-
isReskinned
157154
>
158155
{ activeDiscount.plansPageNoticeTextTitle && (
159156
<strong>
@@ -178,7 +175,6 @@ export default function PlanNotice( props: PlanNoticeProps ) {
178175
<Notice
179176
className="plan-features-main__notice"
180177
showDismiss={ false }
181-
isReskinned
182178
icon="info-outline"
183179
status="is-error"
184180
text={ translate(
@@ -194,7 +190,6 @@ export default function PlanNotice( props: PlanNoticeProps ) {
194190
<Notice
195191
className="plan-features-main__notice"
196192
showDismiss={ false }
197-
isReskinned
198193
icon="info-outline"
199194
status="is-error"
200195
text={ translate(

client/my-sites/promote-post-i2/components/campaign-item-details/index.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,6 @@ export default function CampaignItemDetails( props: Props ) {
744744
<Main wideLayout className="campaign-item-details">
745745
{ status === 'rejected' && (
746746
<Notice
747-
isReskinned
748747
showDismiss={ false }
749748
status="is-error"
750749
icon="notice-outline"
@@ -777,7 +776,6 @@ export default function CampaignItemDetails( props: Props ) {
777776
{ status === 'suspended' && payment_links && payment_links.length > 0 && (
778777
<>
779778
<Notice
780-
isReskinned
781779
showDismiss={ false }
782780
status="is-error"
783781
icon="notice-outline"

client/my-sites/promote-post-i2/main.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,6 @@ export default function PromotedPosts( { tab }: Props ) {
324324

325325
{ ! isLoadingBillingSummary && paymentBlocked && (
326326
<Notice
327-
isReskinned
328327
showDismiss={ false }
329328
status="is-error"
330329
icon="notice-outline"
@@ -350,7 +349,6 @@ export default function PromotedPosts( { tab }: Props ) {
350349
{ shouldDisplayDebtAndPaymentLinks && (
351350
<>
352351
<Notice
353-
isReskinned
354352
showDismiss={ false }
355353
status="is-error"
356354
icon="notice-outline"

client/my-sites/subscribers/components/add-subscribers-modal/add-subscribers-modal.tsx

-4
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ const AddSubscribersModal = ( { site }: AddSubscribersModalProps ) => {
203203
className="add-subscribers-modal__notice"
204204
icon={ <Gridicon icon="info" /> }
205205
isCompact
206-
isReskinned
207206
status="is-info"
208207
showDismiss={ false }
209208
>
@@ -219,7 +218,6 @@ const AddSubscribersModal = ( { site }: AddSubscribersModalProps ) => {
219218
className="add-subscribers-modal__notice"
220219
icon={ <Gridicon icon="notice" /> }
221220
isCompact
222-
isReskinned
223221
status="is-warning"
224222
showDismiss={ false }
225223
>
@@ -265,7 +263,6 @@ const AddSubscribersModal = ( { site }: AddSubscribersModalProps ) => {
265263
className="add-subscribers-modal__notice"
266264
icon={ <Gridicon icon="info" /> }
267265
isCompact
268-
isReskinned
269266
status="is-info"
270267
showDismiss={ false }
271268
>
@@ -281,7 +278,6 @@ const AddSubscribersModal = ( { site }: AddSubscribersModalProps ) => {
281278
className="add-subscribers-modal__notice"
282279
icon={ <Gridicon icon="notice" /> }
283280
isCompact
284-
isReskinned
285281
status="is-warning"
286282
showDismiss={ false }
287283
>

client/signup/signup-header/index.tsx

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { ProgressBar, WooCommerceWooLogo } from '@automattic/components';
22
import { useFlowProgress } from '@automattic/onboarding';
3-
import clsx from 'clsx';
43
import { useTranslate } from 'i18n-calypso';
54
import WordPressLogo from 'calypso/components/wordpress-logo';
65
import './style.scss';
@@ -13,15 +12,13 @@ interface ProgressBarData {
1312
interface Props {
1413
progressBar?: ProgressBarData;
1514
shouldShowLoadingScreen?: boolean;
16-
isReskinned?: boolean;
1715
rightComponent?: React.ReactNode;
1816
pageTitle?: string;
1917
showWooLogo?: boolean;
2018
}
2119

2220
const SignupHeader = ( {
2321
shouldShowLoadingScreen,
24-
isReskinned,
2522
rightComponent,
2623
progressBar = {},
2724
pageTitle,
@@ -40,9 +37,7 @@ const SignupHeader = ( {
4037
variationName ? { flowName: variationName, stepName: progressBar.stepName } : progressBar
4138
);
4239

43-
const logoClasses = clsx( 'wordpress-logo', {
44-
'is-large': shouldShowLoadingScreen && ! isReskinned,
45-
} );
40+
const logoClasses = 'wordpress-logo';
4641

4742
return (
4843
<>

client/signup/steps/design-picker/index.jsx

+3-4
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export default function DesignPickerStep( props ) {
3030
const {
3131
flowName,
3232
stepName,
33-
isReskinned,
3433
showDesignPickerCategories,
3534
showLetUsChoose,
3635
hideFullScreenPreview,
@@ -179,7 +178,7 @@ export default function DesignPickerStep( props ) {
179178
<>
180179
<DesignPicker
181180
designs={ designs }
182-
theme={ isReskinned ? 'light' : 'dark' }
181+
theme="light"
183182
locale={ translate.localeSlug }
184183
onSelect={ pickDesign }
185184
onUpgrade={ upgradePlanFromDesignPicker }
@@ -291,8 +290,8 @@ export default function DesignPickerStep( props ) {
291290
} ) }
292291
{ ...headerProps }
293292
stepContent={ renderDesignPicker() }
294-
align={ isReskinned ? 'left' : 'center' }
295-
skipButtonAlign={ isReskinned ? 'top' : 'bottom' }
293+
align="left"
294+
skipButtonAlign="top"
296295
skipLabelText={ skipLabelText() }
297296
/>
298297
);

client/signup/steps/domains/test/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ describe( 'sortProductsByPriceDescending', () => {
2929
stepName: 'stepName',
3030
stepSectionName: 'sectionName',
3131
selectedSite: {},
32-
isReskinned: false,
3332
signupDependencies: {
3433
suggestedDomain: 'example.com',
3534
},

client/signup/steps/intent/index.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import type { Dependencies } from 'calypso/signup/types';
1818

1919
interface Props {
2020
goToNextStep: () => void;
21-
isReskinned: boolean;
2221
signupDependencies: any;
2322
stepName: string;
2423
queryObject: {

client/signup/steps/starting-point/index.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import type { Dependencies } from 'calypso/signup/types';
1212

1313
interface Props {
1414
goToNextStep: () => void;
15-
isReskinned: boolean;
1615
signupDependencies: any;
1716
stepName: string;
1817
initialContext: any;

client/signup/steps/store-features/index.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import './index.scss';
1818

1919
interface Props {
2020
goToNextStep: () => void;
21-
isReskinned: boolean;
2221
signupDependencies: any;
2322
stepName: string;
2423
initialContext: any;

client/signup/steps/user/index.jsx

+4-7
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ export class UserStep extends Component {
168168
}
169169

170170
getLoginUrl() {
171-
const { oauth2Client, wccomFrom, isReskinned, sectionName, from, locale, step } = this.props;
171+
const { oauth2Client, wccomFrom, sectionName, from, locale, step } = this.props;
172172
const emailAddress = step?.form?.email?.value ?? step?.form?.email;
173173

174174
return login( {
@@ -178,7 +178,6 @@ export class UserStep extends Component {
178178
locale,
179179
oauth2ClientId: oauth2Client?.id,
180180
wccomFrom,
181-
isWhiteLogin: isReskinned,
182181
signupUrl: window.location.pathname + window.location.search,
183182
emailAddress,
184183
} );
@@ -192,7 +191,6 @@ export class UserStep extends Component {
192191
translate,
193192
userLoggedIn,
194193
wccomFrom,
195-
isReskinned,
196194
isOnboardingAffiliateFlow,
197195
isWCCOM,
198196
} = this.props;
@@ -280,7 +278,7 @@ export class UserStep extends Component {
280278
subHeaderText = translate( 'Welcome to the WordPress.com community.' );
281279
}
282280

283-
if ( isReskinned && 0 === positionInFlow ) {
281+
if ( 0 === positionInFlow ) {
284282
if ( this.props.isSocialFirst ) {
285283
subHeaderText = '';
286284
} else {
@@ -569,7 +567,7 @@ export class UserStep extends Component {
569567
}
570568

571569
renderSignupForm() {
572-
const { oauth2Client, isReskinned, isWCCOM, isWoo } = this.props;
570+
const { oauth2Client, isWCCOM, isWoo } = this.props;
573571
const isPasswordless =
574572
isMobile() ||
575573
this.props.isPasswordless ||
@@ -615,8 +613,7 @@ export class UserStep extends Component {
615613
socialService={ socialService }
616614
socialServiceResponse={ socialServiceResponse }
617615
recaptchaClientId={ this.state.recaptchaClientId }
618-
horizontal={ isReskinned }
619-
isReskinned={ isReskinned }
616+
horizontal
620617
shouldDisplayUserExistsError={ ! isWCCOM && ! isBlazeProOAuth2Client( oauth2Client ) }
621618
isSocialFirst={ this.props.isSocialFirst }
622619
labelText={ isWoo ? this.props.translate( 'Your email' ) : null }

0 commit comments

Comments
 (0)