Date: Wed, 6 Jan 2021 13:43:58 +0500
Subject: [PATCH] Fix max-width issue with social auth buttons. (#70)
VAN-222
---
src/logistration/LoginPage.jsx | 186 +-
src/logistration/RegistrationPage.jsx | 252 +--
.../__snapshots__/LoginPage.test.jsx.snap | 1402 ++++++-------
.../RegistrationPage.test.jsx.snap | 1742 +++++++++--------
4 files changed, 1813 insertions(+), 1769 deletions(-)
diff --git a/src/logistration/LoginPage.jsx b/src/logistration/LoginPage.jsx
index b770fed2..0d281775 100644
--- a/src/logistration/LoginPage.jsx
+++ b/src/logistration/LoginPage.jsx
@@ -142,99 +142,101 @@ class LoginPage extends React.Component {
/>
- {thirdPartyAuthContext.currentProvider
- && (
-
- )}
- {this.props.loginError ?
: null}
- {this.props.forgotPassword.status === 'complete' ?
: null}
-
-
- {intl.formatMessage(messages['logistration.first.time.here'])}
-
- {intl.formatMessage(messages['logistration.create.an.account'])}.
-
-
+
+ {thirdPartyAuthContext.currentProvider
+ && (
+
+ )}
+ {this.props.loginError ?
: null}
+ {this.props.forgotPassword.status === 'complete' ?
: null}
+
+
+ {intl.formatMessage(messages['logistration.login.institution.login.sign.in'])}
+
+ {thirdPartyAuthContext.secondaryProviders.length ? (
+ <>
+
+
+
{intl.formatMessage(messages['logistration.or.sign.in.with'])}
+
+ >
+ ) : null }
+
+ {thirdPartyAuthContext.providers.length && !thirdPartyAuthContext.currentProvider ? (
+ <>
+
+
{intl.formatMessage(messages['logistration.or.sign.in.with'])}
+
+
+
+
+ >
+ ) : null}
-
- {intl.formatMessage(messages['logistration.login.institution.login.sign.in'])}
-
- {thirdPartyAuthContext.secondaryProviders.length ? (
- <>
-
-
-
{intl.formatMessage(messages['logistration.or.sign.in.with'])}
-
- >
- ) : null }
-
- {thirdPartyAuthContext.providers.length && !thirdPartyAuthContext.currentProvider ? (
- <>
-
-
{intl.formatMessage(messages['logistration.or.sign.in.with'])}
-
-
-
-
- >
- ) : null}
>
diff --git a/src/logistration/RegistrationPage.jsx b/src/logistration/RegistrationPage.jsx
index dd5dbec9..34bc6494 100644
--- a/src/logistration/RegistrationPage.jsx
+++ b/src/logistration/RegistrationPage.jsx
@@ -448,144 +448,146 @@ class RegistrationPage extends React.Component {
/>
- {this.renderErrors()}
- {currentProvider && (
-
- )}
-
- {(providers.length || secondaryProviders.length) && !currentProvider ? (
-
-
- {intl.formatMessage(messages['logistration.create.an.account.using'])}
-
-
-
-
-
+ {this.renderErrors()}
+ {currentProvider && (
+
-
- {intl.formatMessage(messages['logistration.create.a.new.one.here'])}
-
+ )}
+
- ) : null}
-
+
+
>
diff --git a/src/logistration/tests/__snapshots__/LoginPage.test.jsx.snap b/src/logistration/tests/__snapshots__/LoginPage.test.jsx.snap
index 8fd13f12..41af41d9 100644
--- a/src/logistration/tests/__snapshots__/LoginPage.test.jsx.snap
+++ b/src/logistration/tests/__snapshots__/LoginPage.test.jsx.snap
@@ -8,179 +8,183 @@ exports[`LoginPage should match TPA provider snapshot 1`] = `
className="d-flex flex-column"
>
-
- Sign In
-
-
-
-
- or sign in with
-
-
-
-
-
-
-
- Apple
-
-
+ Sign in with your company or school
+
+
+
+ Sign in
+
+
+
+
+
+ or sign in with
+
+
+
+
+
+
+
+
+ Apple
+
+
+
@@ -194,146 +198,150 @@ exports[`LoginPage should match default section snapshot 1`] = `
className="d-flex flex-column"
>
-
- Sign In
-
-
-
- Email
-
-
-
- The email address you used to register with edX.
+
+ First time here?
+
+ Create an Account
+ .
+
-
- The email address you've provided isn't formatted correctly.
-
-
-
- Password
-
-
-
- Please enter your password.
-
-
-
-
-
-
- Need help signing in?
-
-
+
+
+ Email
+
+
+
+ The email address you used to register with edX.
+
+
+ The email address you've provided isn't formatted correctly.
+
+
+
+
+ Password
+
+
+
+ Please enter your password.
+
+
+
+
+
+
+ Need help signing in?
+
+
-
-
- Sign in with your company or school
-
-
-
- Sign in
-
-
-
+
+
+
+ Sign in with your company or school
+
+
+
+ Sign in
+
+
+
+
`;
@@ -346,146 +354,150 @@ exports[`LoginPage should match forget password alert message snapshot 1`] = `
className="d-flex flex-column"
>
-
- Sign In
-
-
-
- Email
-
-
-
- The email address you used to register with edX.
+
+ First time here?
+
+ Create an Account
+ .
+
-
- The email address you've provided isn't formatted correctly.
-
-
-
- Password
-
-
-
- Please enter your password.
-
-
-
-
-
-
- Need help signing in?
-
-
+
+
+ Email
+
+
+
+ The email address you used to register with edX.
+
+
+ The email address you've provided isn't formatted correctly.
+
+
+
+
+ Password
+
+
+
+ Please enter your password.
+
+
+
+
+
+
+ Need help signing in?
+
+
-
-
- Sign in with your company or school
-
-
-
- Sign in
-
-
-
+
+
+
+ Sign in with your company or school
+
+
+
+ Sign in
+
+
+
+
`;
@@ -498,155 +510,159 @@ exports[`LoginPage should match pending button state snapshot 1`] = `
className="d-flex flex-column"
>
-
- Sign In
-
-
-
- Email
-
-
-
- The email address you used to register with edX.
+
+ First time here?
+
+ Create an Account
+ .
+
-
- The email address you've provided isn't formatted correctly.
-
-
-
- Password
-
-
-
- Please enter your password.
-
-
-
-
-
-
- Need help signing in?
-
-
+
+
+ Email
+
+
+
+ The email address you used to register with edX.
+
+
+ The email address you've provided isn't formatted correctly.
+
+
+
+
+ Password
+
+
+
+ Please enter your password.
+
+
+
+
+
+
+ Need help signing in?
+
+
-
-
- Sign in with your company or school
-
-
-
+
+
+
+ Sign in with your company or school
+
+
+ className="pgn__stateful-btn-icon"
+ >
+
+
+ Sign in
- Sign in
-
-
-
+
+
+
`;
@@ -659,163 +675,167 @@ exports[`LoginPage should show error message 1`] = `
className="d-flex flex-column"
>
-
- We couldn't sign you in.
-
-
-
-
- Email or password is incorrect.
-
-
-
-
-
- Sign In
-
-
-
-
- Email
-
-
-
- The email address you used to register with edX.
-
-
- The email address you've provided isn't formatted correctly.
-
-
-
-
- Password
-
-
-
- Please enter your password.
-
-
-
-
-
-
- Need help signing in?
-
-
+
+ We couldn't sign you in.
+
+
+
+
+ Email or password is incorrect.
+
+
+
+
+
+ Sign In
+
+
+
+
+ Email
+
+
+
+ The email address you used to register with edX.
+
+
+ The email address you've provided isn't formatted correctly.
+
+
+
+
+ Password
+
+
+
+ Please enter your password.
+
+
+
+
+
+
+ Need help signing in?
+
+
-
-
- Sign in with your company or school
-
-
-
- Sign in
-
-
-
+
+
+
+ Sign in with your company or school
+
+
+
+ Sign in
+
+
+
+
`;
diff --git a/src/logistration/tests/__snapshots__/RegistrationPage.test.jsx.snap b/src/logistration/tests/__snapshots__/RegistrationPage.test.jsx.snap
index 7a354fb5..e38d2ccf 100644
--- a/src/logistration/tests/__snapshots__/RegistrationPage.test.jsx.snap
+++ b/src/logistration/tests/__snapshots__/RegistrationPage.test.jsx.snap
@@ -8,162 +8,166 @@ exports[`./RegistrationPage.js should display no password field when current pro
className="d-flex flex-column"
>
-
- You've successfully signed into Google. We just need a little more information before you start learning with openedX.
-
-
-
-
-
- Full Name (required)
-
-
-
-
-
- Public Username (required)
-
-
-
-
-
- Email (required)
-
-
-
-
-
- I agree to the Your Platform Name Here
-
- Honor Code
-
-
-
- You must agree to the Your Platform Name Here Honor Code
-
-
-
-
-
- Support education research by providing additional information
-
-
-
-
- Create Account
+
+ You've successfully signed into Google. We just need a little more information before you start learning with openedX.
-
-
+
+
+
+
+
+ Full Name (required)
+
+
+
+
+
+ Public Username (required)
+
+
+
+
+
+ Email (required)
+
+
+
+
+
+ I agree to the Your Platform Name Here
+
+ Honor Code
+
+
+
+ You must agree to the Your Platform Name Here Honor Code
+
+
+
+
+
+ Support education research by providing additional information
+
+
+
+
+ Create Account
+
+
+
+
`;
@@ -176,215 +180,219 @@ exports[`./RegistrationPage.js should match TPA provider snapshot 1`] = `
className="d-flex flex-column"
>
-
-
- Create an account using
-
+
+
+ Create an account using
+
+
+
+
+
+
+
+ Apple
+
+
+
+
+ or create a new one here
+
+
+
+
+
+ Full Name (required)
+
+
+
+
+
+ Public Username (required)
+
+
+
+
+
+ Email (required)
+
+
+
+
+
+ Password (required)
+
+
+
+
+
+ I agree to the Your Platform Name Here
+
+ Honor Code
+
+
+
+ You must agree to the Your Platform Name Here Honor Code
+
+
+
+
+
+ Support education research by providing additional information
+
+
-
-
-
- Apple
+ Create Account
-
-
- or create a new one here
-
+
-
-
-
- Full Name (required)
-
-
-
-
-
- Public Username (required)
-
-
-
-
-
- Email (required)
-
-
-
-
-
- Password (required)
-
-
-
-
-
- I agree to the Your Platform Name Here
-
- Honor Code
-
-
-
- You must agree to the Your Platform Name Here Honor Code
-
-
-
-
-
- Support education research by providing additional information
-
-
-
-
- Create Account
-
-
-
`;
@@ -397,175 +405,179 @@ exports[`./RegistrationPage.js should match default section snapshot 1`] = `
className="d-flex flex-column"
>
-
-
- Full Name (required)
-
-
-
-
-
- Public Username (required)
-
-
-
-
-
- Email (required)
-
-
-
-
-
- Password (required)
-
-
-
-
-
- I agree to the Your Platform Name Here
-
- Honor Code
-
-
-
- You must agree to the Your Platform Name Here Honor Code
-
-
-
-
-
- Support education research by providing additional information
-
-
-
-
- Create Account
+
+ Already have an edX account?
-
-
+
+ Sign in.
+
+
+
+
+
+ Full Name (required)
+
+
+
+
+
+ Public Username (required)
+
+
+
+
+
+ Email (required)
+
+
+
+
+
+ Password (required)
+
+
+
+
+
+ I agree to the Your Platform Name Here
+
+ Honor Code
+
+
+
+ You must agree to the Your Platform Name Here Honor Code
+
+
+
+
+
+ Support education research by providing additional information
+
+
+
+
+ Create Account
+
+
+
+
`;
@@ -578,184 +590,188 @@ exports[`./RegistrationPage.js should match pending button state snapshot 1`] =
className="d-flex flex-column"
>
-
-
- Full Name (required)
-
-
-
-
-
- Public Username (required)
-
-
-
-
-
- Email (required)
-
-
-
-
-
- Password (required)
-
-
-
-
-
- I agree to the Your Platform Name Here
+
+ Already have an edX account?
+
- Honor Code
+ Sign in.
-
-
- You must agree to the Your Platform Name Here Honor Code
-
-
+
+
+ Public Username (required)
+
+
+
+
+
+ Email (required)
+
+
+
+
+
+ Password (required)
+
+
+
+
+
+ I agree to the Your Platform Name Here
+
+ Honor Code
+
+
+
+ You must agree to the Your Platform Name Here Honor Code
+
+
+
+
+
+ Support education research by providing additional information
+
+
+
- Support education research by providing additional information
-