Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try: React 19 <link /> for components #66781

Draft
wants to merge 22 commits into
base: try/react-19-beta
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 57 additions & 65 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,14 @@
"progress": "2.0.3",
"puppeteer-core": "23.1.0",
"raw-loader": "4.0.2",
"react": "18.3.1",
"react": "19.0.0-rc-33c7bd9a-20241104",
"react-docgen-typescript": "2.2.2",
"react-dom": "18.3.1",
"react-dom": "19.0.0-rc-33c7bd9a-20241104",
"react-native": "0.73.3",
"react-native-url-polyfill": "1.1.2",
"react-refresh": "0.14.0",
"react-scanner": "1.2.0",
"react-test-renderer": "18.3.1",
"react-test-renderer": "19.0.0-rc-33c7bd9a-20241104",
"reassure": "0.7.1",
"redux": "4.1.2",
"resize-observer-polyfill": "1.5.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-preset-default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@wordpress/warning": "*",
"browserslist": "^4.21.10",
"core-js": "^3.31.0",
"react": "^18.3.0"
"react": "^19.0.0-rc-100dfd7dab-20240701"
},
"publishConfig": {
"access": "public"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe( 'createCustomColorsHOC', () => {
colors: undefined,
setBackgroundColor: expect.any( Function ),
} ),
expect.anything()
undefined
);
} );

Expand Down
7 changes: 2 additions & 5 deletions packages/block-editor/src/components/iframe/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,6 @@ function Iframe( {
${ styles }
${ scripts }
</head>
<body>
<script>document.currentScript.parentElement.remove()</script>
</body>
</html>`;

const [ src, cleanup ] = useMemo( () => {
Expand Down Expand Up @@ -468,7 +465,7 @@ function Iframe( {
}
} }
>
{ iframeDocument &&
{ iframeDocument?.body &&
createPortal(
// We want to prevent React events from bubbling throught the iframe
// we bubble these manually.
Expand All @@ -486,7 +483,7 @@ function Iframe( {
{ children }
</StyleProvider>
</body>,
iframeDocument.documentElement
iframeDocument?.documentElement
) }
</iframe>
{ shouldRenderFocusCaptureElements && after }
Expand Down
11 changes: 10 additions & 1 deletion packages/block-editor/src/components/inserter-listbox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* WordPress dependencies
*/
import { Composite } from '@wordpress/components';
import { Fragment } from '@wordpress/element';

/**
* Internal dependencies
Expand All @@ -11,9 +12,17 @@ export { default as InserterListboxGroup } from './group';
export { default as InserterListboxRow } from './row';
export { default as InserterListboxItem } from './item';

function InserterListBoxWrapper( { key, children } ) {
return <Fragment key={ key }>{ children }</Fragment>;
}

function InserterListbox( { children } ) {
return (
<Composite focusShift focusWrap="horizontal" render={ <></> }>
<Composite
focusShift
focusWrap="horizontal"
render={ InserterListBoxWrapper }
>
{ children }
</Composite>
);
Expand Down
Loading
Loading