@jsenv/navi 0.29.312 → 0.29.314
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.
- package/dist/dev/jsenv_navi.js +21 -6
- package/dist/dev/jsenv_navi.js.map +3 -3
- package/dist/jsenv_navi.js +21 -6
- package/dist/jsenv_navi.js.map +3 -3
- package/docs/control_object.md +15 -6
- package/package.json +1 -1
package/docs/control_object.md
CHANGED
|
@@ -54,14 +54,21 @@ So the choice is not about the value, it is about whether this cluster is a
|
|
|
54
54
|
- something the user sends → `Form`.
|
|
55
55
|
|
|
56
56
|
A `<Form>` inside a `<Form>` is legal — the inner one becomes a group without
|
|
57
|
-
the `<form>` element —
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
the `<form>` element — and it is a **second question**, not a sub-object of the
|
|
58
|
+
first: what it holds is its own, and the form around it never sees it. Not in
|
|
59
|
+
the value it sends, not in its "nothing changed", and not in the constraints it
|
|
60
|
+
checks before sending — a required field in a popup nobody opened cannot refuse
|
|
61
|
+
the outer submit and point at something the screen is not showing.
|
|
62
|
+
|
|
63
|
+
So the inner form carries all of the above with it: its own reference, its own
|
|
64
|
+
"nothing changed", its own submit story. Grouping three fields into a sub-object
|
|
65
|
+
should cost none of that — that is a `ControlGroup`.
|
|
60
66
|
|
|
61
67
|
## Naming, and what a nameless group does
|
|
62
68
|
|
|
63
|
-
A group's `name` is the key its value lands under, in the group above it
|
|
64
|
-
|
|
69
|
+
A group's `name` is the key its value lands under, in the group above it — a
|
|
70
|
+
`ControlGroup`, or a `Form` inside something that is not a form (a picker, say).
|
|
71
|
+
A form inside a form lands nowhere: it answers for itself, named or not.
|
|
65
72
|
|
|
66
73
|
Left nameless, a group is a **grouping**: it exists to hold its children
|
|
67
74
|
together (shared navigation, a visual cluster) without claiming a key, and what
|
|
@@ -109,7 +116,9 @@ Two things to get right:
|
|
|
109
116
|
only one read back. Two controls side by side in a popup is the shape to
|
|
110
117
|
avoid — the second is neither filled nor collected, and navi says so in dev.
|
|
111
118
|
Wrap them in one `ControlGroup` (or one `Form`, when the popup has a send of
|
|
112
|
-
its own
|
|
119
|
+
its own — but only while the picker itself is not inside a form, since a form
|
|
120
|
+
inside a form answers for itself and the picker would be left with nothing to
|
|
121
|
+
fill).
|
|
113
122
|
- **The value travels by name.** What the picker was given goes down into the
|
|
114
123
|
group, which hands each named child its own key; a nameless grouping inside
|
|
115
124
|
receives the whole object and picks out what it names. Give a picker of this
|