!sbsYaNBcXmmcUllUxb:matrix.org

GeriLife

2 Members
Discussions for the open source project to promote wellbeing https://github.com/GeriLife/wellbeing1 Servers

Load older messages


SenderMessageTime
29 Jan 2019
@brylie:matrix.orgBrylie Christopher OxleySo, how would we tell the charts that the chart settings have changed, with the above guidelines?07:27:52
@brylie:matrix.orgBrylie Christopher Oxley
In reply to @brylie:matrix.org

In this specific case, we have something like:

  • Home Profile
    • Activities
      • Chart Settings
      • ChartA
      • ChartB
      • ChartC

This should be

- Home Profile
    - Activities
        - Chart Settings
        - ChartA
        - ...
07:30:04
@vdariaclem:matrix.orgDaria Voytova
Any difficulties yesterday?
yes... Not so easy using Ploty.js documentation cuz it shows only parts of information and if I want something specific then I don't know how to get that information 🤷🏼
07:31:53
@brylie:matrix.orgBrylie Christopher OxleyJep, I noticed that too.07:32:37
@vdariaclem:matrix.orgDaria Voytova Sometimes I was learning their source code to understood why chart had width 700px and it was more than parent container had 🤦🏼 07:32:48
@vdariaclem:matrix.orgDaria Voytovasource code of Ploty.js07:33:02
@vdariaclem:matrix.orgDaria Voytova
In this specific case, we have something like:
Why Chart settings has the same layer as chart? I think it should be higher
07:33:40
@vdariaclem:matrix.orgDaria VoytovaRedacted or Malformed Event07:33:58
@brylie:matrix.orgBrylie Christopher OxleyThat is fine.07:34:59
@vdariaclem:matrix.orgDaria VoytovaActivities Settings Chart 1 Chart 2 Chart 307:35:13
@vdariaclem:matrix.orgDaria VoytovaOr Settings is not global and not every chart should be updated if settings is?07:35:35
@brylie:matrix.orgBrylie Christopher OxleySo the Chart Container displays the settings widgets and passes their state directly to the chart components?07:36:14
@vdariaclem:matrix.orgDaria VoytovaIndeed07:36:53
@vdariaclem:matrix.orgDaria Voytovaor, as not meteor way, add listiner to changing value of HTML element07:37:23
@brylie:matrix.orgBrylie Christopher OxleyYes, and what happens in the listener?07:39:29
@brylie:matrix.orgBrylie Christopher OxleyAll charts should reflect same time period and metric.07:40:23
@brylie:matrix.orgBrylie Christopher OxleySo, should react to state changes in Chart Settings component.07:41:05
@brylie:matrix.orgBrylie Christopher OxleyAnd in which component do we define the listener?07:42:29
@brylie:matrix.orgBrylie Christopher Oxley
In reply to @brylie:matrix.org

Two things I just remembered about the software architecture here:

  1. we are building a tree of components
  2. in that tree, events propagate up and data passes down
Remember these guidelines.
07:47:20
@vdariaclem:matrix.orgDaria Voytova I see two scenarios
1) The structure is
- Activities
- Settings (Chart container)
- Chart 1
- Chart 2
...

In this case Chart container has widget and looks at changing of this widget. When changes happen then passes the value directly to the chart components. The structure is tree and data passes down

2) The structure is

Activities
- Settings
- Chart 1...

In this case every chart component looks at changing of widget. Structure is tree but data is not passes down
07:50:17
@vdariaclem:matrix.orgDaria Voytovaurgx07:50:47
@vdariaclem:matrix.orgDaria Voytova1) structure is Activites Settings Chart 1 Chart 2 ..07:51:13
@vdariaclem:matrix.orgDaria VoytovaI prefer the first point07:51:51
@brylie:matrix.orgBrylie Christopher OxleyOk, in the first case, the event can propagate up to the Activities container, and the value would be passed down to the charts.07:53:37
@brylie:matrix.orgBrylie Christopher OxleyI.e. the event listener can be defined in the Activity component to catch events from the child components. In that case, the Chart Settings would just be HTML.07:55:03
@vdariaclem:matrix.orgDaria Voytovawell.. 07:58:51
@brylie:matrix.orgBrylie Christopher OxleyThe settings are sibling to the charts, and state can be managed by parent.07:59:24
@vdariaclem:matrix.orgDaria Voytovayes, yes07:59:34
@vdariaclem:matrix.orgDaria VoytovaI got it07:59:36
@vdariaclem:matrix.orgDaria Voytovaforget about me long speech :D07:59:48

Show newer messages


Back to Room ListRoom Version: 1