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

Login Social: Clean up #85862

Draft
wants to merge 4 commits into
base: trunk
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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
17 changes: 6 additions & 11 deletions client/blocks/login/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,6 @@ class Login extends Component {
isP2Login,
isPartnerSignup,
isSignupExistingAccount,
isSocialFirst,
isWhiteLogin,
isWoo,
isWooCoreProfilerFlow,
Expand All @@ -343,14 +342,10 @@ class Login extends Component {
wccomFrom,
} = this.props;

let headerText = translate( 'Log in to your account' );
let headerText = translate( 'Log in to WordPress.com' );
let preHeader = null;
let postHeader = null;

if ( isSocialFirst ) {
headerText = translate( 'Log in to WordPress.com' );
}

if ( isManualRenewalImmediateLoginAttempt ) {
headerText = translate( 'Log in to update your payment details and renew your subscription' );
}
Expand Down Expand Up @@ -604,10 +599,10 @@ class Login extends Component {
);
}

renderToS() {
const { isSocialFirst, translate, twoFactorEnabled } = this.props;
renderSubheaderToS() {
const { translate, twoFactorEnabled } = this.props;

if ( ! isSocialFirst || twoFactorEnabled ) {
if ( twoFactorEnabled ) {
return null;
}

Expand Down Expand Up @@ -820,7 +815,7 @@ class Login extends Component {
}

render() {
const { isJetpack, oauth2Client, locale } = this.props;
const { isSocialFirst, isJetpack, oauth2Client, locale } = this.props;

return (
<div
Expand All @@ -835,7 +830,7 @@ class Login extends Component {

{ this.renderNotice() }

{ this.renderToS() }
{ isSocialFirst && this.renderSubheaderToS() }

{ this.renderContent() }

Expand Down
7 changes: 3 additions & 4 deletions client/login/wp-login/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ export class Login extends Component {

const loginButtons = (
<>
{ isSocialFirst && isWhiteLogin && (
{ isSocialFirst && (
<LoginButtons
locale={ locale }
twoFactorAuthType={ twoFactorAuthType }
Expand Down Expand Up @@ -502,11 +502,10 @@ export class Login extends Component {
}

render() {
const { locale, translate, isFromMigrationPlugin, isGravPoweredClient, isWoo, isWhiteLogin } =
const { locale, translate, isFromMigrationPlugin, isGravPoweredClient, isWhiteLogin } =
this.props;
const canonicalUrl = localizeUrl( 'https://wordpress.com/log-in', locale );
const isSocialFirst =
config.isEnabled( 'login/social-first' ) && isWhiteLogin && ! isGravPoweredClient && ! isWoo;
const isSocialFirst = isWhiteLogin && ! isGravPoweredClient;

return (
<div>
Expand Down
1 change: 0 additions & 1 deletion config/development.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@
"livechat_solution": true,
"login/magic-login": true,
"login/react-lost-password-screen": true,
"login/social-first": true,
"logmein": true,
"mailchimp": true,
"manage/import/site-importer-endpoints": true,
Expand Down
1 change: 0 additions & 1 deletion config/horizon.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
"layout/support-article-dialog": true,
"legal-updates-banner": false,
"livechat_solution": true,
"login/social-first": true,
"mailchimp": false,
"marketplace-add-review": true,
"marketplace-domain-bundle": false,
Expand Down
1 change: 0 additions & 1 deletion config/production.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@
"livechat_solution": true,
"login/magic-login": true,
"login/react-lost-password-screen": true,
"login/social-first": true,
"mailchimp": true,
"marketplace-add-review": false,
"marketplace-domain-bundle": false,
Expand Down
1 change: 0 additions & 1 deletion config/stage.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@
"livechat_solution": true,
"login/magic-login": true,
"login/react-lost-password-screen": true,
"login/social-first": true,
"mailchimp": true,
"marketplace-add-review": false,
"marketplace-domain-bundle": true,
Expand Down
1 change: 0 additions & 1 deletion config/test.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
"layout/query-selected-editor": true,
"layout/support-article-dialog": true,
"legal-updates-banner": true,
"login/social-first": true,
"mailchimp": true,
"marketplace-add-review": true,
"marketplace-fetch-all-dynamic-products": true,
Expand Down
1 change: 0 additions & 1 deletion config/wpcalypso.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@
"legal-updates-banner": false,
"livechat_solution": true,
"login/magic-login": true,
"login/social-first": true,
"logmein": true,
"mailchimp": true,
"marketplace-add-review": true,
Expand Down
1 change: 0 additions & 1 deletion packages/calypso-config/src/desktop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const config = {
const features = {
desktop: true,
'desktop-promo': false,
'login/social-first': false,
'sign-in-with-apple': false,
// Note: there is also a sign-in-with-apple/redirect flag
// that may/may not be relevant to override for the Desktop app.
Expand Down
Loading