From b98a8ed0ff632bd5295364f09ebf95b658e04258 Mon Sep 17 00:00:00 2001 From: Spencer Phillipson Date: Mon, 24 Jun 2019 16:29:24 -0700 Subject: [PATCH 1/6] added info feature --- src/blurbs/burstBlurb.js | 4 +++ src/blurbs/previewBlurb.js | 4 +++ src/blurbs/settingsBlurb.js | 4 +++ src/components/Burst.js | 5 ++++ src/components/Info.css | 51 +++++++++++++++++++++++++++++++++++ src/components/Info.js | 44 ++++++++++++++++++++++++++++++ src/components/Preview.js | 3 +++ src/components/Settings.js | 3 +++ src/components/icons/info.svg | 1 + 9 files changed, 119 insertions(+) create mode 100644 src/blurbs/burstBlurb.js create mode 100644 src/blurbs/previewBlurb.js create mode 100644 src/blurbs/settingsBlurb.js create mode 100644 src/components/Info.css create mode 100644 src/components/Info.js create mode 100644 src/components/icons/info.svg diff --git a/src/blurbs/burstBlurb.js b/src/blurbs/burstBlurb.js new file mode 100644 index 0000000..cbc78a2 --- /dev/null +++ b/src/blurbs/burstBlurb.js @@ -0,0 +1,4 @@ +const burstBlurb = + 'Burst allows you to generate multiple snapshots of your graph at one time. Enter the relevant info in the input fields and hit capture to watch the magic happen.'; + +export default burstBlurb; diff --git a/src/blurbs/previewBlurb.js b/src/blurbs/previewBlurb.js new file mode 100644 index 0000000..e5ad802 --- /dev/null +++ b/src/blurbs/previewBlurb.js @@ -0,0 +1,4 @@ +const previewBlurb = + 'Preview allows you to preview your future GIF by scrubbing through snapshots with the slider or previewing your GIF with the play/pause button.'; + +export default previewBlurb; diff --git a/src/blurbs/settingsBlurb.js b/src/blurbs/settingsBlurb.js new file mode 100644 index 0000000..923ae68 --- /dev/null +++ b/src/blurbs/settingsBlurb.js @@ -0,0 +1,4 @@ +const settingsBlurb = + 'The settings panel allows you to set your desired image dimensions as well as the interval between frames in the generated GIF.'; + +export default settingsBlurb; diff --git a/src/components/Burst.js b/src/components/Burst.js index 4b3a7fe..b3e573e 100644 --- a/src/components/Burst.js +++ b/src/components/Burst.js @@ -2,6 +2,8 @@ import React, { Component } from 'react'; import classNames from 'classnames'; import { getBurstErrors } from '../lib/input-helpers'; import './Burst.css'; +import Info from './Info'; +import burstBlurb from '../blurbs/burstBlurb.js'; class Burst extends Component { constructor(props) { @@ -45,6 +47,9 @@ class Burst extends Component { return (
+
+ +
Slider Index
+
+

{this.props.title}

+
+ info icon +
+

{this.props.blurb}

+ +

More Info

+
+
+
+
+
+ ); + } +} diff --git a/src/components/Preview.js b/src/components/Preview.js index 485895a..1d0aa14 100644 --- a/src/components/Preview.js +++ b/src/components/Preview.js @@ -1,7 +1,9 @@ import React, { Component } from 'react'; import classNames from 'classnames'; import Frame from './Frame'; +import Info from './Info'; import './Preview.css'; +import previewBlurb from '../blurbs/previewBlurb'; class Preview extends Component { constructor(props) { @@ -63,6 +65,7 @@ class Preview extends Component { return (
+ +
Image Width
info(white) \ No newline at end of file From 9abfba8d990947862b69e166d7c6889e7271115d Mon Sep 17 00:00:00 2001 From: Spencer Phillipson Date: Mon, 24 Jun 2019 16:40:55 -0700 Subject: [PATCH 2/6] minor style fixes --- src/components/Info.css | 8 ++++---- src/components/Info.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/Info.css b/src/components/Info.css index e4bfb21..4e5ed77 100644 --- a/src/components/Info.css +++ b/src/components/Info.css @@ -1,6 +1,6 @@ .Info-icon { - height: 20px; - width: 20px; + height: 17px; + width: 17px; margin-left: 10px; margin-top: 7px; } @@ -15,7 +15,7 @@ align-items: center; } -.Info-header h1 { +.Info-header h2 { color: #fff; } @@ -34,7 +34,7 @@ color: #fff; font-size: 13px; padding: 15px; - border-radius: 20px; + border-radius: 5px; text-align: left; } diff --git a/src/components/Info.js b/src/components/Info.js index 440053d..35c6d09 100644 --- a/src/components/Info.js +++ b/src/components/Info.js @@ -22,7 +22,7 @@ export default class Info extends Component { return (
-

{this.props.title}

+

{this.props.title}

Date: Mon, 24 Jun 2019 16:50:28 -0700 Subject: [PATCH 3/6] Adding info for folder pane --- src/blurbs/folderBlurb.js | 4 ++++ src/components/Burst.js | 1 - src/components/Folder.js | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 src/blurbs/folderBlurb.js diff --git a/src/blurbs/folderBlurb.js b/src/blurbs/folderBlurb.js new file mode 100644 index 0000000..fb5affa --- /dev/null +++ b/src/blurbs/folderBlurb.js @@ -0,0 +1,4 @@ +const folderBlurb = + 'The folder allows you to save your graphs so you can come back to them at a later time.'; + +export default folderBlurb; diff --git a/src/components/Burst.js b/src/components/Burst.js index 8c69164..52ec66d 100644 --- a/src/components/Burst.js +++ b/src/components/Burst.js @@ -50,7 +50,6 @@ class Burst extends Component {
-
Slider Index
Slider Index
+
Name
Date: Tue, 25 Jun 2019 15:36:39 -0700 Subject: [PATCH 4/6] Fixing PR --- src/blurbs/burstBlurb.js | 4 ---- src/blurbs/folderBlurb.js | 4 ---- src/blurbs/previewBlurb.js | 4 ---- src/blurbs/settingsBlurb.js | 4 ---- src/components/Burst.css | 6 ++++++ src/components/Burst.js | 7 +++++-- src/components/Folder.css | 6 ++++++ src/components/Folder.js | 9 +++++++-- src/components/Info.css | 23 ++++++----------------- src/components/Info.js | 29 +++++++++++++---------------- src/components/Preview.css | 14 ++++++++++++++ src/components/Preview.js | 10 ++++++++-- src/components/Settings.js | 8 ++++++-- 13 files changed, 71 insertions(+), 57 deletions(-) delete mode 100644 src/blurbs/burstBlurb.js delete mode 100644 src/blurbs/folderBlurb.js delete mode 100644 src/blurbs/previewBlurb.js delete mode 100644 src/blurbs/settingsBlurb.js diff --git a/src/blurbs/burstBlurb.js b/src/blurbs/burstBlurb.js deleted file mode 100644 index cbc78a2..0000000 --- a/src/blurbs/burstBlurb.js +++ /dev/null @@ -1,4 +0,0 @@ -const burstBlurb = - 'Burst allows you to generate multiple snapshots of your graph at one time. Enter the relevant info in the input fields and hit capture to watch the magic happen.'; - -export default burstBlurb; diff --git a/src/blurbs/folderBlurb.js b/src/blurbs/folderBlurb.js deleted file mode 100644 index fb5affa..0000000 --- a/src/blurbs/folderBlurb.js +++ /dev/null @@ -1,4 +0,0 @@ -const folderBlurb = - 'The folder allows you to save your graphs so you can come back to them at a later time.'; - -export default folderBlurb; diff --git a/src/blurbs/previewBlurb.js b/src/blurbs/previewBlurb.js deleted file mode 100644 index e5ad802..0000000 --- a/src/blurbs/previewBlurb.js +++ /dev/null @@ -1,4 +0,0 @@ -const previewBlurb = - 'Preview allows you to preview your future GIF by scrubbing through snapshots with the slider or previewing your GIF with the play/pause button.'; - -export default previewBlurb; diff --git a/src/blurbs/settingsBlurb.js b/src/blurbs/settingsBlurb.js deleted file mode 100644 index 923ae68..0000000 --- a/src/blurbs/settingsBlurb.js +++ /dev/null @@ -1,4 +0,0 @@ -const settingsBlurb = - 'The settings panel allows you to set your desired image dimensions as well as the interval between frames in the generated GIF.'; - -export default settingsBlurb; diff --git a/src/components/Burst.css b/src/components/Burst.css index 64bda24..a2e6715 100644 --- a/src/components/Burst.css +++ b/src/components/Burst.css @@ -71,3 +71,9 @@ font-size: 17px; font-family: Arial, Helvetica, sans-serif; } + +.Component-header { + display: flex; + justify-content: center; + align-items: center; +} diff --git a/src/components/Burst.js b/src/components/Burst.js index 1661f1d..23e2d9e 100644 --- a/src/components/Burst.js +++ b/src/components/Burst.js @@ -4,7 +4,6 @@ import { getCalcState, setCalcState } from '../lib/calc-helpers'; import { getBurstErrors } from '../lib/input-helpers'; import './Burst.css'; import Info from './Info'; -import burstBlurb from '../blurbs/burstBlurb.js'; class Burst extends Component { constructor(props) { @@ -86,13 +85,17 @@ class Burst extends Component { render() { const { idx, min, max, step, errors } = this.state; const { expanded } = this.props; + const burstInfo = `Burst allows you to generate multiple snapshots + of your graph at one time. Enter the relevant info in the input fields + and hit capture to watch the magic happen.`; if (!expanded) return
; return (
- +

Burst

+
Slider Index
); + const folderText = `The folder allows you to save your graphs so you + can come back to them at a later time.`; + return (
- +
+

Folder

+ +
Name
-
-

{this.props.title}

-
- info icon -
-

{this.props.blurb}

- -

More Info

-
-
+
+ info icon +
+

{this.props.infoText}

+ +

More Info

+
diff --git a/src/components/Preview.css b/src/components/Preview.css index ddf0234..6c7d7ca 100644 --- a/src/components/Preview.css +++ b/src/components/Preview.css @@ -54,6 +54,20 @@ color: #fff; } +.Component-header { + display: flex; + justify-content: center; + align-items: center; +} + +.Component-header h2 { + color: #fff; +} + +.Component-header p { + color: #fff; +} + @keyframes fade-in { 0% { opacity: 0; diff --git a/src/components/Preview.js b/src/components/Preview.js index 0f5bcbc..664eee4 100644 --- a/src/components/Preview.js +++ b/src/components/Preview.js @@ -4,7 +4,6 @@ import Frame from './Frame'; import Info from './Info'; import GenerateGifFormContainer from '../containers/GenerateGifFormContainer'; import './Preview.css'; -import previewBlurb from '../blurbs/previewBlurb'; class Preview extends Component { constructor(props) { @@ -68,12 +67,19 @@ class Preview extends Component { if (!expanded) return
; + const previewText = `Preview allows you to preview your future GIF by + scrubbing through snapshots with the slider or + previewing your GIF with the play/pause button.`; + return (
- +
+

Preview

+ +
; + const settingsText = `The settings panel allows you to set your desired image dimensions + as well as the interval between frames in the generated GIF.`; return (
- +
+

Settings

+ +
Image Width
Date: Wed, 26 Jun 2019 09:36:07 -0700 Subject: [PATCH 5/6] Second round of revisions --- src/components/App.css | 1 - src/components/Burst.css | 2 +- src/components/Burst.js | 6 +++--- src/components/Folder.css | 2 +- src/components/Folder.js | 6 +++--- src/components/{Info.css => InfoIcon.css} | 12 ++++++------ src/components/{Info.js => InfoIcon.js} | 10 +++++----- src/components/Preview.css | 6 +++--- src/components/Preview.js | 6 +++--- src/components/Settings.css | 6 ++++++ src/components/Settings.js | 6 +++--- 11 files changed, 34 insertions(+), 29 deletions(-) rename src/components/{Info.css => InfoIcon.css} (82%) rename src/components/{Info.js => InfoIcon.js} (76%) diff --git a/src/components/App.css b/src/components/App.css index 613646a..c33c05b 100644 --- a/src/components/App.css +++ b/src/components/App.css @@ -1,5 +1,4 @@ .calculator { - z-index: 1; position: absolute; top: 60px; right: 0; diff --git a/src/components/Burst.css b/src/components/Burst.css index a2e6715..1868cd0 100644 --- a/src/components/Burst.css +++ b/src/components/Burst.css @@ -72,7 +72,7 @@ font-family: Arial, Helvetica, sans-serif; } -.Component-header { +.Burst-header { display: flex; justify-content: center; align-items: center; diff --git a/src/components/Burst.js b/src/components/Burst.js index 23e2d9e..b43238e 100644 --- a/src/components/Burst.js +++ b/src/components/Burst.js @@ -3,7 +3,7 @@ import classNames from 'classnames'; import { getCalcState, setCalcState } from '../lib/calc-helpers'; import { getBurstErrors } from '../lib/input-helpers'; import './Burst.css'; -import Info from './Info'; +import InfoIcon from './InfoIcon'; class Burst extends Component { constructor(props) { @@ -93,9 +93,9 @@ class Burst extends Component { return (
-
+

Burst

- +
Slider Index
-
+

Folder

- +
Name
diff --git a/src/components/Info.css b/src/components/InfoIcon.css similarity index 82% rename from src/components/Info.css rename to src/components/InfoIcon.css index 9005fb6..943da0c 100644 --- a/src/components/Info.css +++ b/src/components/InfoIcon.css @@ -1,11 +1,11 @@ -.Info-icon { +.InfoIcon-icon { height: 17px; width: 17px; margin-left: 10px; margin-top: 7px; } -.Info-icon:hover { +.InfoIcon-icon:hover { cursor: pointer; } @@ -13,7 +13,7 @@ position: relative; } -.Show-info { +.Show { position: absolute; background-color: rgb(34, 34, 34, 0.8); width: 180px; @@ -27,14 +27,14 @@ z-index: 1; } -.Show-info a { +.Show a { color: #fff; } -.Show-info a:hover { +.Show a:hover { color: rgb(184, 184, 184); } -.Hide-info { +.Hide { display: none; } diff --git a/src/components/Info.js b/src/components/InfoIcon.js similarity index 76% rename from src/components/Info.js rename to src/components/InfoIcon.js index 9ad8b3c..7693539 100644 --- a/src/components/Info.js +++ b/src/components/InfoIcon.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import info from './icons/info.svg'; -import './Info.css'; +import './InfoIcon.css'; export default class Info extends Component { constructor(props) { @@ -18,17 +18,17 @@ export default class Info extends Component { } render() { - const displayClass = this.state.show ? 'Show-info' : 'Hide-info'; + const displayClass = this.state.show ? 'Show' : 'Hide'; return ( -
+
info icon -
+

{this.props.infoText}

More Info

diff --git a/src/components/Preview.css b/src/components/Preview.css index 37ee6ae..6ab03f1 100644 --- a/src/components/Preview.css +++ b/src/components/Preview.css @@ -60,17 +60,17 @@ color: #fff; } -.Component-header { +.Preview-header { display: flex; justify-content: center; align-items: center; } -.Component-header h2 { +.Preview-header h2 { color: #fff; } -.Component-header p { +.Preview-header p { color: #fff; } diff --git a/src/components/Preview.js b/src/components/Preview.js index 6104f99..c8814d5 100644 --- a/src/components/Preview.js +++ b/src/components/Preview.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import classNames from 'classnames'; import Frame from './Frame'; -import Info from './Info'; +import InfoIcon from './InfoIcon'; import GenerateGifFormContainer from '../containers/GenerateGifFormContainer'; import './Preview.css'; @@ -100,9 +100,9 @@ class Preview extends Component { data-testid="Preview-container" onClick={this.handleClickContainer} > -
+

Preview

- +
-
+

Settings

- +
Image Width
Date: Wed, 26 Jun 2019 11:33:32 -0700 Subject: [PATCH 6/6] final-changes --- src/components/InfoIcon.css | 10 +++++----- src/components/InfoIcon.js | 28 +++++++++++++--------------- src/components/Preview.css | 9 +-------- 3 files changed, 19 insertions(+), 28 deletions(-) diff --git a/src/components/InfoIcon.css b/src/components/InfoIcon.css index 943da0c..aa8147b 100644 --- a/src/components/InfoIcon.css +++ b/src/components/InfoIcon.css @@ -9,11 +9,11 @@ cursor: pointer; } -.Text-container { +.InfoIcon-text-container { position: relative; } -.Show { +.InfoIcon-text { position: absolute; background-color: rgb(34, 34, 34, 0.8); width: 180px; @@ -27,14 +27,14 @@ z-index: 1; } -.Show a { +.InfoIcon-text a { color: #fff; } -.Show a:hover { +.InfoIcon-text a:hover { color: rgb(184, 184, 184); } -.Hide { +.InfoIcon-text.hide { display: none; } diff --git a/src/components/InfoIcon.js b/src/components/InfoIcon.js index 7693539..46f5b83 100644 --- a/src/components/InfoIcon.js +++ b/src/components/InfoIcon.js @@ -2,7 +2,7 @@ import React, { Component } from 'react'; import info from './icons/info.svg'; import './InfoIcon.css'; -export default class Info extends Component { +export default class InfoIcon extends Component { constructor(props) { super(props); this.state = { @@ -18,22 +18,20 @@ export default class Info extends Component { } render() { - const displayClass = this.state.show ? 'Show' : 'Hide'; + const displayClass = this.state.show ? 'show' : 'hide'; return (
- ); diff --git a/src/components/Preview.css b/src/components/Preview.css index 6ab03f1..513e75b 100644 --- a/src/components/Preview.css +++ b/src/components/Preview.css @@ -9,6 +9,7 @@ transition: 0.2s transform; margin-bottom: 0; overflow: scroll; + color: #fff; } .Preview-expanded { @@ -66,14 +67,6 @@ align-items: center; } -.Preview-header h2 { - color: #fff; -} - -.Preview-header p { - color: #fff; -} - @keyframes fade-in { 0% { opacity: 0;