diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-09-30 04:29:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-30 04:29:56 +0200 |
commit | ebb8c8920795a31a3188d39b926a5074bb8b69cf (patch) | |
tree | 3e8ece4055bd97ec1f4a47c12085936cc4fc4275 /app/javascript | |
parent | 0060f988478e54cb1b54b255d06376fd9fa265b1 (diff) |
Upgrade to React 16 (#5119)
* Upgrade to React 16.0.0 * Disable some uncritical tests while chai-enzyme remains incompatible
Diffstat (limited to 'app/javascript')
-rw-r--r-- | app/javascript/mastodon/components/column_header.js | 4 | ||||
-rw-r--r-- | app/javascript/mastodon/containers/mastodon.js | 2 | ||||
-rw-r--r-- | app/javascript/mastodon/features/ui/index.js | 2 | ||||
-rw-r--r-- | app/javascript/mastodon/performance.js | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/app/javascript/mastodon/components/column_header.js b/app/javascript/mastodon/components/column_header.js index 05e1de705..e4fa8fa7a 100644 --- a/app/javascript/mastodon/components/column_header.js +++ b/app/javascript/mastodon/components/column_header.js @@ -135,7 +135,7 @@ export default class ColumnHeader extends React.PureComponent { return ( <div className={wrapperClassName}> - <h1 tabIndex={focusable && '0'} role='button' className={buttonClassName} aria-label={title} onClick={this.handleTitleClick}> + <h1 tabIndex={focusable ? 0 : null} role='button' className={buttonClassName} aria-label={title} onClick={this.handleTitleClick}> <i className={`fa fa-fw fa-${icon} column-header__icon`} /> {title} @@ -145,7 +145,7 @@ export default class ColumnHeader extends React.PureComponent { </div> </h1> - <div className={collapsibleClassName} tabIndex={collapsed && -1} onTransitionEnd={this.handleTransitionEnd}> + <div className={collapsibleClassName} tabIndex={collapsed ? -1 : null} onTransitionEnd={this.handleTransitionEnd}> <div className='column-header__collapsible-inner'> {(!collapsed || animating) && collapsedContent} </div> diff --git a/app/javascript/mastodon/containers/mastodon.js b/app/javascript/mastodon/containers/mastodon.js index 884fc161a..31167cbd8 100644 --- a/app/javascript/mastodon/containers/mastodon.js +++ b/app/javascript/mastodon/containers/mastodon.js @@ -5,7 +5,7 @@ import configureStore from '../store/configureStore'; import { showOnboardingOnce } from '../actions/onboarding'; import BrowserRouter from 'react-router-dom/BrowserRouter'; import Route from 'react-router-dom/Route'; -import ScrollContext from 'react-router-scroll/lib/ScrollBehaviorContext'; +import { ScrollContext } from 'react-router-scroll'; import UI from '../features/ui'; import { hydrateStore } from '../actions/store'; import { connectUserStream } from '../actions/streaming'; diff --git a/app/javascript/mastodon/features/ui/index.js b/app/javascript/mastodon/features/ui/index.js index 2a55cfb4c..0e4796fcb 100644 --- a/app/javascript/mastodon/features/ui/index.js +++ b/app/javascript/mastodon/features/ui/index.js @@ -48,7 +48,7 @@ const mapStateToProps = state => ({ @connect(mapStateToProps) @withRouter -export default class UI extends React.PureComponent { +export default class UI extends React.Component { static contextTypes = { router: PropTypes.object.isRequired, diff --git a/app/javascript/mastodon/performance.js b/app/javascript/mastodon/performance.js index 396c605e4..450a90626 100644 --- a/app/javascript/mastodon/performance.js +++ b/app/javascript/mastodon/performance.js @@ -14,8 +14,8 @@ if (process.env.NODE_ENV === 'development') { } marky = require('marky'); // allows us to easily do e.g. ReactPerf.printWasted() while debugging - window.ReactPerf = require('react-addons-perf'); - window.ReactPerf.start(); + //window.ReactPerf = require('react-addons-perf'); + //window.ReactPerf.start(); } export function start(name) { |