Skip to content

Commit

Permalink
Remove Is Reskinned Flag: Remove from user and notice sections (#99112)
Browse files Browse the repository at this point in the history
* Remove Is Reskinned Flag: Remove is reskinned flag from user and notice sections

* Center notice

* Fix snapshots
  • Loading branch information
ddc22 authored Feb 4, 2025
1 parent 1a4a11d commit aa2c86e
Show file tree
Hide file tree
Showing 20 changed files with 17 additions and 68 deletions.
25 changes: 3 additions & 22 deletions client/blocks/signup-form/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import FormPasswordInput from 'calypso/components/forms/form-password-input';
import FormSettingExplanation from 'calypso/components/forms/form-setting-explanation';
import FormTextInput from 'calypso/components/forms/form-text-input';
import LoggedOutForm from 'calypso/components/logged-out-form';
import LoggedOutFormBackLink from 'calypso/components/logged-out-form/back-link';
import LoggedOutFormFooter from 'calypso/components/logged-out-form/footer';
import LoggedOutFormLinkItem from 'calypso/components/logged-out-form/link-item';
import LoggedOutFormLinks from 'calypso/components/logged-out-form/links';
Expand Down Expand Up @@ -724,7 +723,7 @@ class SignupForm extends Component {
{ this.displayUsernameInput() && (
<>
<FormLabel htmlFor="username">
{ this.props.isReskinned || ( this.props.isWoo && ! this.props.isWooJPC )
{ this.props.isWoo && ! this.props.isWooJPC
? this.props.translate( 'Username' )
: this.props.translate( 'Choose a username' ) }
</FormLabel>
Expand Down Expand Up @@ -1063,7 +1062,7 @@ class SignupForm extends Component {
}

footerLink() {
const { flowName, translate, isWoo, isBlazePro } = this.props;
const { isWoo, isBlazePro } = this.props;

if ( this.props.isP2Flow ) {
return (
Expand Down Expand Up @@ -1095,25 +1094,7 @@ class SignupForm extends Component {
);
}

return (
<>
{ ! this.props.isReskinned && (
<LoggedOutFormLinks>
<LoggedOutFormLinkItem href={ this.getLoginLink() }>
{ flowName === 'onboarding' || flowName === 'onboarding-pm'
? translate( 'Log in to create a site for your existing account.' )
: translate( 'Already have a WordPress.com account?' ) }
</LoggedOutFormLinkItem>
{ this.props.oauth2Client && (
<LoggedOutFormBackLink
oauth2Client={ this.props.oauth2Client }
recordClick={ this.recordBackLinkClick }
/>
) }
</LoggedOutFormLinks>
) }
</>
);
return null;
}

handleOnChangeAccount = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`TimeMismatchWarning to render if GMT offsets do not match 1`] = `
<div>
<div
aria-label="Notice"
class="notice is-warning is-dismissable"
class="notice is-reskinned is-warning is-dismissable"
role="status"
>
<span
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exports[`<GlobalNotices /> should render notices with the expected structure 1`]
>
<div
aria-label="Notice"
class="notice is-success is-dismissable"
class="notice is-reskinned is-success is-dismissable"
role="status"
>
<span
Expand Down
1 change: 0 additions & 1 deletion client/components/notice/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ function MyNotice() {
| `text` | `string` | null | The message that shows in the notice. |
| `showDismiss` | `bool` | true | Whether to show a close action on the right of the notice. |
| `isCompact` | `bool` | false | Whether this is a compact notice (smaller and not full width). |
| `isReskinned` | `bool` | false | Whether to use the newer/updated version used for the plans pages. |
| `duration` | `integer` | 0 | How long to show the notice for in milliseconds. |
| `onDismissClick` | `function` | null | A function to call when the notice is dismissed. |
| `children` | `string` | null | You can also pass the content on the notice within children. |
Expand Down
6 changes: 1 addition & 5 deletions client/components/notice/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export class Notice extends Component {
onDismissClick: noop,
status: null,
text: null,
isReskinned: false,
};

static propTypes = {
Expand All @@ -57,7 +56,6 @@ export class Notice extends Component {
] ),
text: PropTypes.node,
translate: PropTypes.func.isRequired,
isReskinned: PropTypes.bool,
};

dismissTimeout = null;
Expand Down Expand Up @@ -119,13 +117,11 @@ export class Notice extends Component {
status,
text,
translate,
isReskinned,
} = this.props;
const classes = clsx( 'notice', status, className, {
const classes = clsx( 'notice is-reskinned', status, className, {
'is-compact': isCompact,
'is-loading': isLoading,
'is-dismissable': showDismiss,
'is-reskinned': isReskinned,
} );

let iconNeedsDrop = false;
Expand Down
1 change: 1 addition & 0 deletions client/components/notice/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
background: var(--color-neutral-80);
color: var(--color-text-inverted);
line-height: 1.5;
align-items: center;

@include breakpoint-deprecated( ">660px" ) {
margin-bottom: 24px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exports[`JetpackConnectNotices Should render non-terminal notice if callback sup
>
<div
aria-label="Notice"
class="notice is-warning"
class="notice is-reskinned is-warning"
role="status"
>
<span
Expand Down Expand Up @@ -49,7 +49,7 @@ exports[`JetpackConnectNotices Should render notice 1`] = `
>
<div
aria-label="Notice"
class="notice is-error"
class="notice is-reskinned is-error"
role="status"
>
<span
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ const PlanNoticeCreditUpgrade = ( { className, onDismissClick, siteId, visiblePl
onDismissClick={ onDismissClick }
icon="info-outline"
status="is-success"
isReskinned
>
{ translate(
'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!',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ export default function PlanNotice( props: PlanNoticeProps ) {
onDismissClick={ handleDismissNotice }
icon="info-outline"
status="is-success"
isReskinned
>
{ translate(
'This plan was purchased by a different WordPress.com account. To manage this plan, log in to that account or contact the account owner.'
Expand All @@ -126,7 +125,6 @@ export default function PlanNotice( props: PlanNoticeProps ) {
onDismissClick={ handleDismissNotice }
icon="info-outline"
status="is-warning"
isReskinned
>
{ translate(
'Your plan currently has a legacy feature that provides 200GB of space. ' +
Expand All @@ -153,7 +151,6 @@ export default function PlanNotice( props: PlanNoticeProps ) {
onDismissClick={ handleDismissNotice }
icon="info-outline"
status="is-success"
isReskinned
>
{ activeDiscount.plansPageNoticeTextTitle && (
<strong>
Expand All @@ -178,7 +175,6 @@ export default function PlanNotice( props: PlanNoticeProps ) {
<Notice
className="plan-features-main__notice"
showDismiss={ false }
isReskinned
icon="info-outline"
status="is-error"
text={ translate(
Expand All @@ -194,7 +190,6 @@ export default function PlanNotice( props: PlanNoticeProps ) {
<Notice
className="plan-features-main__notice"
showDismiss={ false }
isReskinned
icon="info-outline"
status="is-error"
text={ translate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,6 @@ export default function CampaignItemDetails( props: Props ) {
<Main wideLayout className="campaign-item-details">
{ status === 'rejected' && (
<Notice
isReskinned
showDismiss={ false }
status="is-error"
icon="notice-outline"
Expand Down Expand Up @@ -777,7 +776,6 @@ export default function CampaignItemDetails( props: Props ) {
{ status === 'suspended' && payment_links && payment_links.length > 0 && (
<>
<Notice
isReskinned
showDismiss={ false }
status="is-error"
icon="notice-outline"
Expand Down
2 changes: 0 additions & 2 deletions client/my-sites/promote-post-i2/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,6 @@ export default function PromotedPosts( { tab }: Props ) {

{ ! isLoadingBillingSummary && paymentBlocked && (
<Notice
isReskinned
showDismiss={ false }
status="is-error"
icon="notice-outline"
Expand All @@ -350,7 +349,6 @@ export default function PromotedPosts( { tab }: Props ) {
{ shouldDisplayDebtAndPaymentLinks && (
<>
<Notice
isReskinned
showDismiss={ false }
status="is-error"
icon="notice-outline"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ const AddSubscribersModal = ( { site }: AddSubscribersModalProps ) => {
className="add-subscribers-modal__notice"
icon={ <Gridicon icon="info" /> }
isCompact
isReskinned
status="is-info"
showDismiss={ false }
>
Expand All @@ -219,7 +218,6 @@ const AddSubscribersModal = ( { site }: AddSubscribersModalProps ) => {
className="add-subscribers-modal__notice"
icon={ <Gridicon icon="notice" /> }
isCompact
isReskinned
status="is-warning"
showDismiss={ false }
>
Expand Down Expand Up @@ -265,7 +263,6 @@ const AddSubscribersModal = ( { site }: AddSubscribersModalProps ) => {
className="add-subscribers-modal__notice"
icon={ <Gridicon icon="info" /> }
isCompact
isReskinned
status="is-info"
showDismiss={ false }
>
Expand All @@ -281,7 +278,6 @@ const AddSubscribersModal = ( { site }: AddSubscribersModalProps ) => {
className="add-subscribers-modal__notice"
icon={ <Gridicon icon="notice" /> }
isCompact
isReskinned
status="is-warning"
showDismiss={ false }
>
Expand Down
7 changes: 1 addition & 6 deletions client/signup/signup-header/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { ProgressBar, WooCommerceWooLogo } from '@automattic/components';
import { useFlowProgress } from '@automattic/onboarding';
import clsx from 'clsx';
import { useTranslate } from 'i18n-calypso';
import WordPressLogo from 'calypso/components/wordpress-logo';
import './style.scss';
Expand All @@ -13,15 +12,13 @@ interface ProgressBarData {
interface Props {
progressBar?: ProgressBarData;
shouldShowLoadingScreen?: boolean;
isReskinned?: boolean;
rightComponent?: React.ReactNode;
pageTitle?: string;
showWooLogo?: boolean;
}

const SignupHeader = ( {
shouldShowLoadingScreen,
isReskinned,
rightComponent,
progressBar = {},
pageTitle,
Expand All @@ -40,9 +37,7 @@ const SignupHeader = ( {
variationName ? { flowName: variationName, stepName: progressBar.stepName } : progressBar
);

const logoClasses = clsx( 'wordpress-logo', {
'is-large': shouldShowLoadingScreen && ! isReskinned,
} );
const logoClasses = 'wordpress-logo';

return (
<>
Expand Down
7 changes: 3 additions & 4 deletions client/signup/steps/design-picker/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export default function DesignPickerStep( props ) {
const {
flowName,
stepName,
isReskinned,
showDesignPickerCategories,
showLetUsChoose,
hideFullScreenPreview,
Expand Down Expand Up @@ -179,7 +178,7 @@ export default function DesignPickerStep( props ) {
<>
<DesignPicker
designs={ designs }
theme={ isReskinned ? 'light' : 'dark' }
theme="light"
locale={ translate.localeSlug }
onSelect={ pickDesign }
onUpgrade={ upgradePlanFromDesignPicker }
Expand Down Expand Up @@ -291,8 +290,8 @@ export default function DesignPickerStep( props ) {
} ) }
{ ...headerProps }
stepContent={ renderDesignPicker() }
align={ isReskinned ? 'left' : 'center' }
skipButtonAlign={ isReskinned ? 'top' : 'bottom' }
align="left"
skipButtonAlign="top"
skipLabelText={ skipLabelText() }
/>
);
Expand Down
1 change: 0 additions & 1 deletion client/signup/steps/domains/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ describe( 'sortProductsByPriceDescending', () => {
stepName: 'stepName',
stepSectionName: 'sectionName',
selectedSite: {},
isReskinned: false,
signupDependencies: {
suggestedDomain: 'example.com',
},
Expand Down
1 change: 0 additions & 1 deletion client/signup/steps/intent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import type { Dependencies } from 'calypso/signup/types';

interface Props {
goToNextStep: () => void;
isReskinned: boolean;
signupDependencies: any;
stepName: string;
queryObject: {
Expand Down
1 change: 0 additions & 1 deletion client/signup/steps/starting-point/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import type { Dependencies } from 'calypso/signup/types';

interface Props {
goToNextStep: () => void;
isReskinned: boolean;
signupDependencies: any;
stepName: string;
initialContext: any;
Expand Down
1 change: 0 additions & 1 deletion client/signup/steps/store-features/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import './index.scss';

interface Props {
goToNextStep: () => void;
isReskinned: boolean;
signupDependencies: any;
stepName: string;
initialContext: any;
Expand Down
11 changes: 4 additions & 7 deletions client/signup/steps/user/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export class UserStep extends Component {
}

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

return login( {
Expand All @@ -178,7 +178,6 @@ export class UserStep extends Component {
locale,
oauth2ClientId: oauth2Client?.id,
wccomFrom,
isWhiteLogin: isReskinned,
signupUrl: window.location.pathname + window.location.search,
emailAddress,
} );
Expand All @@ -192,7 +191,6 @@ export class UserStep extends Component {
translate,
userLoggedIn,
wccomFrom,
isReskinned,
isOnboardingAffiliateFlow,
isWCCOM,
} = this.props;
Expand Down Expand Up @@ -280,7 +278,7 @@ export class UserStep extends Component {
subHeaderText = translate( 'Welcome to the WordPress.com community.' );
}

if ( isReskinned && 0 === positionInFlow ) {
if ( 0 === positionInFlow ) {
if ( this.props.isSocialFirst ) {
subHeaderText = '';
} else {
Expand Down Expand Up @@ -569,7 +567,7 @@ export class UserStep extends Component {
}

renderSignupForm() {
const { oauth2Client, isReskinned, isWCCOM, isWoo } = this.props;
const { oauth2Client, isWCCOM, isWoo } = this.props;
const isPasswordless =
isMobile() ||
this.props.isPasswordless ||
Expand Down Expand Up @@ -615,8 +613,7 @@ export class UserStep extends Component {
socialService={ socialService }
socialServiceResponse={ socialServiceResponse }
recaptchaClientId={ this.state.recaptchaClientId }
horizontal={ isReskinned }
isReskinned={ isReskinned }
horizontal
shouldDisplayUserExistsError={ ! isWCCOM && ! isBlazeProOAuth2Client( oauth2Client ) }
isSocialFirst={ this.props.isSocialFirst }
labelText={ isWoo ? this.props.translate( 'Your email' ) : null }
Expand Down
Loading

0 comments on commit aa2c86e

Please sign in to comment.