@jsenv/navi 0.29.87 → 0.29.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,6 +11,7 @@ whose value is an object needs in its popup.
11
11
  - [`<Form>`: the shape, plus a send](#form-the-shape-plus-a-send)
12
12
  - [Naming, and what a nameless group does](#naming-and-what-a-nameless-group-does)
13
13
  - [A picker whose value is an object](#a-picker-whose-value-is-an-object)
14
+ - [A group holds what it was given](#a-group-holds-what-it-was-given)
14
15
  - [One line, one key](#one-line-one-key)
15
16
  - [A settings sheet](#a-settings-sheet)
16
17
  - [`Group` is not `ControlGroup`](#group-is-not-controlgroup)
@@ -117,7 +118,9 @@ Two things to get right:
117
118
  - **A control that helps FIND the answer is not the answer.** A search box above
118
119
  a long list, a "select all" beside it: they are tools, and a tool says so with
119
120
  `allowNameless`. The picker then walks past it and talks to the list, which is
120
- what a popup made of one choice and the means to reach it needs.
121
+ what a popup made of one choice and the means to reach it needs. Never put it
122
+ on the control that IS the value — the picker would have nobody left to fill,
123
+ and the popup would open blank on a value it holds (navi says so in dev).
121
124
 
122
125
  ```jsx
123
126
  <Picker name="place_ids" type="array">
@@ -128,6 +131,28 @@ Two things to get right:
128
131
  </Picker>
129
132
  ```
130
133
 
134
+ ## A group holds what it was given
135
+
136
+ A group's value looks like it is made of its children, and mostly it is — but
137
+ the two are not the same thing, and the difference shows the moment the children
138
+ are not all there yet:
139
+
140
+ - a group **told** a value holds it whole, before any child has registered to
141
+ show it. A list whose items are still loading, a popup built at open, a row
142
+ scrolled out of a virtualized list — none of them make the value smaller;
143
+ - **a child mounting or unmounting is not somebody answering.** While children
144
+ are arriving, their aggregate is a partial reading; a group takes it for its
145
+ own value only once it has derived that value itself (nobody handed it one),
146
+ or once a child really acts;
147
+ - a child arriving **after** the value did is placed from what the group holds,
148
+ so it shows its part of it. A child arriving with something of its own to show
149
+ is answering, and keeps it.
150
+
151
+ Together they are what makes the two-hop case work — the form fills the row, the
152
+ row fills the control in its popup — whatever order the pieces turn up in. Get
153
+ one of them wrong and the symptom is always the same: a value that was there
154
+ before the popup opened, and empty after.
155
+
131
156
  ## One line, one key
132
157
 
133
158
  A row that opens a popup is one control, so what it answers arrives under its
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/navi",
3
- "version": "0.29.87",
3
+ "version": "0.29.89",
4
4
  "type": "module",
5
5
  "description": "Library of components including navigation to create frontend applications",
6
6
  "repository": {