Replace sprockets/browserify with Webpack ()

* Replace browserify with webpack

* Add react-intl-translations-manager

* Do not minify in development, add offline-plugin for ServiceWorker background cache updates

* Adjust tests and dependencies

* Fix production deployments

* Fix tests

* More optimizations

* Improve travis cache for npm stuff

* Re-run travis

* Add back support for custom.scss as before

* Remove offline-plugin and babili

* Fix issue with Immutable.List().unshift(...values) not working as expected

* Make travis load schema instead of running all migrations in sequence

* Fix missing React import in WarningContainer. Optimize rendering performance by using ImmutablePureComponent instead of
React.PureComponent. ImmutablePureComponent uses Immutable.is() to compare props. Replace dynamic callback bindings in
<UI />

* Add react definitions to places that use JSX

* Add Procfile.dev for running rails, webpack and streaming API at the same time
This commit is contained in:
Eugen Rochko
2017-05-03 02:04:16 +02:00
committed by GitHub
parent 26bc591572
commit f5bf5ebb82
343 changed files with 5299 additions and 2081 deletions
.babelrc.foreman.gitignore.postcssrc.yml.travis.ymlDockerfileGemfileGemfile.lockProcfile.dev
app
assets
helpers
javascript
fonts
images
mastodon
.gitkeep
actions
api.js
components
containers
emoji.js
features
account
account_timeline
blocks
community_timeline
compose
favourited_statuses
favourites
follow_requests
followers
following
generic_not_found
getting_started
hashtag_timeline
home_timeline
mutes
notifications
public_timeline
reblogs
report
status
ui
is_mobile.jslink_header.js
locales
middleware
reducers
rtl.js
selectors
store
stream.jsuuid.js
packs
styles
views
bin
config
docker-compose.ymlpackage.json
spec
yarn.lock

@ -0,0 +1,36 @@
import React from 'react';
import PropTypes from 'prop-types';
class TextIconButton extends React.PureComponent {
constructor (props, context) {
super(props, context);
this.handleClick = this.handleClick.bind(this);
}
handleClick (e) {
e.preventDefault();
this.props.onClick();
}
render () {
const { label, title, active, ariaControls } = this.props;
return (
<button title={title} aria-label={title} className={`text-icon-button ${active ? 'active' : ''}`} aria-expanded={active} onClick={this.handleClick} aria-controls={ariaControls}>
{label}
</button>
);
}
}
TextIconButton.propTypes = {
label: PropTypes.string.isRequired,
title: PropTypes.string,
active: PropTypes.bool,
onClick: PropTypes.func.isRequired,
ariaControls: PropTypes.string
};
export default TextIconButton;