Skip to content

Commit 14900a6

Browse files
authored
Merge branch 'trunk' into stats-69-navigation-allow-go-back-to-posts-pages-summary-page
2 parents 5203492 + df80a74 commit 14900a6

File tree

117 files changed

+1889
-738
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+1889
-738
lines changed

apps/blaze-dashboard/src/load-config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ productionConfig.features.is_running_in_jetpack_site =
2525
// Set is is_running_in_woo_site to true if the dashboard is running on the Blaze Ads plugin
2626
productionConfig.features.is_running_in_blaze_plugin = isBlazePlugin;
2727

28-
productionConfig.features[ 'jetpack/magic-link-signup' ] = true;
29-
3028
// Set is is_running_in_woo_site to true if the dashboard is running on a Woo site
3129
productionConfig.features.is_running_in_woo_site = isWooStore;
3230

client/assets/stylesheets/_wp-components-overrides.scss

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@
3535
--wp-components-color-accent-darker-20: var(--color-accent-60);
3636
}
3737

38+
.components-button.is-link:not(.is-destructive) {
39+
// Text color, focus ring color
40+
--wp-components-color-accent: var(--color-accent);
41+
}
42+
3843
/* @wordpress/components ButtonGroup overrides */
3944
.components-button-group {
4045
.components-button {
@@ -57,11 +62,3 @@
5762
}
5863
}
5964
}
60-
61-
.components-external-link__contents {
62-
text-decoration: none;
63-
64-
&:hover {
65-
text-decoration: underline;
66-
}
67-
}

client/blocks/login/continue-as-user.jsx

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Button } from '@automattic/components';
1+
import { Button } from '@wordpress/components';
22
import { useTranslate } from 'i18n-calypso';
33
import { useEffect, useState } from 'react';
44
import Gravatar from 'calypso/components/gravatar';
@@ -54,8 +54,8 @@ export default function ContinueAsUser( {
5454
components: {
5555
br: <br />,
5656
link: (
57-
<button
58-
type="button"
57+
<Button
58+
variant="link"
5959
id="loginAsAnotherUser"
6060
className="continue-as-user__change-user-link"
6161
onClick={ onChangeAccount }
@@ -85,21 +85,22 @@ export default function ContinueAsUser( {
8585
<div className="continue-as-user__user-info">
8686
{ gravatarLink }
8787
<div className="continue-as-user__not-you">
88-
<button
89-
type="button"
88+
<Button
89+
variant="tertiary"
9090
id="loginAsAnotherUser"
9191
className="continue-as-user__change-user-link"
9292
onClick={ onChangeAccount }
9393
>
9494
{ translate( 'Sign in as a different user' ) }
95-
</button>
95+
</Button>
9696
</div>
9797
</div>
9898
<Button
99-
primary
99+
variant="primary"
100100
className="continue-as-user__continue-button"
101-
busy={ validatingPath }
101+
isBusy={ validatingPath }
102102
href={ validatedPath || '/' }
103+
__next40pxDefaultSize
103104
>
104105
{ translate( 'Continue' ) }
105106
</Button>
@@ -113,21 +114,22 @@ export default function ContinueAsUser( {
113114
<div className="continue-as-user__user-info">
114115
{ gravatarLink }
115116
<div className="continue-as-user__not-you">
116-
<button
117-
type="button"
117+
<Button
118+
variant="tertiary"
118119
id="loginAsAnotherUser"
119120
className="continue-as-user__change-user-link"
120121
onClick={ onChangeAccount }
121122
>
122123
{ translate( 'Sign in as a different user' ) }
123-
</button>
124+
</Button>
124125
</div>
125126
</div>
126127
<Button
127-
primary
128+
variant="primary"
128129
className="continue-as-user__continue-button"
129-
busy={ validatingPath }
130+
isBusy={ validatingPath }
130131
href={ validatedPath || '/' }
132+
__next40pxDefaultSize
131133
>
132134
{ `${ translate( 'Continue as', {
133135
context: 'Continue as an existing WordPress.com user',
@@ -142,7 +144,13 @@ export default function ContinueAsUser( {
142144
<div className="continue-as-user">
143145
<div className="continue-as-user__user-info">
144146
{ gravatarLink }
145-
<Button primary busy={ validatingPath } href={ validatedPath || '/' }>
147+
<Button
148+
variant="primary"
149+
isBusy={ validatingPath }
150+
href={ validatedPath || '/' }
151+
__next40pxDefaultSize
152+
className="continue-as-user__continue-button"
153+
>
146154
{ translate( 'Continue' ) }
147155
</Button>
148156
</div>

client/blocks/login/continue-as-user.scss

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
@import "@wordpress/base-styles/breakpoints";
33

44
.continue-as-user {
5-
display: block;
5+
display: flex;
6+
flex-direction: column;
67
animation: 1s appear 0s ease-in;
78
color: var(--color-text-subtle);
89
font-size: $font-body-small;
@@ -23,28 +24,16 @@
2324
margin: 0 auto;
2425
display: flex;
2526
flex-direction: column;
26-
27-
& > a.button {
28-
margin: 0 20px;
29-
border-radius: 4px;
30-
}
3127
}
3228

3329
.continue-as-user__gravatar {
3430
display: inline;
3531
border: 1px solid #a7aaad;
3632
}
3733

38-
.continue-as-user__change-user-link {
39-
color: var(--color-link);
40-
cursor: pointer;
41-
margin: auto;
42-
43-
&:hover,
44-
&:focus,
45-
&:active {
46-
color: var(--color-link-dark);
47-
}
34+
.continue-as-user__continue-button {
35+
min-width: 100%;
36+
margin-block: 13px;
4837
}
4938

5039
.continue-as-user__not-you {

client/blocks/login/login-form.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ export class LoginForm extends Component {
155155
if (
156156
currentRoute &&
157157
currentRoute.includes( '/log-in/jetpack' ) &&
158-
config.isEnabled( 'jetpack/magic-link-signup' ) &&
159158
requestError.code === 'unknown_user' &&
160159
! this.props.isWooJPC
161160
) {

client/blocks/login/login-form.scss

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -54,31 +54,23 @@ form {
5454
}
5555
}
5656
}
57+
58+
&.is-akismet {
59+
.login,
60+
.magic-login {
61+
.components-button {
62+
--color-accent: var(--color-akismet);
63+
--color-accent-60: var(--color-akismet);
64+
}
65+
}
66+
}
5767
}
5868

5969
.is-jetpack .login__form-account-tip {
6070
margin-block-start: -8px;
6171
font-size: 0.75rem;
6272
}
6373

64-
.layout.is-white-login .login.is-akismet .login__form,
65-
.layout.is-white-login .login.is-akismet .continue-as-user,
66-
.layout.is-white-login.is-akismet .magic-login__form-action {
67-
.button.is-primary {
68-
background-color: var(--color-akismet);
69-
70-
&:hover,
71-
&:focus {
72-
background-color: var(--color-akismet);
73-
}
74-
}
75-
76-
.components-button.is-primary {
77-
--color-accent: var(--color-akismet);
78-
--color-accent-60: var(--color-akismet);
79-
}
80-
}
81-
8274
.login__form-jetpack {
8375
.card.login__form {
8476
box-shadow: none;

client/blocks/login/login-header.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import config from '@automattic/calypso-config';
21
import { useTranslate, TranslateResult } from 'i18n-calypso';
32
import { capitalize } from 'lodash';
43
import A4APlusWpComLogo from 'calypso/a8c-for-agencies/components/a4a-plus-wpcom-logo';
@@ -183,12 +182,9 @@ export function getHeaderText(
183182
} else if ( isFromMigrationPlugin ) {
184183
headerText = translate( 'Log in to your account' );
185184
} else if ( isJetpack && ! isFromAutomatticForAgenciesPlugin ) {
186-
const isJetpackMagicLinkSignUpFlow = config.isEnabled( 'jetpack/magic-link-signup' );
187-
headerText = isJetpackMagicLinkSignUpFlow
188-
? translate(
189-
'Log in or create a WordPress.com account to supercharge your site with powerful growth, performance, and security tools.'
190-
)
191-
: translate( 'Log in or create a WordPress.com account to set up Jetpack' );
185+
headerText = translate(
186+
'Log in or create a WordPress.com account to supercharge your site with powerful growth, performance, and security tools.'
187+
);
192188
}
193189

194190
if ( isFromAkismet ) {

client/blocks/signup-form/crowdsignal.scss

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,8 @@ body.is-section-signup .layout .signup.is-crowdsignal .step-wrapper {
4444
}
4545
}
4646

47-
.signup-form__crowdsignal {
47+
.signup.is-crowdsignal {
4848
.components-button {
49-
width: 100%;
50-
5149
&.is-primary:not(.signup-form__crowdsignal-wpcom) {
5250
--color-accent: var(--color-primary);
5351
--color-accent-60: var(--color-primary-dark);
@@ -143,6 +141,10 @@ body.is-section-signup .layout .signup.is-crowdsignal .step-wrapper {
143141
margin: 0 auto;
144142
max-width: 320px;
145143
width: 100%;
144+
145+
.components-button {
146+
width: 100%;
147+
}
146148
}
147149

148150
.signup-form__crowdsignal-card-subheader {

client/blocks/signup-form/index.jsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,6 +1088,18 @@ class SignupForm extends Component {
10881088
return null;
10891089
}
10901090

1091+
if ( this.props.currentUser && ! this.props.disableContinueAsUser ) {
1092+
return (
1093+
<ContinueAsUser
1094+
currentUser={ this.props.currentUser }
1095+
onChangeAccount={ this.handleOnChangeAccount }
1096+
redirectPath={ this.props.redirectToAfterLoginUrl }
1097+
isWoo={ this.props.isWoo }
1098+
isBlazePro={ this.props.isBlazePro }
1099+
/>
1100+
);
1101+
}
1102+
10911103
if ( isCrowdsignalOAuth2Client( this.props.oauth2Client ) ) {
10921104
const socialProps = pick( this.props, [
10931105
'isSocialSignupEnabled',
@@ -1109,18 +1121,6 @@ class SignupForm extends Component {
11091121
);
11101122
}
11111123

1112-
if ( this.props.currentUser && ! this.props.disableContinueAsUser ) {
1113-
return (
1114-
<ContinueAsUser
1115-
currentUser={ this.props.currentUser }
1116-
onChangeAccount={ this.handleOnChangeAccount }
1117-
redirectPath={ this.props.redirectToAfterLoginUrl }
1118-
isWoo={ this.props.isWoo }
1119-
isBlazePro={ this.props.isBlazePro }
1120-
/>
1121-
);
1122-
}
1123-
11241124
if ( this.props.isJetpackWooDnaFlow ) {
11251125
return (
11261126
<div className={ clsx( 'signup-form__woocommerce', this.props.className ) }>

0 commit comments

Comments
 (0)