-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Auth: Run codemods; use enzyme, remove mixin injection from tests #18472
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
b687272
Auth: Prettify login.jsx
ockham 567598a
Auth: Run i18n codemod on login.jsx
ockham af1bc2c
Auth: Run react-create-class codemod on login.jsx
ockham 2ed77b2
Auth: Prettify login.jsx
ockham 6535c48
Auth: Simplify login.jsx
ockham c53d690
Auth: Named export for un-localized Login component
ockham 7dae92d
Framework: Upgrade enzyme to 2.9.1
ockham 0a8f689
Auth: Simplify FormTextInput ref (focus)
ockham 21e2cc5
Auth: Use enzyme to test login.jsx
ockham 6454b21
Auth: Remove obsolete refs from login.jsx
ockham 0c8c7fb
Auth: Move SelfHostedInstructions and LostPassword to separate files
ockham File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import React from 'react'; | ||
import { localize } from 'i18n-calypso'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import { addLocaleToWpcomUrl, getLocaleSlug } from 'lib/i18n-utils'; | ||
|
||
const LostPassword = ( { translate } ) => { | ||
const url = addLocaleToWpcomUrl( | ||
'https://wordpress.com/wp-login.php?action=lostpassword', | ||
getLocaleSlug() | ||
); | ||
return ( | ||
<p className="auth__lost-password"> | ||
<a href={ url } target="_blank" rel="noopener noreferrer"> | ||
{ translate( 'Lost your password?' ) } | ||
</a> | ||
</p> | ||
); | ||
}; | ||
|
||
export default localize( LostPassword ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import React from 'react'; | ||
import { localize } from 'i18n-calypso'; | ||
import Gridicon from 'gridicons'; | ||
|
||
const SelfHostedInstructions = ( { onClickClose, translate } ) => ( | ||
<div className="auth__self-hosted-instructions"> | ||
<a href="#" onClick={ onClickClose } className="auth__self-hosted-instructions-close"> | ||
<Gridicon icon="cross" size={ 24 } /> | ||
</a> | ||
|
||
<h2>{ translate( 'Add self-hosted site' ) }</h2> | ||
<p> | ||
{ translate( | ||
'By default when you sign into the WordPress.com app, you can edit blogs and sites hosted at WordPress.com' | ||
) } | ||
</p> | ||
<p> | ||
{ translate( | ||
"If you'd like to edit your self-hosted WordPress blog or site, you can do that by following these instructions:" | ||
) } | ||
</p> | ||
|
||
<ol> | ||
<li> | ||
<strong>{ translate( 'Install the Jetpack plugin.' ) }</strong> | ||
<br /> | ||
<a href="http://jetpack.me/install/"> | ||
{ translate( 'Please follow these instructions to install Jetpack' ) } | ||
</a>. | ||
</li> | ||
<li>{ translate( 'Connect Jetpack to WordPress.com.' ) }</li> | ||
<li> | ||
{ translate( | ||
'Now you can sign in to the app using the WordPress.com account Jetpack is connected to, ' + | ||
'and you can find your self-hosted site under the "My Sites" section.' | ||
) } | ||
</li> | ||
</ol> | ||
</div> | ||
); | ||
|
||
export default localize( SelfHostedInstructions ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We finally are getting rid of those require statements in
before
block :)