React/Redux - publish component #323

Merged
bones7242 merged 80 commits from react-upload into master 2018-01-25 22:43:20 +01:00
13 changed files with 105 additions and 5 deletions
Showing only changes of commit 9af50ed130 - Show all commits

View file

@ -1,4 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';
import ChannelLoginForm from '../containers/ChannelLoginForm.jsx';
import ChannelCreateForm from '../containers/ChannelCreateForm.jsx';
import { connect } from 'react-redux';
@ -67,4 +68,9 @@ const mapStateToProps = state => {
};
};
ChannelSelector.propTypes = {
loggedInChannelName: PropTypes.string,
publishInChannel : PropTypes.bool,
};
export default connect(mapStateToProps, null)(ChannelSelector);

View file

@ -1,5 +1,5 @@
neb-b commented 2018-01-18 06:08:35 +01:00 (Migrated from github.com)
Review

Generally you should avoid doing dom stuff/setting state in componentWillMount. Especially since it seems that they will be removing it in a future React version.

componentDidMount is preferred

Generally you should avoid doing dom stuff/setting state in `componentWillMount`. Especially since it seems that they will be removing it in a future React version. `componentDidMount` is preferred
neb-b commented 2018-01-18 06:08:35 +01:00 (Migrated from github.com)
Review

Generally you should avoid doing dom stuff/setting state in componentWillMount. Especially since it seems that they will be removing it in a future React version.

componentDidMount is preferred

Generally you should avoid doing dom stuff/setting state in `componentWillMount`. Especially since it seems that they will be removing it in a future React version. `componentDidMount` is preferred
import React from 'react';
import {connect} from 'react-redux';
neb-b commented 2018-01-18 06:08:35 +01:00 (Migrated from github.com)
Review

Generally you should avoid doing dom stuff/setting state in componentWillMount. Especially since it seems that they will be removing it in a future React version.

componentDidMount is preferred

Generally you should avoid doing dom stuff/setting state in `componentWillMount`. Especially since it seems that they will be removing it in a future React version. `componentDidMount` is preferred
import PropTypes from 'prop-types';
neb-b commented 2018-01-18 06:08:35 +01:00 (Migrated from github.com)
Review

Generally you should avoid doing dom stuff/setting state in componentWillMount. Especially since it seems that they will be removing it in a future React version.

componentDidMount is preferred

Generally you should avoid doing dom stuff/setting state in `componentWillMount`. Especially since it seems that they will be removing it in a future React version. `componentDidMount` is preferred
class Preview extends React.Component {
constructor (props) {
@ -40,4 +40,10 @@ class Preview extends React.Component {
neb-b commented 2018-01-18 06:08:35 +01:00 (Migrated from github.com)
Review

Generally you should avoid doing dom stuff/setting state in componentWillMount. Especially since it seems that they will be removing it in a future React version.

componentDidMount is preferred

Generally you should avoid doing dom stuff/setting state in `componentWillMount`. Especially since it seems that they will be removing it in a future React version. `componentDidMount` is preferred
neb-b commented 2018-01-18 06:08:35 +01:00 (Migrated from github.com)
Review

Generally you should avoid doing dom stuff/setting state in componentWillMount. Especially since it seems that they will be removing it in a future React version.

componentDidMount is preferred

Generally you should avoid doing dom stuff/setting state in `componentWillMount`. Especially since it seems that they will be removing it in a future React version. `componentDidMount` is preferred
}
};
Preview.propTypes = {
neb-b commented 2018-01-18 06:08:35 +01:00 (Migrated from github.com)
Review

Generally you should avoid doing dom stuff/setting state in componentWillMount. Especially since it seems that they will be removing it in a future React version.

componentDidMount is preferred

Generally you should avoid doing dom stuff/setting state in `componentWillMount`. Especially since it seems that they will be removing it in a future React version. `componentDidMount` is preferred
file : PropTypes.object.isRequired,
neb-b commented 2018-01-18 06:08:35 +01:00 (Migrated from github.com)
Review

Generally you should avoid doing dom stuff/setting state in componentWillMount. Especially since it seems that they will be removing it in a future React version.

componentDidMount is preferred

Generally you should avoid doing dom stuff/setting state in `componentWillMount`. Especially since it seems that they will be removing it in a future React version. `componentDidMount` is preferred
thumbnail : PropTypes.string.isRequired,
neb-b commented 2018-01-18 06:08:35 +01:00 (Migrated from github.com)
Review

Generally you should avoid doing dom stuff/setting state in componentWillMount. Especially since it seems that they will be removing it in a future React version.

componentDidMount is preferred

Generally you should avoid doing dom stuff/setting state in `componentWillMount`. Especially since it seems that they will be removing it in a future React version. `componentDidMount` is preferred
dimPreview: PropTypes.bool.isRequired,
neb-b commented 2018-01-18 06:08:35 +01:00 (Migrated from github.com)
Review

Generally you should avoid doing dom stuff/setting state in componentWillMount. Especially since it seems that they will be removing it in a future React version.

componentDidMount is preferred

Generally you should avoid doing dom stuff/setting state in `componentWillMount`. Especially since it seems that they will be removing it in a future React version. `componentDidMount` is preferred
};
neb-b commented 2018-01-18 06:08:35 +01:00 (Migrated from github.com)
Review

Generally you should avoid doing dom stuff/setting state in componentWillMount. Especially since it seems that they will be removing it in a future React version.

componentDidMount is preferred

Generally you should avoid doing dom stuff/setting state in `componentWillMount`. Especially since it seems that they will be removing it in a future React version. `componentDidMount` is preferred
neb-b commented 2018-01-18 06:08:35 +01:00 (Migrated from github.com)
Review

Generally you should avoid doing dom stuff/setting state in componentWillMount. Especially since it seems that they will be removing it in a future React version.

componentDidMount is preferred

Generally you should avoid doing dom stuff/setting state in `componentWillMount`. Especially since it seems that they will be removing it in a future React version. `componentDidMount` is preferred
export default Preview;

neb-b commented 2018-01-18 06:08:35 +01:00 (Migrated from github.com)
Review

Generally you should avoid doing dom stuff/setting state in componentWillMount. Especially since it seems that they will be removing it in a future React version.

componentDidMount is preferred

Generally you should avoid doing dom stuff/setting state in `componentWillMount`. Especially since it seems that they will be removing it in a future React version. `componentDidMount` is preferred
neb-b commented 2018-01-18 06:08:35 +01:00 (Migrated from github.com)
Review

Generally you should avoid doing dom stuff/setting state in componentWillMount. Especially since it seems that they will be removing it in a future React version.

componentDidMount is preferred

Generally you should avoid doing dom stuff/setting state in `componentWillMount`. Especially since it seems that they will be removing it in a future React version. `componentDidMount` is preferred

View file

@ -1,4 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';
function UrlMiddle ({publishInChannel, loggedInChannelName, loggedInChannelShortId}) {
if (publishInChannel) {
@ -13,4 +14,10 @@ function UrlMiddle ({publishInChannel, loggedInChannelName, loggedInChannelShort
);
}
UrlMiddle.propTypes = {
publishInChannel : PropTypes.bool.isRequired,
loggedInChannelName : PropTypes.string.isRequired,
loggedInChannelShortId: PropTypes.string.isRequired,
};
export default UrlMiddle;

View file

@ -1,6 +1,7 @@
kauffj commented 2018-01-15 20:33:42 +01:00 (Migrated from github.com)
Review

I think just ChannelSelect is a fine name for this. "None" is just a choice.

I think just `ChannelSelect` is a fine name for this. "None" is just a choice.
kauffj commented 2018-01-15 20:33:42 +01:00 (Migrated from github.com)
Review

I think just ChannelSelect is a fine name for this. "None" is just a choice.

I think just `ChannelSelect` is a fine name for this. "None" is just a choice.
import React from 'react';
import { setPublishInChannel } from '../actions/index';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
kauffj commented 2018-01-15 20:33:42 +01:00 (Migrated from github.com)
Review

I think just ChannelSelect is a fine name for this. "None" is just a choice.

I think just `ChannelSelect` is a fine name for this. "None" is just a choice.
class AnonymousOrChannelSelect extends React.Component {
constructor (props) {
@ -45,4 +46,9 @@ const mapDispatchToProps = dispatch => {
kauffj commented 2018-01-15 20:33:42 +01:00 (Migrated from github.com)
Review

I think just ChannelSelect is a fine name for this. "None" is just a choice.

I think just `ChannelSelect` is a fine name for this. "None" is just a choice.
kauffj commented 2018-01-15 20:33:42 +01:00 (Migrated from github.com)
Review

I think just ChannelSelect is a fine name for this. "None" is just a choice.

I think just `ChannelSelect` is a fine name for this. "None" is just a choice.
};
}
AnonymousOrChannelSelect.propTypes = {
kauffj commented 2018-01-15 20:33:42 +01:00 (Migrated from github.com)
Review

I think just ChannelSelect is a fine name for this. "None" is just a choice.

I think just `ChannelSelect` is a fine name for this. "None" is just a choice.
publishInChannel : PropTypes.bool.isRequired,
kauffj commented 2018-01-15 20:33:42 +01:00 (Migrated from github.com)
Review

I think just ChannelSelect is a fine name for this. "None" is just a choice.

I think just `ChannelSelect` is a fine name for this. "None" is just a choice.
onPublishInChannelChange: PropTypes.func.isRequired,
kauffj commented 2018-01-15 20:33:42 +01:00 (Migrated from github.com)
Review

I think just ChannelSelect is a fine name for this. "None" is just a choice.

I think just `ChannelSelect` is a fine name for this. "None" is just a choice.
};
kauffj commented 2018-01-15 20:33:42 +01:00 (Migrated from github.com)
Review

I think just ChannelSelect is a fine name for this. "None" is just a choice.

I think just `ChannelSelect` is a fine name for this. "None" is just a choice.
kauffj commented 2018-01-15 20:33:42 +01:00 (Migrated from github.com)
Review

I think just ChannelSelect is a fine name for this. "None" is just a choice.

I think just `ChannelSelect` is a fine name for this. "None" is just a choice.
export default connect(mapStateToProps, mapDispatchToProps)(AnonymousOrChannelSelect);

kauffj commented 2018-01-15 20:33:42 +01:00 (Migrated from github.com)
Review

I think just ChannelSelect is a fine name for this. "None" is just a choice.

I think just `ChannelSelect` is a fine name for this. "None" is just a choice.
kauffj commented 2018-01-15 20:33:42 +01:00 (Migrated from github.com)
Review

I think just ChannelSelect is a fine name for this. "None" is just a choice.

I think just `ChannelSelect` is a fine name for this. "None" is just a choice.

View file

@ -4,6 +4,7 @@ import {updateLoggedInChannel} from '../actions/index';
import { makeGetRequest, makePostRequest } from '../utils/xhr.js';
import { setUserCookies } from '../utils/cookies.js';
import { replaceChannelSelectionInNavBar } from '../utils/page.js';
import PropTypes from 'prop-types';
class ChannelCreateForm extends React.Component {
constructor (props) {
@ -170,4 +171,8 @@ const mapDispatchToProps = dispatch => {
};
};
ChannelCreateForm.propTypes = {
onChannelLogin: PropTypes.func.isRequired,
};
export default connect(null, mapDispatchToProps)(ChannelCreateForm);

View file

@ -4,6 +4,7 @@ import { connect } from 'react-redux';
import { updateLoggedInChannel } from '../actions/index';
import { setUserCookies } from '../utils/cookies.js';
import { replaceChannelSelectionInNavBar } from '../utils/page.js';
import PropTypes from 'prop-types';
class ChannelLoginForm extends React.Component {
constructor (props) {
@ -82,4 +83,8 @@ const mapDispatchToProps = dispatch => {
};
};
ChannelLoginForm.propTypes = {
onChannelLogin: PropTypes.func.isRequired,
};
export default connect(null, mapDispatchToProps)(ChannelLoginForm);

View file

@ -1,9 +1,9 @@
import React from 'react';
// import PropTypes from 'prop-types';
import { selectFile, updateError } from '../actions';
import { connect } from 'react-redux';
import Preview from '../components/Preview.jsx';
import { validateFile } from '../utils/file.js';
import PropTypes from 'prop-types';
class Dropzone extends React.Component {
constructor (props) {
@ -12,7 +12,7 @@ class Dropzone extends React.Component {
dragOver : false,
mouseOver : false,
dimPreview: false,
}
};
this.handleDrop = this.handleDrop.bind(this);
this.handleDragOver = this.handleDragOver.bind(this);
this.handleDragEnd = this.handleDragEnd.bind(this);
@ -157,6 +157,13 @@ const mapDispatchToProps = dispatch => {
dispatch(updateError('file', value));
},
};
}
};
Dropzone.propTypes = {
file : PropTypes.object,
thumbnail : PropTypes.string.isRequired,
fileError : PropTypes.string,
onFileError: PropTypes.func.isRequired,
};
export default connect(mapStateToProps, mapDispatchToProps)(Dropzone);

View file

@ -9,6 +9,7 @@ import AnonymousOrChannelSelect from './AnonymousOrChannelSelect.jsx';
kauffj commented 2018-01-15 20:25:38 +01:00 (Migrated from github.com)
Review

These consts need to be shared across files

These consts need to be shared across files
kauffj commented 2018-01-15 20:31:56 +01:00 (Migrated from github.com)
Review

I suspect this shouldn't be necessary with addition of Redux

I suspect this shouldn't be necessary with addition of Redux
kauffj commented 2018-01-15 20:25:38 +01:00 (Migrated from github.com)
Review

These consts need to be shared across files

These consts need to be shared across files
kauffj commented 2018-01-15 20:31:56 +01:00 (Migrated from github.com)
Review

I suspect this shouldn't be necessary with addition of Redux

I suspect this shouldn't be necessary with addition of Redux
import { connect } from 'react-redux';
import { getCookie } from '../utils/cookies.js';
import {selectFile, clearFile, updateLoggedInChannel, updatePublishStatus, updateError} from '../actions';
import PropTypes from 'prop-types';
kauffj commented 2018-01-15 20:25:38 +01:00 (Migrated from github.com)
Review

These consts need to be shared across files

These consts need to be shared across files
kauffj commented 2018-01-15 20:31:56 +01:00 (Migrated from github.com)
Review

I suspect this shouldn't be necessary with addition of Redux

I suspect this shouldn't be necessary with addition of Redux
const LOAD_START = 'LOAD_START';
const LOADING = 'LOADING';
@ -230,4 +231,24 @@ const mapDispatchToProps = dispatch => {
kauffj commented 2018-01-15 20:25:38 +01:00 (Migrated from github.com)
Review

These consts need to be shared across files

These consts need to be shared across files
kauffj commented 2018-01-15 20:31:56 +01:00 (Migrated from github.com)
Review

I suspect this shouldn't be necessary with addition of Redux

I suspect this shouldn't be necessary with addition of Redux
kauffj commented 2018-01-15 20:25:38 +01:00 (Migrated from github.com)
Review

These consts need to be shared across files

These consts need to be shared across files
kauffj commented 2018-01-15 20:31:56 +01:00 (Migrated from github.com)
Review

I suspect this shouldn't be necessary with addition of Redux

I suspect this shouldn't be necessary with addition of Redux
};
};
PublishForm.propTypes = {
kauffj commented 2018-01-15 20:25:38 +01:00 (Migrated from github.com)
Review

These consts need to be shared across files

These consts need to be shared across files
kauffj commented 2018-01-15 20:31:56 +01:00 (Migrated from github.com)
Review

I suspect this shouldn't be necessary with addition of Redux

I suspect this shouldn't be necessary with addition of Redux
file : PropTypes.object.isRequired,
kauffj commented 2018-01-15 20:25:38 +01:00 (Migrated from github.com)
Review

These consts need to be shared across files

These consts need to be shared across files
kauffj commented 2018-01-15 20:31:56 +01:00 (Migrated from github.com)
Review

I suspect this shouldn't be necessary with addition of Redux

I suspect this shouldn't be necessary with addition of Redux
claim : PropTypes.string.isRequired,
kauffj commented 2018-01-15 20:25:38 +01:00 (Migrated from github.com)
Review

These consts need to be shared across files

These consts need to be shared across files
kauffj commented 2018-01-15 20:31:56 +01:00 (Migrated from github.com)
Review

I suspect this shouldn't be necessary with addition of Redux

I suspect this shouldn't be necessary with addition of Redux
title : PropTypes.string.isRequired,
kauffj commented 2018-01-15 20:25:38 +01:00 (Migrated from github.com)
Review

These consts need to be shared across files

These consts need to be shared across files
kauffj commented 2018-01-15 20:31:56 +01:00 (Migrated from github.com)
Review

I suspect this shouldn't be necessary with addition of Redux

I suspect this shouldn't be necessary with addition of Redux
thumbnail : PropTypes.string.isRequired,
kauffj commented 2018-01-15 20:25:38 +01:00 (Migrated from github.com)
Review

These consts need to be shared across files

These consts need to be shared across files
kauffj commented 2018-01-15 20:31:56 +01:00 (Migrated from github.com)
Review

I suspect this shouldn't be necessary with addition of Redux

I suspect this shouldn't be necessary with addition of Redux
description : PropTypes.string.isRequired,
kauffj commented 2018-01-15 20:25:38 +01:00 (Migrated from github.com)
Review

These consts need to be shared across files

These consts need to be shared across files
kauffj commented 2018-01-15 20:31:56 +01:00 (Migrated from github.com)
Review

I suspect this shouldn't be necessary with addition of Redux

I suspect this shouldn't be necessary with addition of Redux
license : PropTypes.string.isRequired,
kauffj commented 2018-01-15 20:25:38 +01:00 (Migrated from github.com)
Review

These consts need to be shared across files

These consts need to be shared across files
kauffj commented 2018-01-15 20:31:56 +01:00 (Migrated from github.com)
Review

I suspect this shouldn't be necessary with addition of Redux

I suspect this shouldn't be necessary with addition of Redux
nsfw : PropTypes.bool.isRequired,
kauffj commented 2018-01-15 20:25:38 +01:00 (Migrated from github.com)
Review

These consts need to be shared across files

These consts need to be shared across files
kauffj commented 2018-01-15 20:31:56 +01:00 (Migrated from github.com)
Review

I suspect this shouldn't be necessary with addition of Redux

I suspect this shouldn't be necessary with addition of Redux
loggedInChannel : PropTypes.object.isRequired,
kauffj commented 2018-01-15 20:25:38 +01:00 (Migrated from github.com)
Review

These consts need to be shared across files

These consts need to be shared across files
kauffj commented 2018-01-15 20:31:56 +01:00 (Migrated from github.com)
Review

I suspect this shouldn't be necessary with addition of Redux

I suspect this shouldn't be necessary with addition of Redux
publishInChannel : PropTypes.bool.isRequired,
kauffj commented 2018-01-15 20:25:38 +01:00 (Migrated from github.com)
Review

These consts need to be shared across files

These consts need to be shared across files
kauffj commented 2018-01-15 20:31:56 +01:00 (Migrated from github.com)
Review

I suspect this shouldn't be necessary with addition of Redux

I suspect this shouldn't be necessary with addition of Redux
fileError : PropTypes.string,
kauffj commented 2018-01-15 20:25:38 +01:00 (Migrated from github.com)
Review

These consts need to be shared across files

These consts need to be shared across files
kauffj commented 2018-01-15 20:31:56 +01:00 (Migrated from github.com)
Review

I suspect this shouldn't be necessary with addition of Redux

I suspect this shouldn't be necessary with addition of Redux
urlError : PropTypes.string,
kauffj commented 2018-01-15 20:25:38 +01:00 (Migrated from github.com)
Review

These consts need to be shared across files

These consts need to be shared across files
kauffj commented 2018-01-15 20:31:56 +01:00 (Migrated from github.com)
Review

I suspect this shouldn't be necessary with addition of Redux

I suspect this shouldn't be necessary with addition of Redux
publishRequestError : PropTypes.string,
kauffj commented 2018-01-15 20:25:38 +01:00 (Migrated from github.com)
Review

These consts need to be shared across files

These consts need to be shared across files
kauffj commented 2018-01-15 20:31:56 +01:00 (Migrated from github.com)
Review

I suspect this shouldn't be necessary with addition of Redux

I suspect this shouldn't be necessary with addition of Redux
onFileSelect : PropTypes.func.isRequired,
kauffj commented 2018-01-15 20:25:38 +01:00 (Migrated from github.com)
Review

These consts need to be shared across files

These consts need to be shared across files
kauffj commented 2018-01-15 20:31:56 +01:00 (Migrated from github.com)
Review

I suspect this shouldn't be necessary with addition of Redux

I suspect this shouldn't be necessary with addition of Redux
onFileClear : PropTypes.func.isRequired,
kauffj commented 2018-01-15 20:25:38 +01:00 (Migrated from github.com)
Review

These consts need to be shared across files

These consts need to be shared across files
kauffj commented 2018-01-15 20:31:56 +01:00 (Migrated from github.com)
Review

I suspect this shouldn't be necessary with addition of Redux

I suspect this shouldn't be necessary with addition of Redux
onChannelLogin : PropTypes.func.isRequired,
kauffj commented 2018-01-15 20:25:38 +01:00 (Migrated from github.com)
Review

These consts need to be shared across files

These consts need to be shared across files
kauffj commented 2018-01-15 20:31:56 +01:00 (Migrated from github.com)
Review

I suspect this shouldn't be necessary with addition of Redux

I suspect this shouldn't be necessary with addition of Redux
onPublishStatusChange: PropTypes.func.isRequired,
kauffj commented 2018-01-15 20:25:38 +01:00 (Migrated from github.com)
Review

These consts need to be shared across files

These consts need to be shared across files
kauffj commented 2018-01-15 20:31:56 +01:00 (Migrated from github.com)
Review

I suspect this shouldn't be necessary with addition of Redux

I suspect this shouldn't be necessary with addition of Redux
onPublishRequestError: PropTypes.func.isRequired,
kauffj commented 2018-01-15 20:25:38 +01:00 (Migrated from github.com)
Review

These consts need to be shared across files

These consts need to be shared across files
kauffj commented 2018-01-15 20:31:56 +01:00 (Migrated from github.com)
Review

I suspect this shouldn't be necessary with addition of Redux

I suspect this shouldn't be necessary with addition of Redux
};
kauffj commented 2018-01-15 20:25:38 +01:00 (Migrated from github.com)
Review

These consts need to be shared across files

These consts need to be shared across files
kauffj commented 2018-01-15 20:31:56 +01:00 (Migrated from github.com)
Review

I suspect this shouldn't be necessary with addition of Redux

I suspect this shouldn't be necessary with addition of Redux
kauffj commented 2018-01-15 20:25:38 +01:00 (Migrated from github.com)
Review

These consts need to be shared across files

These consts need to be shared across files
kauffj commented 2018-01-15 20:31:56 +01:00 (Migrated from github.com)
Review

I suspect this shouldn't be necessary with addition of Redux

I suspect this shouldn't be necessary with addition of Redux
export default connect(mapStateToProps, mapDispatchToProps)(PublishForm);

kauffj commented 2018-01-15 20:25:38 +01:00 (Migrated from github.com)
Review

These consts need to be shared across files

These consts need to be shared across files
kauffj commented 2018-01-15 20:31:56 +01:00 (Migrated from github.com)
Review

I suspect this shouldn't be necessary with addition of Redux

I suspect this shouldn't be necessary with addition of Redux
kauffj commented 2018-01-15 20:25:38 +01:00 (Migrated from github.com)
Review

These consts need to be shared across files

These consts need to be shared across files
kauffj commented 2018-01-15 20:31:56 +01:00 (Migrated from github.com)
Review

I suspect this shouldn't be necessary with addition of Redux

I suspect this shouldn't be necessary with addition of Redux

View file

@ -1,6 +1,7 @@
import React from 'react';
import { connect } from 'react-redux';
import { updateMetadata } from '../actions/index';
import PropTypes from 'prop-types';
/*
const textarea = document.getElementById('publish-description');
@ -101,4 +102,11 @@ const mapDispatchToProps = dispatch => {
};
};
MetadataInputs.propTypes = {
description : PropTypes.string.isRequired,
license : PropTypes.string.isRequired,
nsfw : PropTypes.bool.isRequired,
onMetadataChange: PropTypes.func.isRequired,
};
export default connect(mapStateToProps, mapDispatchToProps)(MetadataInputs);

View file

@ -1,6 +1,7 @@
kauffj commented 2018-01-15 20:30:54 +01:00 (Migrated from github.com)
Review

I suspect there is a less hacky way to do this ;)

I suspect there is a less hacky way to do this ;)
kauffj commented 2018-01-15 20:30:54 +01:00 (Migrated from github.com)
Review

I suspect there is a less hacky way to do this ;)

I suspect there is a less hacky way to do this ;)
import React from 'react';
import { connect } from 'react-redux';
import { updateMetadata } from '../actions/index';
import PropTypes from 'prop-types';
kauffj commented 2018-01-15 20:30:54 +01:00 (Migrated from github.com)
Review

I suspect there is a less hacky way to do this ;)

I suspect there is a less hacky way to do this ;)
class ThumbnailInput extends React.Component {
constructor (props) {
@ -83,4 +84,9 @@ const mapDispatchToProps = dispatch => {
kauffj commented 2018-01-15 20:30:54 +01:00 (Migrated from github.com)
Review

I suspect there is a less hacky way to do this ;)

I suspect there is a less hacky way to do this ;)
kauffj commented 2018-01-15 20:30:54 +01:00 (Migrated from github.com)
Review

I suspect there is a less hacky way to do this ;)

I suspect there is a less hacky way to do this ;)
};
};
ThumbnailInput.propTypes = {
kauffj commented 2018-01-15 20:30:54 +01:00 (Migrated from github.com)
Review

I suspect there is a less hacky way to do this ;)

I suspect there is a less hacky way to do this ;)
thumbnail : PropTypes.string.isRequired,
kauffj commented 2018-01-15 20:30:54 +01:00 (Migrated from github.com)
Review

I suspect there is a less hacky way to do this ;)

I suspect there is a less hacky way to do this ;)
onThumbnailChange: PropTypes.func.isRequired,
kauffj commented 2018-01-15 20:30:54 +01:00 (Migrated from github.com)
Review

I suspect there is a less hacky way to do this ;)

I suspect there is a less hacky way to do this ;)
};
kauffj commented 2018-01-15 20:30:54 +01:00 (Migrated from github.com)
Review

I suspect there is a less hacky way to do this ;)

I suspect there is a less hacky way to do this ;)
kauffj commented 2018-01-15 20:30:54 +01:00 (Migrated from github.com)
Review

I suspect there is a less hacky way to do this ;)

I suspect there is a less hacky way to do this ;)
export default connect(mapStateToProps, mapDispatchToProps)(ThumbnailInput);

kauffj commented 2018-01-15 20:30:54 +01:00 (Migrated from github.com)
Review

I suspect there is a less hacky way to do this ;)

I suspect there is a less hacky way to do this ;)
kauffj commented 2018-01-15 20:30:54 +01:00 (Migrated from github.com)
Review

I suspect there is a less hacky way to do this ;)

I suspect there is a less hacky way to do this ;)

View file

@ -1,6 +1,7 @@
import React from 'react';
import {updateMetadata} from '../actions/index';
import {connect} from 'react-redux';
import PropTypes from 'prop-types';
class TitleInput extends React.Component {
constructor (props) {
@ -34,4 +35,9 @@ const mapDispatchToProps = dispatch => {
};
}
TitleInput.propTypes = {
title : PropTypes.string.isRequired,
onMetadataChange: PropTypes.func.isRequired,
};
export default connect(mapStateToProps, mapDispatchToProps)(TitleInput);

View file

@ -3,6 +3,7 @@ import Dropzone from './Dropzone.jsx';
import PublishForm from './PublishForm.jsx';
import PublishStatus from '../components/PublishStatus.jsx';
import {connect} from 'react-redux';
import PropTypes from 'prop-types';
class PublishTool extends React.Component {
render () {
@ -31,4 +32,10 @@ const mapStateToProps = state => {
};
};
PublishTool.propTypes = {
file : PropTypes.object,
status : PropTypes.string,
message: PropTypes.string,
};
export default connect(mapStateToProps, null)(PublishTool);

View file

@ -4,6 +4,7 @@ import { connect } from 'react-redux';
kauffj commented 2018-01-15 20:29:33 +01:00 (Migrated from github.com)
Review

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).
kauffj commented 2018-01-15 20:29:33 +01:00 (Migrated from github.com)
Review

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).
import { makeGetRequest } from '../utils/xhr.js';
import UrlMiddle from '../components/PublishUrlMiddle.jsx';
import {updateError} from '../actions';
import PropTypes from 'prop-types';
kauffj commented 2018-01-15 20:29:33 +01:00 (Migrated from github.com)
Review

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).
class UrlChooser extends React.Component {
constructor (props) {
@ -101,6 +102,15 @@ const mapDispatchToProps = dispatch => {
kauffj commented 2018-01-15 20:29:33 +01:00 (Migrated from github.com)
Review

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).
kauffj commented 2018-01-15 20:29:33 +01:00 (Migrated from github.com)
Review

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).
dispatch(updateError('url', value));
},
};
}
kauffj commented 2018-01-15 20:29:33 +01:00 (Migrated from github.com)
Review

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).
};
kauffj commented 2018-01-15 20:29:33 +01:00 (Migrated from github.com)
Review

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).
kauffj commented 2018-01-15 20:29:33 +01:00 (Migrated from github.com)
Review

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).
UrlChooser.propTypes = {
kauffj commented 2018-01-15 20:29:33 +01:00 (Migrated from github.com)
Review

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).
fileName : PropTypes.string.isRequired,
kauffj commented 2018-01-15 20:29:33 +01:00 (Migrated from github.com)
Review

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).
loggedInChannelName : PropTypes.string.isRequired,
kauffj commented 2018-01-15 20:29:33 +01:00 (Migrated from github.com)
Review

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).
loggedInChannelShortId: PropTypes.string.isRequired,
kauffj commented 2018-01-15 20:29:33 +01:00 (Migrated from github.com)
Review

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).
publishInChannel : PropTypes.bool.isRequired,
kauffj commented 2018-01-15 20:29:33 +01:00 (Migrated from github.com)
Review

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).
claim : PropTypes.string.isRequired,
kauffj commented 2018-01-15 20:29:33 +01:00 (Migrated from github.com)
Review

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).
urlError : PropTypes.string,
kauffj commented 2018-01-15 20:29:33 +01:00 (Migrated from github.com)
Review

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).
};
kauffj commented 2018-01-15 20:29:33 +01:00 (Migrated from github.com)
Review

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).
export default connect(mapStateToProps, mapDispatchToProps)(UrlChooser);

kauffj commented 2018-01-15 20:29:33 +01:00 (Migrated from github.com)
Review

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).
kauffj commented 2018-01-15 20:29:33 +01:00 (Migrated from github.com)
Review

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).

You should look at some of the linting additions @IGassman has added to app, could help keep these imports consistent in path specification (among other improvements).