@jsenv/navi 0.29.172 → 0.29.174
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/jsenv_navi.js +175 -7
- package/dist/jsenv_navi.js.map +11 -9
- package/docs/AI_INSTRUCTIONS.md +3 -1
- package/docs/list_action.md +44 -0
- package/package.json +1 -1
package/docs/AI_INSTRUCTIONS.md
CHANGED
|
@@ -109,7 +109,9 @@ consistency across the app, not from any single call site.
|
|
|
109
109
|
it, clearing it a moment later loses the selection silently. Read it before
|
|
110
110
|
putting `loading` on a row whose button is working, before
|
|
111
111
|
`<List readOnly={pending}>`, and before writing a second spinner next to the
|
|
112
|
-
one a control already draws.
|
|
112
|
+
one a control already draws. Also `parallelGuard` — how many of a list's rows
|
|
113
|
+
may be acting at once, four by default, `Infinity` to lift it: it counts runs
|
|
114
|
+
where `maxLengthGuard` counts values.
|
|
113
115
|
- `docs/error_handling.md` — the two kinds of error and how navi keeps them
|
|
114
116
|
apart: where an error is shown depending on where it came from (a control's
|
|
115
117
|
action shows it on what was clicked, a route action replaces the page, a
|
package/docs/list_action.md
CHANGED
|
@@ -12,6 +12,7 @@ wait very differently, and what decides it is one thing:
|
|
|
12
12
|
- [Who draws the wait, and who answers a press](#who-draws-the-wait-and-who-answers-a-press)
|
|
13
13
|
- [Read-only, not loading](#read-only-not-loading)
|
|
14
14
|
- [Hold the rows, not the list](#hold-the-rows-not-the-list)
|
|
15
|
+
- [How many at once: `parallelGuard`](#how-many-at-once-parallelguard)
|
|
15
16
|
|
|
16
17
|
Live examples: the **Button** section of
|
|
17
18
|
`src/control/demos/13_list_selectable_demo.html` shows both, side by side, over
|
|
@@ -79,6 +80,26 @@ press so nothing inside it acts, then asks the control it carries to explain —
|
|
|
79
80
|
one callout, one sentence, the same on the pointer and on the keyboard, and the
|
|
80
81
|
caller's `readOnlyMessage` / `busyMessage` respected either way.
|
|
81
82
|
|
|
83
|
+
And it lands **where the press landed**. A row answers for a whole box, and its
|
|
84
|
+
own control is a visually hidden checkbox, so a sentence anchored on that would
|
|
85
|
+
sit in the middle of the row pointing at nothing. Pressed on the button, it
|
|
86
|
+
belongs on the button; pressed on the row's own surface, on the row:
|
|
87
|
+
|
|
88
|
+
| what was pressed | where the sentence appears |
|
|
89
|
+
| ----------------------------------------------- | -------------------------- |
|
|
90
|
+
| the button of a row whose own run is going | the button |
|
|
91
|
+
| the name of that same row | the row |
|
|
92
|
+
| the button of a row held back by something else | the button |
|
|
93
|
+
|
|
94
|
+
The last one needs nothing special: that row is not blocked, so the press
|
|
95
|
+
reaches the button and the button's own gate answers it.
|
|
96
|
+
|
|
97
|
+
A row that would rather always take it says so once:
|
|
98
|
+
|
|
99
|
+
```jsx
|
|
100
|
+
<List.Item data-callout-anchor="item" />
|
|
101
|
+
```
|
|
102
|
+
|
|
82
103
|
## Read-only, not loading
|
|
83
104
|
|
|
84
105
|
A row whose button is working is **not loading** — the button is. The row is in
|
|
@@ -119,3 +140,26 @@ answer whenever the answer comes:
|
|
|
119
140
|
<List.Item readOnly={pending !== null} /> // all of them: one at a time
|
|
120
141
|
<List.Item readOnly={pending.includes(name)} /> // this one: each on its own
|
|
121
142
|
```
|
|
143
|
+
|
|
144
|
+
## How many at once: `parallelGuard`
|
|
145
|
+
|
|
146
|
+
A list is a place where the same gesture is available many times over, and
|
|
147
|
+
nothing about a row's own action stops someone from starting one on every row it
|
|
148
|
+
draws — a dozen requests in flight because the list happened to be long.
|
|
149
|
+
|
|
150
|
+
So a list allows **four runs at once by default**. While that many are out,
|
|
151
|
+
every row that is not running goes read-only and says how many it is waiting on;
|
|
152
|
+
the next press is possible again the moment one comes back.
|
|
153
|
+
|
|
154
|
+
```jsx
|
|
155
|
+
<List parallelGuard={2}> // stricter
|
|
156
|
+
<List parallelGuard={Infinity}> // lifted, without taking it out of the tree
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
It counts runs, not values — which is the whole difference from `maxLengthGuard`
|
|
160
|
+
next to it: that one says how many things the selection may HOLD, this one how
|
|
161
|
+
many may be HAPPENING. A list can carry either, or both, and they refuse for
|
|
162
|
+
unrelated reasons.
|
|
163
|
+
|
|
164
|
+
Only a control that would start a run is held: a row with nothing to run, or a
|
|
165
|
+
button that merely fires a command, never waits its turn.
|