@jsenv/navi 0.29.514 → 0.29.515

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/docs/scroll.md CHANGED
@@ -163,6 +163,37 @@ again a frame later. `:smooth` glides, and is instant under
163
163
  `scroll-behavior`: a `scroll-behavior: smooth` on the box glides every
164
164
  placement of the list, the one it opens on included.
165
165
 
166
+ The `id` is on the list's outer box, which is not the box that scrolls: which one
167
+ does depends on `scroller` and on what can be measured (see
168
+ [above](#list-and-its-scroller)). So a list is moved through these, never through
169
+ `scrollTo` on an element of its DOM, and a "back to top" button is
170
+ `command="--navi-scroll" value="start"`.
171
+
172
+ ### Another order, another filter: back to the start
173
+
174
+ A list showing something else is read from its start. `scrollResetKey` says what
175
+ that depends on:
176
+
177
+ ```jsx
178
+ <List id="players_list" scrollResetKey={[listKey, order]}>
179
+ …
180
+ </List>
181
+ ```
182
+
183
+ When the value changes after mount (compared by value, so an array can be written
184
+ at every render), the list goes back to its start in the box `scroller` names,
185
+ before the paint, and stays there while answers land, until the user reaches for
186
+ it. Its window moves in the same render: nothing is drawn or fetched at the place
187
+ it leaves. Mounting is not a change, so the list still comes back where it was
188
+ left.
189
+
190
+ - **Its start is what is brought back, never sent forward.** A list further down a
191
+ box or a page that also shows what stands above it does not move when its start
192
+ is in view: the picker above it stays on screen.
193
+ - **The position kept under its `id`** is dropped for the address shown, so a
194
+ return finds the list at its start. A key that is also a search param changes
195
+ the address: the address left keeps its position, for a return to it.
196
+
166
197
  ### A list that comes back: one `id`, one list
167
198
 
168
199
  The position a list comes back to is kept under its `id` and the page's url, so
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/navi",
3
- "version": "0.29.514",
3
+ "version": "0.29.515",
4
4
  "type": "module",
5
5
  "description": "Library of components including navigation to create frontend applications",
6
6
  "repository": {