Commit 08d69e2
committed
[Fizz] Support basic SuspenseList forwards/backwards revealOrder (#33306)
Basically we track a `SuspenseListRow` on the task. These keep track of
"pending tasks" that block the row. A row is blocked by:
- First itself completing rendering.
- A previous row completing.
- Any tasks inside the row and before the Suspense boundary inside the
row. This is mainly because we don't yet know if we'll discover more
SuspenseBoundaries.
- Previous row's SuspenseBoundaries completing.
If a boundary might get outlined, then we can't consider it completed
until we have written it because it determined whether other future
boundaries in the row can finish.
This is just handling basic semantics. Features not supported yet that
need follow ups later:
- CSS dependencies of previous rows should be added as dependencies of
future row's suspense boundary. Because otherwise if the client is
blocked on CSS then a previous row could be blocked but the server
doesn't know it.
- I need a second pass on nested SuspenseList semantics.
- `revealOrder="together"`
- `tail="hidden"`/`tail="collapsed"`. This needs some new runtime
semantics to the Fizz runtime and to allow the hydration to handle
missing rows in the HTML. This should also be future compatible with
AsyncIterable where we don't know how many rows upfront.
- Need to double check resuming semantics.
---------
Co-authored-by: Sebastian "Sebbie" Silbermann <[email protected]>
DiffTrain build for [5dc1b21](5dc1b21)1 parent 1ee6786 commit 08d69e2
File tree
36 files changed
+2706
-1103
lines changed- compiled/facebook-www
36 files changed
+2706
-1103
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1537 | 1537 | | |
1538 | 1538 | | |
1539 | 1539 | | |
1540 | | - | |
| 1540 | + | |
1541 | 1541 | | |
1542 | 1542 | | |
1543 | 1543 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1537 | 1537 | | |
1538 | 1538 | | |
1539 | 1539 | | |
1540 | | - | |
| 1540 | + | |
1541 | 1541 | | |
1542 | 1542 | | |
1543 | 1543 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
635 | 635 | | |
636 | 636 | | |
637 | 637 | | |
638 | | - | |
| 638 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
635 | 635 | | |
636 | 636 | | |
637 | 637 | | |
638 | | - | |
| 638 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
642 | | - | |
| 642 | + | |
643 | 643 | | |
644 | 644 | | |
645 | 645 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
642 | | - | |
| 642 | + | |
643 | 643 | | |
644 | 644 | | |
645 | 645 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19063 | 19063 | | |
19064 | 19064 | | |
19065 | 19065 | | |
19066 | | - | |
| 19066 | + | |
19067 | 19067 | | |
19068 | 19068 | | |
19069 | | - | |
| 19069 | + | |
19070 | 19070 | | |
19071 | 19071 | | |
19072 | 19072 | | |
| |||
19100 | 19100 | | |
19101 | 19101 | | |
19102 | 19102 | | |
19103 | | - | |
| 19103 | + | |
19104 | 19104 | | |
19105 | 19105 | | |
19106 | 19106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18835 | 18835 | | |
18836 | 18836 | | |
18837 | 18837 | | |
18838 | | - | |
| 18838 | + | |
18839 | 18839 | | |
18840 | 18840 | | |
18841 | | - | |
| 18841 | + | |
18842 | 18842 | | |
18843 | 18843 | | |
18844 | 18844 | | |
| |||
18872 | 18872 | | |
18873 | 18873 | | |
18874 | 18874 | | |
18875 | | - | |
| 18875 | + | |
18876 | 18876 | | |
18877 | 18877 | | |
18878 | 18878 | | |
| |||
0 commit comments