From 9a8ae76d38a82f769b4c02d06622230654e24afc Mon Sep 17 00:00:00 2001 From: Adina Johnson Date: Tue, 30 Oct 2018 14:28:04 -0400 Subject: [PATCH 01/25] journal skeleton component --- src/components/Journal/Journal.css | 3 +++ src/components/Journal/View.js | 10 ++++++++++ src/components/Journal/index.js | 12 ++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 src/components/Journal/Journal.css create mode 100644 src/components/Journal/View.js create mode 100644 src/components/Journal/index.js diff --git a/src/components/Journal/Journal.css b/src/components/Journal/Journal.css new file mode 100644 index 00000000..1fef6cca --- /dev/null +++ b/src/components/Journal/Journal.css @@ -0,0 +1,3 @@ +#displayContainer { + +} \ No newline at end of file diff --git a/src/components/Journal/View.js b/src/components/Journal/View.js new file mode 100644 index 00000000..907234d5 --- /dev/null +++ b/src/components/Journal/View.js @@ -0,0 +1,10 @@ +import React from 'react'; + + +const View = ({}) => ( +
+ +
+); + +export default View; \ No newline at end of file diff --git a/src/components/Journal/index.js b/src/components/Journal/index.js new file mode 100644 index 00000000..937b5847 --- /dev/null +++ b/src/components/Journal/index.js @@ -0,0 +1,12 @@ +import React, { Component } from 'react'; +import View from './View'; + +class Journal extends Component { + + render() { + return ; + } + +} + +export default Journal; \ No newline at end of file From 3d7593fab35b6af4e44013fd38987cff1bf4d57d Mon Sep 17 00:00:00 2001 From: Adina Johnson Date: Wed, 31 Oct 2018 17:45:38 -0400 Subject: [PATCH 02/25] add dylan's ex skeleton code --- src/components/Journal/View.js | 4 ++-- src/components/Journal/index.js | 30 ++++++++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/src/components/Journal/View.js b/src/components/Journal/View.js index 907234d5..98a2ef68 100644 --- a/src/components/Journal/View.js +++ b/src/components/Journal/View.js @@ -2,8 +2,8 @@ import React from 'react'; const View = ({}) => ( -
- +
+ {title}
); diff --git a/src/components/Journal/index.js b/src/components/Journal/index.js index 937b5847..613d02fb 100644 --- a/src/components/Journal/index.js +++ b/src/components/Journal/index.js @@ -1,10 +1,36 @@ import React, { Component } from 'react'; import View from './View'; -class Journal extends Component { +export default class Journal extends Component { + + constructor(props) { + super(props); + + this.state = { + data: [] + } + + this.mytitle = "tomatoes, apples, big difference."; // to initialize + } + + componentDidMount() { + // it's where you want to subscribe to whatever data you need in the model + // this.model.subscribe() THIS PROTOCOL IS PROBABLY GOING TO CHANGE + } + componentWillUnmount() { + // this is where you should '.unsubscribe(this)' from the model. + } + + onChange(updatedData) { + this.setState((state) => { + // how do you want to change this state based on the old state? + // 'state' is the old state, and you return the new state. + return state.data = updatedData; + }); + } render() { - return ; + return ; } } From 888f279a7c849c0da2158dc27376376976e75f15 Mon Sep 17 00:00:00 2001 From: Emily Hamlin Date: Wed, 31 Oct 2018 18:00:58 -0400 Subject: [PATCH 03/25] My first commit for this branch! --- src/components/Analytics/View.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/components/Analytics/View.js diff --git a/src/components/Analytics/View.js b/src/components/Analytics/View.js new file mode 100644 index 00000000..ea150fbd --- /dev/null +++ b/src/components/Analytics/View.js @@ -0,0 +1,11 @@ +import React from 'react'; + +// This begins as an empty container, but we will have a function that fills it +// on tab clicks. +const View = ({}) => ( +
+ +
+); + +export default View; From b6217f2ac0376472d3b00e8701d33ea15565d213 Mon Sep 17 00:00:00 2001 From: janeon Date: Wed, 31 Oct 2018 18:26:01 -0400 Subject: [PATCH 04/25] bringing back month view by putting it in taskDisplay --- src/components/TaskDisplay/View.js | 39 +++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/src/components/TaskDisplay/View.js b/src/components/TaskDisplay/View.js index 049c6d1c..41bbd0fb 100644 --- a/src/components/TaskDisplay/View.js +++ b/src/components/TaskDisplay/View.js @@ -2,13 +2,50 @@ import React from 'react'; import TabList from '../TabList'; import TabDisplay from '../TabDisplay'; import './TaskDisplay.css'; +import BigCalendar from 'react-big-calendar-like-google'; +import 'react-big-calendar/lib/css/react-big-calendar.css' +import moment from 'moment' +// https://github.com/intljusticemission/react-big-calendar/issues/234 +/* The current version of big calendar implemented here is the most basic, the package also allows: +- event creation +- Localization +- show more via popup +- drag and drop +*see more here http://intljusticemission.github.io/react-big-calendar/examples/index.html +Q&A about big-calendar availale on Discord https://discordapp.com/channels/102860784329052160/424364360731852800 +*/ +const localizer = BigCalendar.momentLocalizer(moment) +let allViews = Object.keys(BigCalendar.Views).map(k => BigCalendar.Views[k]) const View = props => { - + const myEventsList = [ + { + allDay: false, + end: new Date('December 10, 2017 11:13:00'), + start: new Date('December 09, 2017 11:13:00'), + title: 'hi', + }, + { + allDay: true, + end: new Date('December 09, 2017 11:13:00'), + start: new Date('December 09, 2017 11:13:00'), + title: 'All Day Event', + }, + ]; return (
+
+ +
+
)} export default View; From af56afc26f5a42a20523f800d6fe6c3f1a9b73a7 Mon Sep 17 00:00:00 2001 From: janeon Date: Sun, 4 Nov 2018 10:44:42 -0500 Subject: [PATCH 05/25] calendar in taskDisplay --- src/components/TabDisplay/TabDisplay.css | 8 +++-- src/components/TabDisplay/View.js | 8 ++--- src/components/TabDisplay/index.js | 4 +-- src/components/TaskDisplay/View.js | 40 ++++++++++-------------- 4 files changed, 29 insertions(+), 31 deletions(-) diff --git a/src/components/TabDisplay/TabDisplay.css b/src/components/TabDisplay/TabDisplay.css index 1fef6cca..58b1ce4a 100644 --- a/src/components/TabDisplay/TabDisplay.css +++ b/src/components/TabDisplay/TabDisplay.css @@ -1,3 +1,7 @@ #displayContainer { - -} \ No newline at end of file + width: 100%; + height: 100%; + + display: flex; + flex-direction: column; +} diff --git a/src/components/TabDisplay/View.js b/src/components/TabDisplay/View.js index 551a53af..9adb39da 100644 --- a/src/components/TabDisplay/View.js +++ b/src/components/TabDisplay/View.js @@ -1,13 +1,13 @@ import React from 'react'; -import ExTab from '../ExTab/'; +// import ExTab from '../ExTab/'; import Calendar from '../Calendar' // This begins as an empty container, but we will have a function that fills it // on tab clicks. + const View = ({}) => (
- - -
+ +
); export default View; diff --git a/src/components/TabDisplay/index.js b/src/components/TabDisplay/index.js index 68da0186..5e8d8a9f 100644 --- a/src/components/TabDisplay/index.js +++ b/src/components/TabDisplay/index.js @@ -4,9 +4,9 @@ import View from './View'; class TabDisplay extends Component { render() { - return ; + return ; } } -export default TabDisplay; \ No newline at end of file +export default TabDisplay; diff --git a/src/components/TaskDisplay/View.js b/src/components/TaskDisplay/View.js index 41bbd0fb..1961075f 100644 --- a/src/components/TaskDisplay/View.js +++ b/src/components/TaskDisplay/View.js @@ -2,36 +2,30 @@ import React from 'react'; import TabList from '../TabList'; import TabDisplay from '../TabDisplay'; import './TaskDisplay.css'; +import Calendar from '../Calendar'; import BigCalendar from 'react-big-calendar-like-google'; import 'react-big-calendar/lib/css/react-big-calendar.css' import moment from 'moment' -// https://github.com/intljusticemission/react-big-calendar/issues/234 -/* The current version of big calendar implemented here is the most basic, the package also allows: -- event creation -- Localization -- show more via popup -- drag and drop -*see more here http://intljusticemission.github.io/react-big-calendar/examples/index.html -Q&A about big-calendar availale on Discord https://discordapp.com/channels/102860784329052160/424364360731852800 -*/ + const localizer = BigCalendar.momentLocalizer(moment) let allViews = Object.keys(BigCalendar.Views).map(k => BigCalendar.Views[k]) +const myEventsList = [ + { + allDay: false, + end: new Date('December 10, 2017 11:13:00'), + start: new Date('December 09, 2017 11:13:00'), + title: 'hi', + }, + { + allDay: true, + end: new Date('December 09, 2017 11:13:00'), + start: new Date('December 09, 2017 11:13:00'), + title: 'All Day Event', + }, +]; const View = props => { - const myEventsList = [ - { - allDay: false, - end: new Date('December 10, 2017 11:13:00'), - start: new Date('December 09, 2017 11:13:00'), - title: 'hi', - }, - { - allDay: true, - end: new Date('December 09, 2017 11:13:00'), - start: new Date('December 09, 2017 11:13:00'), - title: 'All Day Event', - }, - ]; + return (
From bded827ff901b897b2065c4790ad8e7758676816 Mon Sep 17 00:00:00 2001 From: janeon Date: Sun, 4 Nov 2018 12:30:41 -0500 Subject: [PATCH 06/25] adding calendar to its own component --- src/components/TaskDisplay/TaskDisplay.css | 16 +++++++++--- src/components/TaskDisplay/View.js | 30 +--------------------- 2 files changed, 13 insertions(+), 33 deletions(-) diff --git a/src/components/TaskDisplay/TaskDisplay.css b/src/components/TaskDisplay/TaskDisplay.css index 123c0c66..0ccebdc0 100644 --- a/src/components/TaskDisplay/TaskDisplay.css +++ b/src/components/TaskDisplay/TaskDisplay.css @@ -1,7 +1,15 @@ #taskdisplay { - width: 100%; - height: 100%; + height: 100%; + display: flex; + flex-direction: column; +} - display: flex; - flex-direction: column; +.rbc-calendar { + min-height: 320px; + max-height: 320px; + box-sizing: border-box; + width: 100%; + height: 100%; + display: flex; + flex-direction: column; } diff --git a/src/components/TaskDisplay/View.js b/src/components/TaskDisplay/View.js index 1961075f..75e9628f 100644 --- a/src/components/TaskDisplay/View.js +++ b/src/components/TaskDisplay/View.js @@ -2,43 +2,15 @@ import React from 'react'; import TabList from '../TabList'; import TabDisplay from '../TabDisplay'; import './TaskDisplay.css'; -import Calendar from '../Calendar'; -import BigCalendar from 'react-big-calendar-like-google'; -import 'react-big-calendar/lib/css/react-big-calendar.css' -import moment from 'moment' -const localizer = BigCalendar.momentLocalizer(moment) -let allViews = Object.keys(BigCalendar.Views).map(k => BigCalendar.Views[k]) +import 'react-big-calendar/lib/css/react-big-calendar.css' -const myEventsList = [ - { - allDay: false, - end: new Date('December 10, 2017 11:13:00'), - start: new Date('December 09, 2017 11:13:00'), - title: 'hi', - }, - { - allDay: true, - end: new Date('December 09, 2017 11:13:00'), - start: new Date('December 09, 2017 11:13:00'), - title: 'All Day Event', - }, -]; const View = props => { return (
-
- -
)} From 3fd97a6cc2f2a892a9f54169b913abac754f0fb4 Mon Sep 17 00:00:00 2001 From: janeon Date: Sun, 4 Nov 2018 12:35:01 -0500 Subject: [PATCH 07/25] adding todos --- src/components/Calendar/View.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/Calendar/View.js b/src/components/Calendar/View.js index 7e833833..175a72ab 100644 --- a/src/components/Calendar/View.js +++ b/src/components/Calendar/View.js @@ -30,6 +30,12 @@ const View = props => { title: 'All Day Event', }, ]; + /* + TODO: Things to fix + - vertical overflow in views other than month + - align vertical location of back and forward buttons for month views + - fix horizonal squishing in all non-month views + */ return (
From 0d7c1bf33a92bc18922d01d33a01985b271e1dd3 Mon Sep 17 00:00:00 2001 From: janeon Date: Sun, 4 Nov 2018 12:35:34 -0500 Subject: [PATCH 08/25] more todos --- src/components/Calendar/View.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/Calendar/View.js b/src/components/Calendar/View.js index 175a72ab..0947f93a 100644 --- a/src/components/Calendar/View.js +++ b/src/components/Calendar/View.js @@ -35,6 +35,7 @@ const View = props => { - vertical overflow in views other than month - align vertical location of back and forward buttons for month views - fix horizonal squishing in all non-month views + - be able to add an event based on start and end times */ return (
From 8db42e9b3128ad2ec1d6e7ace95ff4a765645e4b Mon Sep 17 00:00:00 2001 From: Adina Johnson Date: Sun, 4 Nov 2018 19:15:11 -0500 Subject: [PATCH 09/25] figured out how to do some basic form submission --- src/components/Journal/View.js | 18 ++++++++++++---- src/components/Journal/index.js | 37 ++++++++++++++++++--------------- 2 files changed, 34 insertions(+), 21 deletions(-) diff --git a/src/components/Journal/View.js b/src/components/Journal/View.js index 98a2ef68..369a0260 100644 --- a/src/components/Journal/View.js +++ b/src/components/Journal/View.js @@ -1,10 +1,20 @@ import React from 'react'; -const View = ({}) => ( -
- {title} -
+ +const View = ({value, entries, handleSubmit, handleChange}) => ( +
+
+