Skip to content

Commit

Permalink
Merge branch 'trunk' into update/modal-animation
Browse files Browse the repository at this point in the history
  • Loading branch information
jameskoster committed Aug 29, 2024
2 parents 2510624 + 99e8faa commit 30773e4
Show file tree
Hide file tree
Showing 356 changed files with 4,808 additions and 2,625 deletions.
17 changes: 8 additions & 9 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ module.exports = {
'LineHeightControl',
'NumberControl',
'RangeControl',
'SelectControl',
'TextControl',
'ToggleGroupControl',
].map( ( componentName ) => ( {
Expand All @@ -344,15 +345,13 @@ module.exports = {
'FormFileUpload should have the `__next40pxDefaultSize` prop to opt-in to the new default size.',
},
// Temporary rules until all existing components have the `__next40pxDefaultSize` prop.
...[ 'SelectControl', 'UnitControl' ].map(
( componentName ) => ( {
// Not strict. Allows pre-existing __next40pxDefaultSize={ false } usage until they are all manually updated.
selector: `JSXOpeningElement[name.name="${ componentName }"]:not(:has(JSXAttribute[name.name="__next40pxDefaultSize"])):not(:has(JSXAttribute[name.name="size"]))`,
message:
componentName +
' should have the `__next40pxDefaultSize` prop to opt-in to the new default size.',
} )
),
...[ 'Button', 'UnitControl' ].map( ( componentName ) => ( {
// Not strict. Allows pre-existing __next40pxDefaultSize={ false } usage until they are all manually updated.
selector: `JSXOpeningElement[name.name="${ componentName }"]:not(:has(JSXAttribute[name.name="__next40pxDefaultSize"])):not(:has(JSXAttribute[name.name="size"]))`,
message:
componentName +
' should have the `__next40pxDefaultSize` prop to opt-in to the new default size.',
} ) ),
],
},
},
Expand Down
8 changes: 4 additions & 4 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Documentation
/docs @ajitbohra @ryanwelcher @juanmaguitar @fabiankaegy @ndiego
/docs @ajitbohra @juanmaguitar @fabiankaegy @ndiego
/packages/interactivity/docs @juanmaguitar

# Schemas
Expand Down Expand Up @@ -119,9 +119,9 @@
/packages/plugins @gziolo @adamsilverstein

# Rich Text
/packages/format-library @ellatrix @dcalhoun
/packages/rich-text @ellatrix @dcalhoun
/packages/block-editor/src/components/rich-text @ellatrix @dcalhoun
/packages/format-library @ellatrix
/packages/rich-text @ellatrix
/packages/block-editor/src/components/rich-text @ellatrix

# Project Management
/.github @desrosj
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/create-block.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,13 @@ concurrency:

jobs:
checks:
name: Checks w/Node.js ${{ matrix.node.name }} on ${{ matrix.os }}
name: Checks w/Node.js ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }}
strategy:
fail-fast: false
matrix:
node:
- name: 20
version: 20
- name: 22
version: 22.4
node: ['20', '22']
os: ['macos-latest', 'ubuntu-latest', 'windows-latest']

steps:
Expand All @@ -35,7 +31,7 @@ jobs:
- name: Setup Node.js and install dependencies
uses: ./.github/setup-node
with:
node-version: ${{ matrix.node.version }}
node-version: ${{ matrix.node }}

- name: Create block
shell: bash
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/rnmobile-android-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- name: Use desired version of Java
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 # v4.2.2
with:
distribution: 'corretto'
java-version: '17'
Expand All @@ -47,7 +47,7 @@ jobs:
run: npm run native test:e2e:setup

- name: Gradle cache
uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda # v3.4.2
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0

- name: AVD cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
Expand All @@ -60,7 +60,7 @@ jobs:

- name: Create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@77986be26589807b8ebab3fde7bbf5c60dabec32 # v2.31.0
uses: reactivecircus/android-emulator-runner@f0d1ed2dcad93c7479e8b2f2226c83af54494915 # v2.32.0
with:
api-level: ${{ matrix.api-level }}
force-avd-creation: false
Expand All @@ -71,7 +71,7 @@ jobs:
script: echo "Generated AVD snapshot for caching."

- name: Run tests
uses: reactivecircus/android-emulator-runner@77986be26589807b8ebab3fde7bbf5c60dabec32 # v2.31.0
uses: reactivecircus/android-emulator-runner@f0d1ed2dcad93c7479e8b2f2226c83af54494915 # v2.32.0
with:
api-level: ${{ matrix.api-level }}
force-avd-creation: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rnmobile-ios-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
with:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- uses: ruby/setup-ruby@50ba3386b050ad5b97a41fcb81240cbee1d1821f # v1.188.0
- uses: ruby/setup-ruby@a6e6f86333f0a2523ece813039b8b4be04560854 # v1.190.0
with:
# `.ruby-version` file location
working-directory: packages/react-native-editor/ios
Expand Down
20 changes: 6 additions & 14 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,13 @@ concurrency:

jobs:
unit-js:
name: JavaScript (Node.js ${{ matrix.node.name }}) ${{ matrix.shard }}
name: JavaScript (Node.js ${{ matrix.node }}) ${{ matrix.shard }}
runs-on: ubuntu-latest
if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }}
strategy:
fail-fast: false
matrix:
node:
- name: 20
version: 20
- name: 22
version: 22.4
node: ['20', '22']
shard: ['1/4', '2/4', '3/4', '4/4']

steps:
Expand All @@ -43,7 +39,7 @@ jobs:
- name: Setup Node.js and install dependencies
uses: ./.github/setup-node
with:
node-version: ${{ matrix.node.version }}
node-version: ${{ matrix.node }}

- name: Determine the number of CPU cores
uses: SimenB/github-actions-cpu-cores@97ba232459a8e02ff6121db9362b09661c875ab8 # v2.0.0
Expand All @@ -64,17 +60,13 @@ jobs:
--cacheDirectory="$HOME/.jest-cache"
unit-js-date:
name: JavaScript Date Tests (Node.js ${{ matrix.node.name }})
name: JavaScript Date Tests (Node.js ${{ matrix.node }})
runs-on: ubuntu-latest
if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }}
strategy:
fail-fast: false
matrix:
node:
- name: 20
version: 20
- name: 22
version: 22.4
node: ['20', '22']

steps:
- name: Checkout repository
Expand All @@ -85,7 +77,7 @@ jobs:
- name: Setup Node.js and install dependencies
uses: ./.github/setup-node
with:
node-version: ${{ matrix.node.version }}
node-version: ${{ matrix.node }}

- name: Determine the number of CPU cores
uses: SimenB/github-actions-cpu-cores@97ba232459a8e02ff6121db9362b09661c875ab8 # v2.0.0
Expand Down
3 changes: 3 additions & 0 deletions backport-changelog/6.7/7139.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
https://github.com/WordPress/wordpress-develop/pull/7139

* https://github.com/WordPress/gutenberg/pull/64504
3 changes: 3 additions & 0 deletions backport-changelog/6.7/7200.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
https://github.com/WordPress/wordpress-develop/pull/7200

* https://github.com/WordPress/gutenberg/pull/64511
3 changes: 3 additions & 0 deletions backport-changelog/6.7/7247.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
https://github.com/WordPress/wordpress-develop/pull/7247

* https://github.com/WordPress/gutenberg/pull/64790
28 changes: 17 additions & 11 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
== Changelog ==

= 19.1.0-rc.1 =
= 19.1.0 =

## Changelog

Expand All @@ -13,30 +13,32 @@
- Ariakit: Update to v0.4.10. ([64637](https://github.com/WordPress/gutenberg/pull/64637))
- DimensionControl: Add flag to remove bottom margin. ([64346](https://github.com/WordPress/gutenberg/pull/64346))
- DropdownMenu V2: Use themed color variables. ([64647](https://github.com/WordPress/gutenberg/pull/64647))
- FocalPointPicker: Default to new 40px size. ([64456](https://github.com/WordPress/gutenberg/pull/64456))
- Placeholders: Update radius temporarily. ([64672](https://github.com/WordPress/gutenberg/pull/64672))
- QueryControls: Default to new 40px size. ([64457](https://github.com/WordPress/gutenberg/pull/64457))
- Reduce gap between steps in SpacingSizesControl, add animation, remove first/last marks. ([63803](https://github.com/WordPress/gutenberg/pull/63803))
- Textarea Control: Update styles. ([64586](https://github.com/WordPress/gutenberg/pull/64586))
- Tools Panel: Sets column-gap to 16px for grid. ([64497](https://github.com/WordPress/gutenberg/pull/64497))
- Update DropdownMenuV2 elevation, remove unused configuration value. ([64432](https://github.com/WordPress/gutenberg/pull/64432))
- Update components radius. ([64368](https://github.com/WordPress/gutenberg/pull/64368))
- Use `useStoreState()` instead of `store.useState()`. ([64648](https://github.com/WordPress/gutenberg/pull/64648))
- Composite: Use internal context to consume composite store. ([64493](https://github.com/WordPress/gutenberg/pull/64493))
- Default to new 40px size in the following:
- FocalPointPicker: ([64456](https://github.com/WordPress/gutenberg/pull/64456))
- QueryControls: ([64457](https://github.com/WordPress/gutenberg/pull/64457))

#### Data Views
- Do not display element descriptions in filters. ([64674](https://github.com/WordPress/gutenberg/pull/64674))
- Add `comment_status` field to quick edit. ([64370](https://github.com/WordPress/gutenberg/pull/64370))
- Add `status` to quick edit. ([64398](https://github.com/WordPress/gutenberg/pull/64398))
- Apply minimal variant to pagination dropdown. ([63815](https://github.com/WordPress/gutenberg/pull/63815))
- Update the style of the datetime fields to match the other types. ([64438](https://github.com/WordPress/gutenberg/pull/64438))
- Use the fields array to define the order of the fields. ([64335](https://github.com/WordPress/gutenberg/pull/64335))
- Make the move left/right controls in table header always available. ([64646](https://github.com/WordPress/gutenberg/pull/64646))
- Support defining field headers/names as React elements. ([64642](https://github.com/WordPress/gutenberg/pull/64642))
- Quick edit: Add Date as field and `datetime` as field type. ([64267](https://github.com/WordPress/gutenberg/pull/64267))
- Add marks to preview size control. ([64546](https://github.com/WordPress/gutenberg/pull/64546))
- Move item size control to the new view configuration UI. ([64380](https://github.com/WordPress/gutenberg/pull/64380))
- Update search appearance in narrow containers. ([64681](https://github.com/WordPress/gutenberg/pull/64681))
- Quick edit additions:
- `comment_status` field. ([64370](https://github.com/WordPress/gutenberg/pull/64370))
- `status` field. ([64398](https://github.com/WordPress/gutenberg/pull/64398))
- 'Date' as field and `datetime` as field type. ([64267](https://github.com/WordPress/gutenberg/pull/64267))
- Extensibility - allow unregistering of the following:
- Duplicate post action ([64441](https://github.com/WordPress/gutenberg/pull/64441))
- Duplicate pattern action ([64373](https://github.com/WordPress/gutenberg/pull/64373))
Expand All @@ -45,16 +47,12 @@
- Reorder-page action ([64199](https://github.com/WordPress/gutenberg/pull/64199))
- View post action ([64467](https://github.com/WordPress/gutenberg/pull/64467))
- View post revisions action ([64464](https://github.com/WordPress/gutenberg/pull/64464))
- Add missing styles and remove opinionated ones for generic usage. ([64711](https://github.com/WordPress/gutenberg/pull/64711))

#### Block Library
- Embed Block: Replace native input element with InputControl component. ([64668](https://github.com/WordPress/gutenberg/pull/64668))
- File: Add border block support. ([64509](https://github.com/WordPress/gutenberg/pull/64509))
- Grid: Prevent highlight of cells when dragging a block if block type can't be dropped into grid. ([64290](https://github.com/WordPress/gutenberg/pull/64290))
- Image block: Add reset button. ([64669](https://github.com/WordPress/gutenberg/pull/64669))
- List Item: Add border support. ([63541](https://github.com/WordPress/gutenberg/pull/63541))
- List: Add border support. ([63540](https://github.com/WordPress/gutenberg/pull/63540))
- Preformatted: Add border block support. ([64302](https://github.com/WordPress/gutenberg/pull/64302))
- Tag Cloud: Add border block support. ([63579](https://github.com/WordPress/gutenberg/pull/63579))
- Overlay caption w. text-shadow. ([63471](https://github.com/WordPress/gutenberg/pull/63471))

#### Design Tools
Expand All @@ -68,6 +66,11 @@
- Post Author Name ([64530](https://github.com/WordPress/gutenberg/pull/64530))
- Post Author ([64599](https://github.com/WordPress/gutenberg/pull/64599))
- Query Title ([64581](https://github.com/WordPress/gutenberg/pull/64581))
- File: ([64509](https://github.com/WordPress/gutenberg/pull/64509))
- List Item: ([63541](https://github.com/WordPress/gutenberg/pull/63541))
- List: ([63540](https://github.com/WordPress/gutenberg/pull/63540))
- Preformatted: ([64302](https://github.com/WordPress/gutenberg/pull/64302))
- Tag Cloud: ([63579](https://github.com/WordPress/gutenberg/pull/63579))

#### Zoom Out
- Add private `isZoomOutMode` selector. ([64503](https://github.com/WordPress/gutenberg/pull/64503))
Expand Down Expand Up @@ -112,6 +115,7 @@
- Load the filter toggle as open if there are primary filters. ([64651](https://github.com/WordPress/gutenberg/pull/64651))
- Sort descending button may be wrongly pressed. ([64547](https://github.com/WordPress/gutenberg/pull/64547))
- Filter icon is displayed even when no filter capabilities are given to any field. ([64640](https://github.com/WordPress/gutenberg/pull/64640))
- Hide sort direction control if there are no sortable fields. ([64817](https://github.com/WordPress/gutenberg/pull/64817))

#### Zoom Out
- Disallow dropping outside section root in Zoom Out mode. ([64500](https://github.com/WordPress/gutenberg/pull/64500))
Expand Down Expand Up @@ -142,13 +146,15 @@
#### Block bindings
- Fix long keys overflow in bindings panel. ([64465](https://github.com/WordPress/gutenberg/pull/64465))
- Hide keys starting with underscore. ([64618](https://github.com/WordPress/gutenberg/pull/64618))
- Refactor utils file. ([64740](https://github.com/WordPress/gutenberg/pull/64740))

#### CSS & Styling
- Remove inconsistent dark theme focus style on block selection. ([64549](https://github.com/WordPress/gutenberg/pull/64549))
- Update postcss-prefixwrap dependency to 1.51.0 to fix prefixing in `:Where` selectors. ([64458](https://github.com/WordPress/gutenberg/pull/64458))

#### Interactivity API
- Fix context inheritance from namespaces different than the current one. ([64677](https://github.com/WordPress/gutenberg/pull/64677))
- Fix computeds without scope in Firefox. ([64825](https://github.com/WordPress/gutenberg/pull/64825))

#### Document Settings
- Post Featured Image: Disable the media modal while uploading an image. ([64566](https://github.com/WordPress/gutenberg/pull/64566))
Expand Down
2 changes: 1 addition & 1 deletion docs/explanations/user-interface/design-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Figma

The [WordPress Design team](https://make.wordpress.org/design/) uses [Figma](https://www.figma.com/) to collaborate and share work. If you'd like to contribute, join the [#design channel](https://app.slack.com/client/T024MFP4J/C02S78ZAL) in [Slack](https://make.wordpress.org/chat/) and ask the team to set you up with a free Figma account. This will give you access to a helpful library of components used in WordPress. They are stable, fully supported, up to date, and ready for use in designs and prototypes.
The [WordPress Design team](https://make.wordpress.org/design/) uses [Figma](https://www.figma.com/) to collaborate and share work. If you'd like to contribute, you can use [the WordPress Figma design library](https://make.wordpress.org/design/handbook/get-involved/tools-figma/) to make mockups. You can also join the [#design channel](https://app.slack.com/client/T024MFP4J/C02S78ZAL) in [Slack](https://make.wordpress.org/chat/) and if you'd like to ask for advice or otherwise. Figma accounts are free, and with one you can use components from the shared libraries, or duplicate files to your draft if you need to make edits. Full edit access to the WordPress libraries is paid and reserved for the design team.

### How to contribute

Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/fundamentals/block-in-the-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default function Edit( { attributes, setAttributes } ) {
<legend className="blocks-base-control__label">
{ __( 'Background color', 'block-development-examples' ) }
</legend>
<ColorPalette // Element Tag for Gutenberg standard colour selector
<ColorPalette // Element Tag for Gutenberg standard color selector
onChange={ onChangeBGColor } // onChange event callback
/>
</fieldset>
Expand Down
2 changes: 1 addition & 1 deletion docs/reference-guides/block-api/block-attributes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Attributes

Block attributes provide information about the data stored by a block. For example, rich content, a list of image URLs, a background colour, or a button title.
Block attributes provide information about the data stored by a block. For example, rich content, a list of image URLs, a background color, or a button title.

A block can contain any number of attributes, and these are specified by the `attributes` field - an object where each key is the name of the attribute, and the value is the attribute definition.

Expand Down
2 changes: 1 addition & 1 deletion docs/reference-guides/data/data-core-block-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ _Parameters_

_Returns_

- `boolean | undefined`: Whether the given block is allowed to be moved.
- `boolean`: Whether the given block is allowed to be moved.

### canMoveBlocks

Expand Down
2 changes: 1 addition & 1 deletion docs/reference-guides/data/data-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ _Parameters_

- _kind_ `string`: Kind of the deleted entity.
- _name_ `string`: Name of the deleted entity.
- _recordId_ `string`: Record ID of the deleted entity.
- _recordId_ `number|string`: Record ID of the deleted entity.
- _query_ `?Object`: Special query parameters for the DELETE API call.
- _options_ `[Object]`: Delete options.
- _options.\_\_unstableFetch_ `[Function]`: Internal use only. Function to call instead of `apiFetch()`. Must return a promise.
Expand Down
2 changes: 1 addition & 1 deletion docs/reference-guides/interactivity-api/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ The `unique-id` doesn't need to be unique globally. It just needs to be differen

```html
<div data-wp-init="callbacks.logTimeInit">
<p>Hi!</>
<p>Hi!</p>
</div>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ The following are the necessary steps to ensure that the directives are correctl
</ul>
```

That's it! Once you've set up your interctive block with `supports.interactivity`, initialized your global state or local context, and added the directives to the HTML markup, the Interactivity API will take care of the rest. There's no additional code required from the developer to process these directives on the server side.
That's it! Once you've set up your interactive block with `supports.interactivity`, initialized your global state or local context, and added the directives to the HTML markup, the Interactivity API will take care of the rest. There's no additional code required from the developer to process these directives on the server side.

Behind the scenes, WordPress uses the `wp_interactivity_process_directives` function to find and process the directives in the HTML markup of your block. This function uses the HTML API to make the necessary changes to the markup, based on the found directives and the initial global state and/or local context.

Expand Down
Loading

0 comments on commit 30773e4

Please sign in to comment.