Skip to content

Commit 378689c

Browse files
committed
Merge branch 'trunk' into update/ui-emptystate-component
2 parents cf55b85 + 78df0c7 commit 378689c

2,752 files changed

Lines changed: 157433 additions & 55414 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ node_modules
77
packages/block-serialization-spec-parser/parser.js
88
packages/icons/src/library/*.tsx
99
packages/react-native-editor/bundle
10+
packages/vips/src/worker-code.ts
1011
vendor
1112
!.*.js

.eslintrc.js

Lines changed: 66 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ const restrictedImports = [
6565
message:
6666
"Please use `clsx` instead. It's a lighter and faster drop-in replacement for `classnames`.",
6767
},
68+
{
69+
name: '@base-ui/react',
70+
message:
71+
'Avoid using Base UI directly. Consider a new `@wordpress/ui` component instead.',
72+
},
6873
];
6974

7075
const restrictedSyntax = [
@@ -145,6 +150,7 @@ module.exports = {
145150
],
146151
'@wordpress/no-unsafe-wp-apis': 'off',
147152
'@wordpress/data-no-store-string-literals': 'error',
153+
'@wordpress/use-recommended-components': 'error',
148154
'eslint-comments/no-unused-disable': 'error',
149155
'import/default': 'error',
150156
'import/named': 'error',
@@ -428,8 +434,22 @@ module.exports = {
428434
{
429435
files: [ 'packages/components/src/**' ],
430436
excludedFiles: [ 'packages/components/src/**/@(test|stories)/**' ],
431-
plugins: [ 'ssr-friendly' ],
432-
extends: [ 'plugin:ssr-friendly/recommended' ],
437+
rules: {
438+
'@wordpress/no-dom-globals-in-module-scope': 'error',
439+
'@wordpress/no-dom-globals-in-constructor': 'error',
440+
'@wordpress/no-dom-globals-in-react-cc-render': 'error',
441+
'@wordpress/no-dom-globals-in-react-fc': 'error',
442+
},
443+
},
444+
{
445+
files: [ 'packages/components/src/**' ],
446+
excludedFiles: [ 'packages/components/src/**/@(test|stories)/**' ],
447+
rules: {
448+
// Disallow usage of Design System token CSS custom properties (`--wpds-*`)
449+
// because the fallback injection in the build process is not compatible with Emotion files.
450+
// Can be removed when there are no more Emotion files in the package.
451+
'@wordpress/no-ds-tokens': 'error',
452+
},
433453
},
434454
{
435455
files: [
@@ -445,13 +465,12 @@ module.exports = {
445465
},
446466
},
447467
{
448-
files: [ 'packages/components/src/**', 'packages/ui/src/**' ],
468+
files: [ 'packages/components/src/**' ],
449469
rules: {
450470
'no-restricted-imports': [
451471
'error',
452-
// The `ariakit` and `framer-motion` APIs are meant to be consumed via
453-
// the `@wordpress/components` and @wordpress/ui` packages, hence why
454-
// importing those imports should be allowed only in those packages.
472+
// The following dependencies are meant to be consumed directly in the
473+
// @wordpress/components package, hence why their imports are allowed.
455474
{
456475
paths: restrictedImports.filter(
457476
( { name } ) =>
@@ -464,6 +483,22 @@ module.exports = {
464483
],
465484
},
466485
},
486+
{
487+
files: [ 'packages/ui/src/**' ],
488+
rules: {
489+
'no-restricted-imports': [
490+
'error',
491+
// The following dependencies are meant to be consumed directly in the
492+
// @wordpress/ui package, hence why their imports are allowed.
493+
{
494+
paths: restrictedImports.filter(
495+
( { name } ) =>
496+
! [ '@base-ui/react' ].includes( name )
497+
),
498+
},
499+
],
500+
},
501+
},
467502
{
468503
files: [ 'packages/block-editor/**' ],
469504
rules: {
@@ -505,12 +540,37 @@ module.exports = {
505540
],
506541
},
507542
},
543+
{
544+
files: [ 'packages/block-library/src/*/save.[tj]s?(x)' ],
545+
rules: {
546+
'@wordpress/no-i18n-in-save': 'error',
547+
},
548+
},
508549
{
509550
files: [ 'packages/interactivity*/src/**' ],
510551
rules: {
511552
'react-compiler/react-compiler': 'off',
512553
'react/react-in-jsx-scope': 'error',
513554
},
514555
},
556+
{
557+
files: [ 'packages/ui/src/**' ],
558+
rules: {
559+
'@wordpress/dependency-group': [ 'error', 'never' ],
560+
},
561+
},
562+
{
563+
files: [ 'packages/eslint-plugin/**', 'packages/theme/**' ],
564+
rules: {
565+
'@wordpress/no-setting-ds-tokens': 'off',
566+
'@wordpress/no-unknown-ds-tokens': 'off',
567+
},
568+
},
569+
{
570+
files: [ 'storybook/stories/**' ],
571+
rules: {
572+
'@wordpress/use-recommended-components': 'off',
573+
},
574+
},
515575
],
516576
};

.github/CODEOWNERS

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
/packages/block-library/src/table-of-contents @ZebulanStanphill
1919

2020
# Duotone
21-
/lib/block-supports/duotone.php
22-
/packages/block-editor/src/components/duotone-control
23-
/packages/block-editor/src/hooks/duotone.js
24-
/packages/components/src/duotone-picker
21+
/lib/block-supports/duotone.php @sgomes
22+
/packages/block-editor/src/components/duotone-control @sgomes
23+
/packages/block-editor/src/hooks/duotone.js @sgomes
24+
/packages/components/src/duotone-picker @sgomes
2525

2626
# Editor
2727
/packages/annotations @atimmer
@@ -34,7 +34,6 @@
3434
/packages/blocks
3535
/packages/edit-post
3636
/packages/editor
37-
/packages/editor/src/components/post-title @alexstine
3837
/packages/list-reusable-blocks
3938
/packages/shortcode
4039
/packages/block-directory
@@ -80,7 +79,7 @@
8079
/test/php/gutenberg-coding-standards @anton-vlasenko
8180

8281
# UI Components
83-
/packages/components @ajitbohra
82+
/packages/components @ajitbohra @WordPress/gutenberg-components
8483
/packages/compose @ajitbohra
8584
/packages/element @ajitbohra
8685
/packages/notices @ajitbohra

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,9 @@ Closes <!-- #ISSUE-NUMBER or URL -->
2929
|Before|After|
3030
|-|-|
3131
|<!-- Before screenshot here -->|<!-- After screenshot here -->|
32+
33+
## Use of AI Tools
34+
35+
<!--
36+
You are free to use artificial intelligence (AI) tooling to contribute, but you must disclose what tooling you are using and to what extent a pull request has been authored by AI. It is your responsibility to review and take responsibility for what AI generates. See the WordPress AI Guidelines: <https://make.wordpress.org/ai/handbook/ai-guidelines/>.
37+
-->

.github/labeler.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,10 @@
236236
- changed-files:
237237
- any-glob-to-any-file: 'packages/token-list/**'
238238

239+
'[Package] UI':
240+
- changed-files:
241+
- any-glob-to-any-file: 'packages/ui/**'
242+
239243
'[Package] Url':
240244
- changed-files:
241245
- any-glob-to-any-file: 'packages/url/**'

.github/setup-node/action.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@ inputs:
44
node-version:
55
description: 'Optional. The Node.js version to use. When not specified, the version specified in .nvmrc will be used.'
66
required: false
7-
type: string
87

98
runs:
109
using: 'composite'
1110
steps:
1211
- name: Use desired version of Node.js
13-
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
12+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
1413
with:
1514
node-version-file: ${{ inputs.node-version == '' && '.nvmrc' || '' }}
1615
node-version: ${{ inputs.node-version }}
@@ -25,7 +24,7 @@ runs:
2524

2625
- name: Cache node_modules
2726
id: cache-node_modules
28-
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
27+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
2928
with:
3029
path: '**/node_modules'
3130
key: node_modules-${{ runner.os }}-${{ runner.arch }}-${{ steps.node-version.outputs.NODE_VERSION }}-${{ hashFiles('package-lock.json', 'patches/**') }}
@@ -36,7 +35,7 @@ runs:
3635
npm ci
3736
shell: bash
3837
- name: Upload npm logs as an artifact on failure
39-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
38+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
4039
if: failure()
4140
with:
4241
name: npm-logs

0 commit comments

Comments
 (0)