Commit Graph

20454 Commits

Author SHA1 Message Date
Joe Savona ae3d32dfd5 Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-06-05 13:59:44 -07:00
Joe Savona e8c36fcb0b Update base for Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-06-05 13:59:43 -07:00
Joe Savona 3ab9e51e2d Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-06-04 17:00:03 -07:00
Joe Savona f0a5bf2d0c Update base for Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-06-04 17:00:02 -07:00
Joe Savona 3ead50a57b Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-06-04 16:47:15 -07:00
Joe Savona 658346a0d5 Update base for Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-06-04 16:47:14 -07:00
Joe Savona fc12471697 Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-06-03 16:59:47 -07:00
Joe Savona a0d375a8cc Update base for Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-06-03 16:59:46 -07:00
Joe Savona f1171c41bd Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-06-03 11:32:54 -07:00
Joe Savona f4d32858c1 Update base for Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-06-03 11:32:54 -07:00
Joe Savona 5497c0fdb9 Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-06-03 09:00:21 -07:00
Joe Savona fc564319bb Update base for Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-06-03 09:00:20 -07:00
Joe Savona 8865ae4fb9 Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-06-01 17:19:00 -07:00
Joe Savona afd08fac96 Update base for Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-06-01 17:18:59 -07:00
Joe Savona 9e508d791b Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-05-30 16:29:10 -07:00
Joe Savona 6b8dfbab2e Update base for Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-05-30 16:29:09 -07:00
Joe Savona 94b949a583 Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-05-30 15:56:36 -07:00
Joe Savona 56f3b59155 Update base for Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-05-30 15:56:36 -07:00
Joe Savona 51911042d1 Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-05-30 11:33:03 -07:00
Joe Savona 3eace0558b Update base for Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-05-30 11:33:02 -07:00
Joe Savona db7db5868a Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-05-29 17:30:02 -07:00
Joe Savona 2b9ab09bad Update base for Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-05-29 17:30:01 -07:00
Joe Savona 7123732297 Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-05-28 22:26:55 -07:00
Joe Savona 7fc780ce6b Update base for Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-05-28 22:26:54 -07:00
Joe Savona ab93a18ce0 Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-05-28 17:38:21 -07:00
Joe Savona 83556d0788 Update base for Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-05-28 17:38:20 -07:00
Joe Savona ea1d621c60 Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-05-28 16:29:08 -07:00
Joe Savona 4e468fe14c Update base for Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-05-28 16:29:07 -07:00
Joe Savona d24e6ac72d Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-05-28 15:42:16 -07:00
Joe Savona d3493f342b Update base for Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-05-28 15:42:15 -07:00
Joe Savona e6883db3a6 Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-05-27 16:30:43 -07:00
Joe Savona a181223843 Update base for Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-05-27 16:30:43 -07:00
Joe Savona ca8463d4e0 Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-05-27 14:23:21 -07:00
Joe Savona a847d70909 Update base for Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-05-27 14:23:20 -07:00
Joe Savona 87163cbc6e Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-05-23 16:58:04 -07:00
Joe Savona 748a468f58 Update base for Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-05-23 16:58:03 -07:00
Joe Savona f144185592 Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-05-22 16:57:22 -07:00
Joe Savona 53dd9a8287 Update base for Update on "[compiler] allow local fixtures to be excluded from git w "nocommit" prefix"
[ghstack-poisoned]
2025-05-22 16:57:21 -07:00
Sebastian Markbåge 5dc1b212c3 [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 <silbermann.sebastian@gmail.com>
2025-05-19 15:16:42 -04:00
Jan Kassens a3abf5f2f8 [eslint-plugin-react-hooks] add experimental_autoDependenciesHooks option (#33294) 2025-05-19 15:08:30 -04:00
Sebastian Markbåge 462d08f9ba Move SuspenseListProps into a shared/ReactTypes (#33298)
So they can be shared by server. Incorporates the types from definitely
typed too.
2025-05-17 20:00:56 -04:00
Sebastian Markbåge 6060367ef8 [Fizz] Wrap revealCompletedBoundaries in a ViewTransitions aware version (#33293)
When needed.

For the external runtime we always include this wrapper.

For others, we only include it if we have an ViewTransitions affecting.
If we discover the ViewTransitions late, then we can upgrade an already
emitted instruction.

This doesn't yet do anything useful with it, that's coming in a follow
up. This is just the mechanism for how it gets installed.
2025-05-17 18:18:24 -04:00
Sebastian Markbåge c250b7d980 [Fizz] Should be considered complete inside onShellReady callback (#33295)
We decremented `allPendingTasks` after invoking `onShellReady`. Which
means that in that scope it wasn't considered fully complete.

Since the pattern for flushing in Node.js is to start piping in
`onShellReady` and that's how you can get sync behavior, this led us to
think that we had more work left to do. For example we emitted the
`writeShellTimeInstruction` in this scenario before.
2025-05-16 14:53:40 -04:00
Jan Kassens 4448b18760 [eslint-plugin-react-hooks] fix exhaustive deps lint rule with component syntax (#33182) 2025-05-15 12:51:18 -04:00
Ricky 4a45ba92c4 [sync] Fix noop for xplat (#33214)
Noop detection for xplat syncs broke because `eslint-plugin-react-hooks`
uses versions like:

- `0.0.0-experimental-d85f86cf-20250514`

But xplat expects them to be of the form:

- `19.2.0-native-fb-63d664b2-20250514`

This PR fixes the noop by ignoring
`eslint-plugin-react-hooks/package.json` changes. This means we won't
create a sync if only that package.json changes, but that should be rare
and we can follow up with better detection if needed.

[Example failed
action](https://github.com/facebook/react/actions/runs/15032346805/job/42247414406):

<img width="1031" alt="Screenshot 2025-05-15 at 11 31 17 AM"
src="https://github.com/user-attachments/assets/d902079c-1afe-4e18-af1d-25e60e28929e"
/>

I believe the regression was caused by
https://github.com/facebook/react/pull/33104
2025-05-15 12:12:51 -04:00
lauren 08cb2d7ee7 [ci] Log author_association (#33213)
For debugging purposes, log author_association
2025-05-15 11:49:56 -04:00
lauren 203df2c940 [compiler] Update changelog for 19.1.0-rc.2 (#33207)
Update the changelog.
2025-05-15 10:34:11 -04:00
Sebastian Markbåge 65b5aae010 [Fizz] Add vt- prefix attributes to annotate <ViewTransition> in HTML (#33206)
Stacked on #33194 and #33200.

When Suspense boundaries reveal during streaming, the Fizz runtime will
be responsible for animating the reveal if necessary (not in this PR).
However, for the future runtime to know what to do it needs to know
about the `<ViewTransition>` configuration to apply.

Ofc, these are virtual nodes that disappear from the HTML. We could
model them as comments like we do with other virtual nodes like Suspense
and Activity. However, that doesn't let us target them with
querySelector and CSS (for no-JS transitions). We also don't have to
model every ViewTransition since not every combination can happen using
only the server runtime. So instead this collapses `<ViewTransition>`
and applies the configuration to the inner DOM nodes.

```js
<ViewTransition name="hi">
  <div />
  <div />
</ViewTransition>
```

Becomes:

```html
<div vt-name="hi" vt-update="auto"></div>
<div vt-name="hi_1" vt-update="auto"></div>
```

I use `vt-` prefix as opposed to `data-` to keep these virtual
attributes away from user specific ones but we're effectively claiming
this namespace.

There are four triggers `vt-update`, `vt-enter`, `vt-exit` and
`vt-share`. The server resolves which ones might apply to this DOM node.
The value represents the class name (after resolving
view-transition-type mappings) or `"auto"` if no specific class name is
needed but this is still a trigger.

The value can also be `"none"`. This is different from missing because
for example an `vt-update="none"` will block mutations inside it from
triggering the boundary where as a missing `vt-update` would bubble up
to be handled by a parent.

`vt-name` is technically only necessary when `vt-share` is specified to
find a pair. However, since an explicit name can also be used to target
specific CSS selectors, we include it even for other cases.

We want to exclude as many of these annotations as possible.

`vt-enter` can only affect the first DOM node inside a Suspense
boundary's content since the reveal would cause it to enter but nothing
deeper inside. Similarly `vt-exit` can only affect the first DOM node
inside a fallback. So for every other case we can exclude them. (For
future MPA ViewTransitions of the whole document it might also be
something we annotate to children inside the `<body>` as well.) Ideally
we'd only include `vt-enter` for Suspense boundaries that actually
flushed a fallback but since we prepare all that content earlier it's
hard to know.

`vt-share` can be anywhere inside an fallback or content. Technically we
don't have to include it outside the root most Suspense boundary or for
boundaries that are inlined into the root shell. However, this is tricky
to detect. It would also not be correct for future MPA ViewTransitions
because in that case the shared scenario can affect anything in the two
documents so it needs to be in every node everywhere which is
effectively what we do. If a `share` class is specified but it has no
explicit name, we can exclude it since it can't match anything.

`vt-update` is only necessary if something below or a sibling might
update like a Suspense boundary. However, since we don't know when
rendering a segment if it'll later asynchronously add a Suspense
boundary later we have to assume that anywhere might have a child. So
these are always included. We collapse to use the inner most one when
directly nested though since that's the one that ends up winning.

There are some weird edge cases that can't be fully modeled by the lack
of virtual nodes.
2025-05-15 01:04:10 -04:00
Sebastian Markbåge 3f67d0857e [Fizz] Track whether we're in a fallback on FormatContext (#33194)
Removes the `isFallback` flag on Tasks and tracks it on the
formatContext instead.

Less memory and avoids passing and tracking extra arguments to all the
pushStartInstance branches that doesn't need it.

We'll need to be able to track more Suspense related contexts on this
for View Transitions anyway.
2025-05-15 00:06:06 -04:00
Sebastian Markbåge 96eb84e493 Claim the useId name space for every auto named ViewTransition (#33200)
This is a partial revert of #33094. It's true that we don't need the
server and client ViewTransition names to line up. However the server
does need to be able to generate deterministic names for itself. The
cheapest way to do that is using the useId algorithm. When it's used by
the server, the client needs to also materialize an ID even if it
doesn't use it.
2025-05-14 17:52:41 -04:00