From 6f11c5ec1cd99cd072a469dfb0207d396bbc55c9 Mon Sep 17 00:00:00 2001 From: DD Date: Fri, 8 Sep 2017 11:41:21 -0400 Subject: [PATCH 1/5] don't apply stroke color to brush --- src/containers/blob/style-path.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/containers/blob/style-path.js b/src/containers/blob/style-path.js index b0cbeaba..658d2f77 100644 --- a/src/containers/blob/style-path.js +++ b/src/containers/blob/style-path.js @@ -5,7 +5,6 @@ const stylePath = function (path, options) { // TODO: Add back brush styling. Keep a separate active toolbar style for brush vs pen. // path = pg.stylebar.applyActiveToolbarStyle(path); path.fillColor = options.fillColor; - path.strokeColor = options.strokeColor; } }; @@ -18,8 +17,6 @@ const styleCursorPreview = function (path, options) { // TODO: Add back brush styling. Keep a separate active toolbar style for brush vs pen. // path = pg.stylebar.applyActiveToolbarStyle(path); path.fillColor = options.fillColor; - path.strokeColor = options.strokeColor; - path.strokeWidth = 1; } }; From a05fb5463bc5f957ba84970a3becf42498e2aa3a Mon Sep 17 00:00:00 2001 From: DD Date: Mon, 11 Sep 2017 11:05:02 -0400 Subject: [PATCH 2/5] remove sound editor specific CSS --- src/components/paint-editor.css | 48 --------------------------------- 1 file changed, 48 deletions(-) diff --git a/src/components/paint-editor.css b/src/components/paint-editor.css index c72d45ad..71651430 100644 --- a/src/components/paint-editor.css +++ b/src/components/paint-editor.css @@ -27,20 +27,6 @@ margin-left: calc(2 * $space); } -.waveform-container { - display: flex; - justify-content: space-around; - align-items: center; - width: 100%; - - position: relative; - - background: $ui-pane-gray; - border: 1px solid $ui-pane-border; - border-radius: 5px; - padding: 3px; -} - $border-radius: 0.25rem; .button { @@ -62,40 +48,6 @@ $border-radius: 0.25rem; min-width: 1.5rem; } -.trim-button { - display: flex; - align-items: center; - padding-right: 10px; /* To equalize with empty whitespace from image on left */ -} - -.trim-button > img { - width: 1.5rem; -} - -.trim-button-active { - filter: hue-rotate(155deg); /* @todo replace blue -> red with real submit icon */ -} - -.input-group-right { - flex-grow: 1; - display: flex; - flex-direction: row-reverse; -} - -.effect-button { - flex-basis: 150px; - color: $text-primary; -} - -.effect-button + .effect-button { - margin: 0; -} - -.effect-button img { - width: 60px; - height: 60px; -} - .button-group { margin: 0 1rem; } From 2121a4f438fcc550526eb98c707f4b12fbf05bd7 Mon Sep 17 00:00:00 2001 From: DD Date: Mon, 11 Sep 2017 11:13:43 -0400 Subject: [PATCH 3/5] Add comments on copied files --- src/components/forms/buffered-input-hoc.jsx | 4 ++++ src/components/forms/input.css | 4 ++++ src/components/forms/input.jsx | 4 ++++ src/components/forms/label.css | 4 ++++ src/components/forms/label.jsx | 4 ++++ src/css/colors.css | 4 ++++ src/css/units.css | 4 ++++ 7 files changed, 28 insertions(+) diff --git a/src/components/forms/buffered-input-hoc.jsx b/src/components/forms/buffered-input-hoc.jsx index 246dfc03..b3561136 100644 --- a/src/components/forms/buffered-input-hoc.jsx +++ b/src/components/forms/buffered-input-hoc.jsx @@ -1,3 +1,7 @@ +/* DO NOT EDIT +@todo This file is copied from GUI and should be pulled out into a shared library. +See https://github.com/LLK/scratch-paint/issues/13 */ + import bindAll from 'lodash.bindall'; import PropTypes from 'prop-types'; import React from 'react'; diff --git a/src/components/forms/input.css b/src/components/forms/input.css index 6d5eefa5..36855e44 100644 --- a/src/components/forms/input.css +++ b/src/components/forms/input.css @@ -1,3 +1,7 @@ +/* DO NOT EDIT +@todo This file is copied from GUI and should be pulled out into a shared library. +See https://github.com/LLK/scratch-paint/issues/13 */ + @import "../../css/units.css"; @import "../../css/colors.css"; diff --git a/src/components/forms/input.jsx b/src/components/forms/input.jsx index 6f9cbffa..1c6d087a 100644 --- a/src/components/forms/input.jsx +++ b/src/components/forms/input.jsx @@ -1,3 +1,7 @@ +/* DO NOT EDIT +@todo This file is copied from GUI and should be pulled out into a shared library. +See https://github.com/LLK/scratch-paint/issues/13 */ + import PropTypes from 'prop-types'; import React from 'react'; import classNames from 'classnames'; diff --git a/src/components/forms/label.css b/src/components/forms/label.css index 5eb280b8..7871cdd3 100644 --- a/src/components/forms/label.css +++ b/src/components/forms/label.css @@ -1,3 +1,7 @@ +/* DO NOT EDIT +@todo This file is copied from GUI and should be pulled out into a shared library. +See https://github.com/LLK/scratch-paint/issues/13 */ + @import "../../css/units.css"; @import "../../css/colors.css"; diff --git a/src/components/forms/label.jsx b/src/components/forms/label.jsx index 62f077a7..475ffb00 100644 --- a/src/components/forms/label.jsx +++ b/src/components/forms/label.jsx @@ -1,3 +1,7 @@ +/* DO NOT EDIT +@todo This file is copied from GUI and should be pulled out into a shared library. +See https://github.com/LLK/scratch-paint/issues/13 */ + import PropTypes from 'prop-types'; import React from 'react'; diff --git a/src/css/colors.css b/src/css/colors.css index d524795c..0fe15fca 100644 --- a/src/css/colors.css +++ b/src/css/colors.css @@ -1,3 +1,7 @@ +/* DO NOT EDIT +@todo This file is copied from GUI and should be pulled out into a shared library. +See https://github.com/LLK/scratch-paint/issues/13 */ + $ui-pane-border: #D9D9D9; $ui-pane-gray: #F9F9F9; $ui-background-blue: #e8edf1; diff --git a/src/css/units.css b/src/css/units.css index 3de6174a..acb466b1 100644 --- a/src/css/units.css +++ b/src/css/units.css @@ -1,3 +1,7 @@ +/* DO NOT EDIT +@todo This file is copied from GUI and should be pulled out into a shared library. +See https://github.com/LLK/scratch-paint/issues/13 */ + $space: 0.5rem; $sprites-per-row: 5; From 499635ddf1cf67e75ab16a0c65426cf0b573fdcb Mon Sep 17 00:00:00 2001 From: DD Date: Mon, 11 Sep 2017 13:28:35 -0400 Subject: [PATCH 4/5] convert containers to mysterious non-components --- src/containers/fill-color-indicator.jsx | 18 ++---------------- src/containers/stroke-color-indicator.jsx | 18 ++---------------- 2 files changed, 4 insertions(+), 32 deletions(-) diff --git a/src/containers/fill-color-indicator.jsx b/src/containers/fill-color-indicator.jsx index 6a3084ac..494be917 100644 --- a/src/containers/fill-color-indicator.jsx +++ b/src/containers/fill-color-indicator.jsx @@ -1,26 +1,12 @@ -import PropTypes from 'prop-types'; -import React from 'react'; import {connect} from 'react-redux'; import {changeFillColor} from '../reducers/fill-color'; import FillColorIndicatorComponent from '../components/fill-color-indicator.jsx'; -const FillColorIndicator = props => ( - -); - -FillColorIndicator.propTypes = { - fillColor: PropTypes.string.isRequired, - handleChangeFillColor: PropTypes.func.isRequired -}; - const mapStateToProps = state => ({ fillColor: state.scratchPaint.color.fillColor }); const mapDispatchToProps = dispatch => ({ - handleChangeFillColor: fillColor => { + onChangeFillColor: fillColor => { dispatch(changeFillColor(fillColor)); } }); @@ -28,4 +14,4 @@ const mapDispatchToProps = dispatch => ({ export default connect( mapStateToProps, mapDispatchToProps -)(FillColorIndicator); +)(FillColorIndicatorComponent); diff --git a/src/containers/stroke-color-indicator.jsx b/src/containers/stroke-color-indicator.jsx index 7e4baf67..add989bf 100644 --- a/src/containers/stroke-color-indicator.jsx +++ b/src/containers/stroke-color-indicator.jsx @@ -1,26 +1,12 @@ -import PropTypes from 'prop-types'; -import React from 'react'; import {connect} from 'react-redux'; import {changeStrokeColor} from '../reducers/stroke-color'; import StrokeColorIndicatorComponent from '../components/stroke-color-indicator.jsx'; -const StrokeColorIndicator = props => ( - -); - -StrokeColorIndicator.propTypes = { - handleChangeStrokeColor: PropTypes.func.isRequired, - strokeColor: PropTypes.string.isRequired -}; - const mapStateToProps = state => ({ strokeColor: state.scratchPaint.color.strokeColor }); const mapDispatchToProps = dispatch => ({ - handleChangeStrokeColor: strokeColor => { + onChangeStrokeColor: strokeColor => { dispatch(changeStrokeColor(strokeColor)); } }); @@ -28,4 +14,4 @@ const mapDispatchToProps = dispatch => ({ export default connect( mapStateToProps, mapDispatchToProps -)(StrokeColorIndicator); +)(StrokeColorIndicatorComponent); From d9b683b42cbe5f0b5aa3f668f043db9234524ec8 Mon Sep 17 00:00:00 2001 From: DD Date: Mon, 11 Sep 2017 13:33:06 -0400 Subject: [PATCH 5/5] remove tab index --- src/components/fill-color-indicator.jsx | 1 - src/components/paint-editor.jsx | 1 - src/components/stroke-color-indicator.jsx | 1 - 3 files changed, 3 deletions(-) diff --git a/src/components/fill-color-indicator.jsx b/src/components/fill-color-indicator.jsx index 7a526d58..2cad237a 100644 --- a/src/components/fill-color-indicator.jsx +++ b/src/components/fill-color-indicator.jsx @@ -20,7 +20,6 @@ const FillColorIndicatorComponent = props => (