Repository navigation
Commit 0081c11
feat(lab): under a finger, NavigationStack's bar takes the iOS 26 look (#8396)
* feat(core): useFingerScroll tells its caller when a finger's scroll ends
`useFingerScroll(scroller, {onEnd})` calls `onEnd` once each time a
finger's scroll on the scroller ends — its scrollend after the lift, the
lift after a scrollend under a resting finger, the quiet fallback, or the
pointer turning fine — after the reader already says false. Unmounting
never calls it. The internal touch entry re-exports the hook for Lab's
ChatVirtualizer, which will drop its own touch listeners for it.
* fix(lab): NavigationStack re-measures a screen when its title resizes
The large title sat outside the scroll area's content root, so a change
of its height alone, such as a longer title, re-measured nothing. A
screen that then overflowed stayed clipped: it did not scroll, offered
no keyboard stop and contained no overscroll until another change
re-measured it. The title is now first in the content root, whose size
the scroll area watches.
The headers of navigationTransition.ts and the browser spec keep their
fields only. The transition's layer notes move to the JSDoc of the type
and function they describe.
* fix(core): useFingerScroll keeps the latest onEnd through the isomorphic layout effect
Core hooks write commit-time refs with useIsomorphicLayoutEffect, which
stays quiet under server rendering.
* docs(core): the finger-scroll re-export names no reader that main does not have
The changeset, the internal touch entry, the gestures README and the
tests say Lab components that watch a finger's scroll, instead of naming
ChatVirtualizer, which is still in an open pull request. Text only.
* Merge #10172 into #10191 as this change's base
Both are open: #10191 moves NavigationStack's large title into the scroll area's content, and #10172 lets useFingerScroll tell its caller when a finger's scroll ends. They share no file.
* feat(lab): under a finger, NavigationStack's bar takes the iOS 26 look
Under a finger, NavigationStack's bars paint no background and no
hairline, as iOS 26's do. Each screen carries a scroll edge effect: a
veil of the body colour that fades in once its content has moved 10px
under the bar, on UIKit's measured springs. A push, a pop and a back
swipe carry each screen's veil with its card, and the bar a card covers
is cut at that card's leading edge. A mouse keeps opaque bars.
The veil and the UIKit bar constants live in Lab. The veil reads Core's
finger-scroll hook, with its end call, and Core's internal touch entry
also names the gesture host and the coarse-pointer check: export-only
additions, with no change to Core's behavior.
* Merge main into the NavigationStack clear bars branch (#10172 and #10191 landed)
* test(lab): NavigationStack's cut specs read the push at held times
Under load, WebKit can report one moving layer's animated translate a
frame late. The old mid-flight read then put the cut 2 to 3 px off the
card's edge while the layers moved as one. The two cut specs now freeze
the scene while the push runs, move every animation of the push to the
same scene times, and read the rendered boxes there.
* Merge branch 'main' into uikit/c16-stack-bar
Co-authored-by: Cindy Zhang <cindyxz@meta.com>1 parent f88d572 commit 0081c11
13 files changed
Lines changed: 2415 additions & 68 deletions
File tree
- .changeset
- apps/storybook/stories
- packages
- core/src/internal
- lab/src
- internal
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
140 | 157 | | |
141 | 158 | | |
142 | 159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
222 | 239 | | |
223 | 240 | | |
224 | 241 | | |
| |||
234 | 251 | | |
235 | 252 | | |
236 | 253 | | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
237 | 272 | | |
238 | 273 | | |
239 | 274 | | |
| |||
0 commit comments