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

Enable reactfied lost password form on the core profiler connection page #95002

Merged
merged 4 commits into from
Oct 16, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Remove currentyQuery props and use from value directly
  • Loading branch information
moon0326 committed Sep 27, 2024
commit 93b30fc6025dfb37d34cfabfd794f92b02e999dc
10 changes: 3 additions & 7 deletions client/blocks/signup-form/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class SignupForm extends Component {
suggestedUsername: PropTypes.string.isRequired,
translate: PropTypes.func.isRequired,
disableTosText: PropTypes.bool,
currentQuery: PropTypes.object,

// Connected props
oauth2Client: PropTypes.object,
sectionName: PropTypes.string,
Expand Down Expand Up @@ -625,7 +625,6 @@ class SignupForm extends Component {
),
pwdResetLink: isReactLostPasswordScreenEnabled() ? (
<a
className="login__form-forgot-password"
href="/"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small accessibility comment - some screenreaders will pick up this href and send the user there instead. Shall we continue using the old non-react url as a fallback?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onClick={ ( event ) => {
event.preventDefault();
Expand All @@ -638,13 +637,11 @@ class SignupForm extends Component {
? 'jetpack/lostpassword'
: 'lostpassword',
oauth2ClientId: this.props.oauth2Client && this.props.oauth2Client.id,
from: get( this.props.currentQuery, 'from' ),
from: this.props.from,
} )
);
} }
>
{ this.props.translate( 'Forgot password?' ) }
</a>
/>
) : (
<a href={ lostPassword( this.props.locale ) } />
),
Expand Down Expand Up @@ -1447,7 +1444,6 @@ export default connect(
isP2Flow( props.flowName ) || get( getCurrentQueryArguments( state ), 'from' ) === 'p2',
isGravatar: isGravatarOAuth2Client( oauth2Client ),
isBlazePro: getIsBlazePro( state ),
currentQuery: getCurrentQueryArguments( state ),
};
},
{
Expand Down
Loading