You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22Lines changed: 22 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,28 @@ To build the dist version:
27
27
$ npm run prepublish
28
28
```
29
29
30
+
## Developer notes
31
+
A PlotlyEditor widgets is composed of 3 layers:
32
+
33
+
### Layer 1: Base Component
34
+
```
35
+
<PlotlyEditor>
36
+
```
37
+
38
+
### Layer 2: Container Components:
39
+
One or more nested Container Components with one and only one connected by a connect<Container>ToPlot function (connectLayoutToPlot, connectTraceToPlot).
40
+
```
41
+
<Panel>, <Section>, <Fold>
42
+
```
43
+
44
+
### Layer 3: Attribute Widgets
45
+
Each connected by a `connectContainerToPlot` function
46
+
<Numeric>, <ColorPicker>, <Radio> and remaining UI Controls
47
+
```
48
+
49
+
Data flows via `context` downward and is augmented with additional information at each layer boundary.
50
+
The Base Components aggregate references to the graphDiv objects (data, fullData, layout...), grid Data sources, locale, update functions etc. One of the Container Components uses its knowledge about which container to target (traces, layout, ...) to generate fewer but more specific containers and updaters which are passed down the hierarchy. The Attribute widgets are higher-order wrappers around dumb UI controls. The higher-order wrapper uses the container contexts and specific attributes information to provide specific plot update functions and other behaviours for the inner UI control.
0 commit comments