GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Update ReactDOMServerSuspense-test to not use legacy rendering APIs by gnoff · Pull Request #28251 · react/react

Conversation

@gnoff

@gnoff gnoff commented Feb 5, 2024

Copy link
Copy Markdown
Collaborator

Updates ReactDOMServerSuspense-test to not use legacy rendering APIs
Also removes an experimental only gate that is not necessary

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Feb 5, 2024
@react-sizebot

react-sizebot commented Feb 5, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Comparing: 952aa74...be76c13

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 176.37 kB 176.37 kB = 54.96 kB 54.96 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 178.37 kB 178.37 kB = 55.54 kB 55.54 kB
facebook-www/ReactDOM-prod.classic.js = 590.79 kB 590.79 kB = 104.26 kB 104.26 kB
facebook-www/ReactDOM-prod.modern.js = 574.55 kB 574.55 kB = 101.36 kB 101.36 kB
test_utils/ReactAllWarnings.js Deleted 67.02 kB 0.00 kB Deleted 16.42 kB 0.00 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
test_utils/ReactAllWarnings.js Deleted 67.02 kB 0.00 kB Deleted 16.42 kB 0.00 kB

Generated by 🚫 dangerJS against be76c13

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gnoff
gnoff force-pushed the r19-tests-1 branch from 82450e1 to b307675 Compare February 5, 2024 23:36
@gnoff
gnoff requested review from rickhanlonii and sebmarkbage February 5, 2024 23:36
rickhanlonii
rickhanlonii reviewed Feb 6, 2024
View reviewed changes
Comment thread packages/react-dom/src/__tests__/ReactDOMServerSuspense-test.internal.js Outdated
}

const {itThrowsWhenRendering, resetModules, serverRender} =
const {resetModules, itThrowsWhenRendering} =

@rickhanlonii rickhanlonii Feb 6, 2024

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gnoff line 38 is still using ReactDOM instead of ReactDOMClient so the itThrowsWhenRendering tests are still using the legacy renderer.

If you pass ReactDOMClient here:

return {
    ReactDOMClient,
    ReactDOMServer,
    ReactTestUtils,
  };

Then we switch to hyrdateRoot in the helpers:

https://github.com/facebook/react/blob/6054be9c86f2e01e5e24c1fe2182479fec8667e4/packages/react-dom/src/__tests__/utils/ReactDOMServerIntegrationTestUtils.js#L55-L63

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@gnoff gnoff Feb 6, 2024

Copy link
Copy Markdown
Collaborator Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I didn't realize the I had to return the client version for the utils to use it. I took another look and the thing the itThrowsWhenRendering was asserting actually is wrong now for concurrent roots on the client so really the test only should be asserting on server behavior (also probably what the test was written for originally given the filename). I just ripped out the test utils entirely now and it only uses the underlying modules directly.

Thanks for flagging!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gnoff
gnoff force-pushed the r19-tests-1 branch 2 times, most recently from f9e7047 to f946f51 Compare February 6, 2024 05:05
@gnoff
Update ReactDOMServerSuspense-test to not use legacy rendering APIs
be76c13
Updates ReactDOMServerSuspense-test to not use legacy rendering APIs. Previously this test was relying on suspending in the legacy renderer to throw during server rendering as well as during client rendering. With the advent of concurrent roots on the client however this doesn't make sense and it only makes sense on the server when using legacy apis like renderToString.

I have removed the use of ReactDOMServerIntegrationTestUtils in this test suite and limited the tests to server tests using renderToString to keep as much parity with what was being tested before while dropping anything that no longer makes sense to assert on concurrent client roots
@gnoff
gnoff force-pushed the r19-tests-1 branch from f946f51 to be76c13 Compare February 6, 2024 05:16
gnoff
gnoff commented Feb 6, 2024
View reviewed changes
Comment thread packages/react-dom/src/__tests__/ReactDOMServerSuspense-test.internal.js
Comment on lines -192 to -204
itThrowsWhenRendering(
'a suspending component without a Suspense above',
async render => {
await render(
<div>
<AsyncText text="Children" />
</div>,
1,
);
},
'A component suspended while responding to synchronous input.',
);
}

@gnoff gnoff Feb 6, 2024

Copy link
Copy Markdown
Collaborator Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is essentially a duplicate of the above test

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@rickhanlonii rickhanlonii Feb 6, 2024

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like it's worth keeping in case there's something fucky with having a boundary in the tree

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
rickhanlonii
rickhanlonii approved these changes Feb 6, 2024
View reviewed changes
@gnoff
gnoff merged commit 0a53c46 into react:main Feb 6, 2024
@gnoff
gnoff deleted the r19-tests-1 branch February 6, 2024 05:25
@ztanner ztanner mentioned this pull request Feb 9, 2024
Update React from 2bc7d336a to ba5e6a832 vercel/next.js#61837
Merged
huozhi pushed a commit to vercel/next.js that referenced this pull request Feb 9, 2024
@ztanner
Update React from 2bc7d336a to ba5e6a832 (#61837)
f165514
Updates React from 2bc7d336a to ba5e6a832.

### React upstream changes

- react/react#28283
- react/react#28280
- react/react#28079
- react/react#28233
- react/react#28276
- react/react#28272
- react/react#28265
- react/react#28259
- react/react#28153
- react/react#28246
- react/react#28218
- react/react#28263
- react/react#28257
- react/react#28261
- react/react#28262
- react/react#28260
- react/react#28258
- react/react#27864
- react/react#28254
- react/react#28219
- react/react#28248
- react/react#28216
- react/react#28249
- react/react#28241
- react/react#28243
- react/react#28253
- react/react#28256
- react/react#28236
- react/react#28237
- react/react#28242
- react/react#28251
- react/react#28252

Closes NEXT-2411
@ztanner ztanner mentioned this pull request Mar 19, 2024
(backport) Update React from 60a927d04 to 14898b6a9 vercel/next.js#63442
Closed
EdisonVan pushed a commit to EdisonVan/react that referenced this pull request Apr 15, 2024
@gnoff @AndyPengc12
Update ReactDOMServerSuspense-test to not use legacy rendering APIs (r…
dbe5610
…eact#28251)

Updates ReactDOMServerSuspense-test to not use legacy rendering APIs
Also removes an experimental only gate that is not necessary
bigfootjon pushed a commit that referenced this pull request Apr 18, 2024
@gnoff
Update ReactDOMServerSuspense-test to not use legacy rendering APIs (#…
7b24e7b
…28251)

Updates ReactDOMServerSuspense-test to not use legacy rendering APIs
Also removes an experimental only gate that is not necessary

DiffTrain build for commit 0a53c46.
hanzo-dev pushed a commit to hanzoai/react that referenced this pull request Sep 9, 2026
@gnoff
Update ReactDOMServerSuspense-test to not use legacy rendering APIs (r…
74557f2
…eact#28251)

Updates ReactDOMServerSuspense-test to not use legacy rendering APIs
Also removes an experimental only gate that is not necessary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@sebmarkbage sebmarkbage Awaiting requested review from sebmarkbage
1 more reviewer
@rickhanlonii rickhanlonii rickhanlonii approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@gnoff @react-sizebot @rickhanlonii @facebook-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.