on creation or updating of message, update patientData and create or move message in tideline

@jh-bate @nicolashery have a look, please. (And at [tideline PR #141](https://github.com/tidepool-org/tideline/pull/141).)

I wasn't able to do what we discussed - updating `patientData` to trigger a rerender of the chart, because the only thing in `render()` for the (daily) chart component is `<div id="tidelineContainer" className="patient-data-chart"></div>` ([here](https://github.com/tidepool-org/blip/blob/master/app/components/chart/daily.js#L244)) which doesn't include the `patientData` prop, so when the updated prop comes in, React doesn't recognize the need to rerender.

I think the current solution is good enough for now - perhaps we can discuss a more React-y way to manage this in future (data attribute?). Right now I'm updating `patientData` from the return value of the method that updates tideline's data, so they are guaranteed to stay in sync.

Ok sounds good - thanks for that.


On Fri, Jul 11, 2014 at 1:49 PM, Jana Beck <notifications@github.com> wrote:

> In app/pages/patientdata/patientdata.js:
>
> > @@ -324,6 +326,17 @@ var PatientData = React.createClass({
> >      if (edit) {
> >        edit(message, cb);
> >      }
>
> @jh-bate <https://github.com/jh-bate> Below is where it could be useful
> to first have a check to see if timestamp changed, but as I said, once I
> redo tideline data management a bit and use the proper D3 update pattern,
> it'll be completely moot. Up to you whether to put something in now...
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/tidepool-org/blip/pull/101/files#r14803400>.
>