Commit 6eb5d67
authored
[Fizz] Outline a Suspense Boundary if it has Suspensey CSS or Images (#34552)
We should favor outlining a boundary if it contains Suspensey CSS or
Suspensey Images since then we can load that content separately and not
block the main content. This also allows us to animate the reveal.
For example this should be able to animate the reveal even though the
actual HTML content isn't large in this case it's worth outlining so
that the JS runtime can choose to animate this reveal.
```js
<ViewTransition>
<Suspense>
<img src="..." />
</Suspense>
</ViewTransition>
```
For Suspensey Images, in Fizz, we currently only implement the suspensey
semantics when a View Transition is running. Therefore the outlining
only applies if it appears inside a Suspense boundary which might
animate. Otherwise there's no point in outlining. It is also only if the
Suspense boundary itself might animate its appear and not just any
ViewTransition. So the effect is very conservative.
For CSS it applies even without ViewTransition though, since it can help
unblock the main content faster.1 parent ac2c1a5 commit 6eb5d67
File tree
7 files changed
+87
-13
lines changed- fixtures/view-transition/src/components
- packages
- react-dom-bindings/src/server
- react-markup/src
- react-noop-renderer/src
- react-server/src
- forks
7 files changed
+87
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| 241 | + | |
241 | 242 | | |
242 | | - | |
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| |||
Lines changed: 58 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
782 | 782 | | |
783 | 783 | | |
784 | 784 | | |
785 | | - | |
786 | | - | |
787 | | - | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | | - | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
792 | 793 | | |
793 | 794 | | |
794 | 795 | | |
| |||
987 | 988 | | |
988 | 989 | | |
989 | 990 | | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
990 | 1000 | | |
991 | 1001 | | |
992 | 1002 | | |
993 | | - | |
994 | | - | |
| 1003 | + | |
| 1004 | + | |
995 | 1005 | | |
996 | 1006 | | |
997 | 1007 | | |
| |||
1063 | 1073 | | |
1064 | 1074 | | |
1065 | 1075 | | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
1066 | 1079 | | |
1067 | 1080 | | |
1068 | 1081 | | |
| |||
3289 | 3302 | | |
3290 | 3303 | | |
3291 | 3304 | | |
| 3305 | + | |
3292 | 3306 | | |
3293 | 3307 | | |
3294 | 3308 | | |
| |||
3321 | 3335 | | |
3322 | 3336 | | |
3323 | 3337 | | |
| 3338 | + | |
| 3339 | + | |
| 3340 | + | |
| 3341 | + | |
| 3342 | + | |
| 3343 | + | |
| 3344 | + | |
| 3345 | + | |
| 3346 | + | |
| 3347 | + | |
| 3348 | + | |
| 3349 | + | |
| 3350 | + | |
3324 | 3351 | | |
3325 | 3352 | | |
3326 | 3353 | | |
| |||
4255 | 4282 | | |
4256 | 4283 | | |
4257 | 4284 | | |
4258 | | - | |
| 4285 | + | |
| 4286 | + | |
| 4287 | + | |
| 4288 | + | |
| 4289 | + | |
| 4290 | + | |
| 4291 | + | |
| 4292 | + | |
4259 | 4293 | | |
4260 | 4294 | | |
4261 | 4295 | | |
| |||
6125 | 6159 | | |
6126 | 6160 | | |
6127 | 6161 | | |
| 6162 | + | |
6128 | 6163 | | |
6129 | 6164 | | |
6130 | 6165 | | |
| |||
6138 | 6173 | | |
6139 | 6174 | | |
6140 | 6175 | | |
| 6176 | + | |
6141 | 6177 | | |
6142 | 6178 | | |
6143 | 6179 | | |
| |||
6995 | 7031 | | |
6996 | 7032 | | |
6997 | 7033 | | |
| 7034 | + | |
| 7035 | + | |
| 7036 | + | |
| 7037 | + | |
| 7038 | + | |
| 7039 | + | |
| 7040 | + | |
| 7041 | + | |
| 7042 | + | |
| 7043 | + | |
| 7044 | + | |
| 7045 | + | |
6998 | 7046 | | |
6999 | 7047 | | |
7000 | 7048 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
325 | 326 | | |
326 | 327 | | |
327 | 328 | | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
328 | 334 | | |
329 | 335 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
245 | 250 | | |
246 | 251 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
327 | 330 | | |
328 | 331 | | |
329 | 332 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
| |||
461 | 462 | | |
462 | 463 | | |
463 | 464 | | |
464 | | - | |
| 465 | + | |
465 | 466 | | |
466 | 467 | | |
467 | 468 | | |
| |||
5748 | 5749 | | |
5749 | 5750 | | |
5750 | 5751 | | |
| 5752 | + | |
| 5753 | + | |
| 5754 | + | |
| 5755 | + | |
5751 | 5756 | | |
5752 | | - | |
| 5757 | + | |
| 5758 | + | |
5753 | 5759 | | |
5754 | 5760 | | |
5755 | 5761 | | |
| |||
5980 | 5986 | | |
5981 | 5987 | | |
5982 | 5988 | | |
| 5989 | + | |
| 5990 | + | |
5983 | 5991 | | |
5984 | 5992 | | |
5985 | 5993 | | |
| |||
6095 | 6103 | | |
6096 | 6104 | | |
6097 | 6105 | | |
| 6106 | + | |
6098 | 6107 | | |
6099 | 6108 | | |
6100 | 6109 | | |
| |||
6106 | 6115 | | |
6107 | 6116 | | |
6108 | 6117 | | |
| 6118 | + | |
6109 | 6119 | | |
6110 | 6120 | | |
6111 | 6121 | | |
| |||
6123 | 6133 | | |
6124 | 6134 | | |
6125 | 6135 | | |
| 6136 | + | |
6126 | 6137 | | |
6127 | 6138 | | |
6128 | 6139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
107 | 108 | | |
0 commit comments