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

Framework: Replace LinkedStateMixin addon with standalone package #1901

Merged
merged 1 commit into from
Dec 22, 2015
Merged
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
5 changes: 3 additions & 2 deletions client/auth/login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
* External dependencies
*/
import ReactDom from 'react-dom';
import React from 'react/addons';
import React from 'react';
import LinkedStateMixin from 'react-addons-linked-state-mixin';

/**
* Internal dependencies
Expand Down Expand Up @@ -36,7 +37,7 @@ const LostPassword = React.createClass( {
module.exports = React.createClass( {
displayName: 'Auth',

mixins: [ React.addons.LinkedStateMixin, eventRecorder ],
mixins: [ LinkedStateMixin, eventRecorder ],

componentDidMount: function() {
AuthStore.on( 'change', this.refreshData );
Expand Down
5 changes: 3 additions & 2 deletions client/components/forms/form-phone-input/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* External dependencies
*/
var React = require( 'react/addons' ),
var React = require( 'react' ),
LinkedStateMixin = require( 'react-addons-linked-state-mixin' ),
noop = require( 'lodash/utility/noop' ),
first = require( 'lodash/array/first' ),
where = require( 'lodash/collection/where' );
Expand All @@ -21,7 +22,7 @@ var CLEAN_REGEX = /^0|[\s.\-()]+/g;
module.exports = React.createClass( {
displayName: 'FormPhoneInput',

mixins: [ React.addons.LinkedStateMixin ],
mixins: [ LinkedStateMixin ],

propTypes: {
initialCountryCode: React.PropTypes.string,
Expand Down
5 changes: 3 additions & 2 deletions client/me/account-password/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* External dependencies
*/
var React = require( 'react/addons' ),
var React = require( 'react' ),
LinkedStateMixin = require( 'react-addons-linked-state-mixin' ),
debug = require( 'debug' )( 'calypso:me:account-password' ),
_debounce = require( 'lodash/function/debounce' ),
_first = require( 'lodash/array/first' ),
Expand All @@ -28,7 +29,7 @@ module.exports = React.createClass( {

displayName: 'AccountPassword',

mixins: [ React.addons.LinkedStateMixin, protectForm.mixin, observe( 'accountPasswordData' ), eventRecorder ],
mixins: [ LinkedStateMixin, protectForm.mixin, observe( 'accountPasswordData' ), eventRecorder ],

componentDidMount: function() {
this.debouncedPasswordValidate = _debounce( this.validatePassword, 300 );
Expand Down
3 changes: 2 additions & 1 deletion client/me/account/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* External dependencies
*/
import React from 'react/addons';
import LinkedStateMixin from 'react-addons-linked-state-mixin';
import i18n from 'lib/mixins/i18n';
import Debug from 'debug';
import emailValidator from 'email-validator';
Expand Down Expand Up @@ -58,7 +59,7 @@ module.exports = React.createClass( {

mixins: [
formBase,
React.addons.LinkedStateMixin,
LinkedStateMixin,
protectForm.mixin,
observe( 'userSettings', 'username' ),
eventRecorder
Expand Down
7 changes: 4 additions & 3 deletions client/me/application-passwords/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* External dependencies
*/
var React = require( 'react/addons' ),
var React = require( 'react' ),
LinkedStateMixin = require( 'react-addons-linked-state-mixin' ),
debug = require( 'debug' )( 'calypso:application-passwords' );

/**
Expand All @@ -27,7 +28,7 @@ module.exports = React.createClass( {

displayName: 'ApplicationPasswords',

mixins: [ observe( 'appPasswordsData' ), React.addons.LinkedStateMixin, eventRecorder ],
mixins: [ observe( 'appPasswordsData' ), LinkedStateMixin, eventRecorder ],

componentDidMount: function() {
debug( this.displayName + ' React component is mounted.' );
Expand Down Expand Up @@ -177,7 +178,7 @@ module.exports = React.createClass( {
<div>
<SectionHeader label={ this.translate( 'Application Passwords' ) }>
<Button compact onClick={ this.recordClickEvent( 'Create Application Password Button', this.toggleNewPassword ) }>
<Gridicon icon="plus-small" size={ 16 } />
<Gridicon icon="plus-small" size={ 16 } nonStandardSize />
{ this.translate( 'Add New Application Password' ) }
</Button>
</SectionHeader>
Expand Down
5 changes: 3 additions & 2 deletions client/me/help/help-contact-form/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* External dependencies
*/
import React from 'react/addons';
import React from 'react';
import LinkedStateMixin from 'react-addons-linked-state-mixin';
import PureRenderMixin from 'react-pure-render/mixin';
import isEqual from 'lodash/lang/isEqual';

Expand All @@ -27,7 +28,7 @@ const sites = siteList();
module.exports = React.createClass( {
displayName: 'HelpContactForm',

mixins: [ React.addons.LinkedStateMixin, PureRenderMixin ],
mixins: [ LinkedStateMixin, PureRenderMixin ],

propTypes: {
formDescription: React.PropTypes.node,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* External dependencies
*/
import React from 'react/addons';
import React from 'react';
import LinkedStateMixin from 'react-addons-linked-state-mixin';

/**
* Internal dependencies
Expand All @@ -28,7 +29,7 @@ import Main from 'components/main';
module.exports = React.createClass( {
displayName: 'NotificationSubscriptions',

mixins: [ formBase, React.addons.LinkedStateMixin, protectForm.mixin, observe( 'userSettings' ), eventRecorder ],
mixins: [ formBase, LinkedStateMixin, protectForm.mixin, observe( 'userSettings' ), eventRecorder ],

getDeliveryHourLabel( hour ) {
return this.translate(
Expand Down
5 changes: 3 additions & 2 deletions client/me/profile-links-add-other/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* External dependencies
*/
var React = require( 'react/addons' );
var React = require( 'react' ),
LinkedStateMixin = require( 'react-addons-linked-state-mixin' );

/**
* Internal dependencies
Expand All @@ -16,7 +17,7 @@ module.exports = React.createClass( {

displayName: 'ProfileLinksAddOther',

mixins: [ React.addons.LinkedStateMixin, eventRecorder ],
mixins: [ LinkedStateMixin, eventRecorder ],

getInitialState: function() {
return {
Expand Down
5 changes: 3 additions & 2 deletions client/me/profile/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* External dependencies
*/
var React = require( 'react/addons' ),
var React = require( 'react' ),
LinkedStateMixin = require( 'react-addons-linked-state-mixin' ),
debug = require( 'debug' )( 'calypso:me:profile' );

/**
Expand All @@ -28,7 +29,7 @@ module.exports = React.createClass( {

displayName: 'Profile',

mixins: [ formBase, React.addons.LinkedStateMixin, protectForm.mixin, observe( 'userSettings' ), eventRecorder ],
mixins: [ formBase, LinkedStateMixin, protectForm.mixin, observe( 'userSettings' ), eventRecorder ],

componentDidMount: function() {
debug( this.constructor.displayName + ' component is mounted.' );
Expand Down
5 changes: 3 additions & 2 deletions client/me/reauth-required/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* External dependencies
*/
var React = require( 'react/addons' ),
var React = require( 'react' ),
LinkedStateMixin = require( 'react-addons-linked-state-mixin' ),
debug = require( 'debug' )( 'calypso:me:reauth-required' );

/**
Expand All @@ -25,7 +26,7 @@ module.exports = React.createClass( {

displayName: 'ReauthRequired',

mixins: [ React.addons.LinkedStateMixin, observe( 'twoStepAuthorization' ), eventRecorder ],
mixins: [ LinkedStateMixin, observe( 'twoStepAuthorization' ), eventRecorder ],

getInitialState: function() {
return {
Expand Down
5 changes: 3 additions & 2 deletions client/me/security-2fa-backup-codes-prompt/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* External dependencies
*/
var React = require( 'react/addons' ),
var React = require( 'react' ),
LinkedStateMixin = require( 'react-addons-linked-state-mixin' ),
debug = require( 'debug' )( 'calypso:me:security:2fa-backup-codes-prompt' );

/**
Expand All @@ -20,7 +21,7 @@ module.exports = React.createClass( {

displayName: 'Security2faBackupCodesPrompt',

mixins: [ React.addons.LinkedStateMixin ],
mixins: [ LinkedStateMixin ],

propTypes: {
onPrintAgain: React.PropTypes.func,
Expand Down
5 changes: 3 additions & 2 deletions client/me/security-2fa-code-prompt/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* External dependencies
*/
var React = require( 'react/addons' ),
var React = require( 'react' ),
LinkedStateMixin = require( 'react-addons-linked-state-mixin' ),
debug = require( 'debug' )( 'calypso:me:security:2fa-code-prompt' );

/**
Expand All @@ -22,7 +23,7 @@ module.exports = React.createClass( {

displayName: 'Security2faCodePrompt',

mixins: [ React.addons.LinkedStateMixin ],
mixins: [ LinkedStateMixin ],

codeRequestTimer: false,

Expand Down
5 changes: 3 additions & 2 deletions client/me/security-2fa-enable/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* External dependencies
*/
var React = require( 'react/addons' ),
var React = require( 'react' ),
LinkedStateMixin = require( 'react-addons-linked-state-mixin' ),
debug = require( 'debug' )( 'calypso:me:security:2fa-enable' ),
QRCode = require( 'qrcode.react' ),
classNames = require( 'classnames' );
Expand All @@ -24,7 +25,7 @@ module.exports = React.createClass( {

displayName: 'Security2faEnable',

mixins: [ React.addons.LinkedStateMixin ],
mixins: [ LinkedStateMixin ],

codeRequestTimer: false,

Expand Down
5 changes: 3 additions & 2 deletions client/me/security-2fa-sms-settings/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* External dependencies
*/
var React = require( 'react/addons' ),
var React = require( 'react' ),
LinkedStateMixin = require( 'react-addons-linked-state-mixin' ),
debug = require( 'debug' )( 'calypso:me:security:2fa-sms-settings' ),
observe = require( 'lib/mixins/data-observe' );

Expand Down Expand Up @@ -31,7 +32,7 @@ module.exports = React.createClass( {
debug( this.constructor.displayName + ' React component will unmount.' );
},

mixins: [ formBase, React.addons.LinkedStateMixin, protectForm.mixin, observe( 'userSettings' ) ],
mixins: [ formBase, LinkedStateMixin, protectForm.mixin, observe( 'userSettings' ) ],

propTypes: {
onCancel: React.PropTypes.func.isRequired,
Expand Down
5 changes: 3 additions & 2 deletions client/me/security-checkup/edit-email.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
* External dependencies
*/
var ReactDom = require( 'react-dom' ),
React = require( 'react/addons' ),
React = require( 'react' ),
LinkedStateMixin = require( 'react-addons-linked-state-mixin' ),
emailValidator = require( 'email-validator' );

/**
Expand All @@ -17,7 +18,7 @@ var FormFieldset = require( 'components/forms/form-fieldset' ),
module.exports = React.createClass( {
displayName: 'SecurityCheckupRecoveryEmailEdit',

mixins: [ React.addons.LinkedStateMixin ],
mixins: [ LinkedStateMixin ],

propTypes: {
storedEmail: React.PropTypes.string,
Expand Down
5 changes: 3 additions & 2 deletions client/my-sites/ads/form-settings.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* External dependencies
*/
var React = require( 'react/addons' ),
var React = require( 'react' ),
LinkedStateMixin = require( 'react-addons-linked-state-mixin' ),
notices = require( 'notices' ),
debug = require( 'debug' )( 'calypso:my-sites:ads-settings' );

Expand Down Expand Up @@ -29,7 +30,7 @@ module.exports = React.createClass( {

displayName: 'AdsFormSettings',

mixins: [ React.addons.LinkedStateMixin, protectForm.mixin ],
mixins: [ LinkedStateMixin, protectForm.mixin ],

propTypes: {
site: React.PropTypes.object.isRequired,
Expand Down
5 changes: 3 additions & 2 deletions client/my-sites/people/edit-team-member-form/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* External dependencies
*/
var React = require( 'react/addons' ),
var React = require( 'react' ),
LinkedStateMixin = require( 'react-addons-linked-state-mixin' ),
PureRenderMixin = require( 'react-pure-render/mixin' ),
debug = require( 'debug' )( 'calypso:my-sites:people:edit-team-member-form' ),
omit = require( 'lodash/object/omit' ),
Expand Down Expand Up @@ -38,7 +39,7 @@ var Main = require( 'components/main' ),
var EditUserForm = React.createClass( {
displayName: 'EditUserForm',

mixins: [ React.addons.LinkedStateMixin, PureRenderMixin ],
mixins: [ LinkedStateMixin, PureRenderMixin ],

getInitialState: function() {
return this.getStateObject( this.props );
Expand Down
5 changes: 3 additions & 2 deletions client/my-sites/site-settings/delete-site/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* External dependencies
*/
var React = require( 'react/addons' ),
var React = require( 'react' ),
LinkedStateMixin = require( 'react-addons-linked-state-mixin' ),
debug = require( 'debug' )( 'calypso:my-sites:site-settings' ),
page = require( 'page' );

Expand All @@ -25,7 +26,7 @@ module.exports = React.createClass( {

displayName: 'DeleteSite',

mixins: [ React.addons.LinkedStateMixin ],
mixins: [ LinkedStateMixin ],

getInitialState: function() {
return {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"raf": "2.0.4",
"react": "0.14.3",
"react-addons-create-fragment": "0.14.3",
"react-addons-linked-state-mixin": "0.14.3",
"react-day-picker": "1.1.0",
"react-dom": "0.14.3",
"react-pure-render": "1.0.2",
Expand Down