Skip to content

Commit

Permalink
Merge branch 'trunk' into fix/64051-accessibility-links-listing-blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
im3dabasia committed Feb 24, 2025
2 parents e27d92c + b06588e commit 0b07615
Show file tree
Hide file tree
Showing 448 changed files with 3,543 additions and 1,976 deletions.
8 changes: 7 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,15 @@ const restrictedSyntax = [
},
{
selector:
'CallExpression[callee.name=/^(__|_x|_n|_nx)$/] > Literal[value=/^toggle\\b/i]',
'CallExpression[callee.name=/^(__|_x|_n|_nx)$/] > Literal[value=/toggle\\b/i]',
message: "Avoid using the verb 'Toggle' in translatable strings",
},
{
selector:
'CallExpression[callee.name=/^(__|_x|_n|_nx)$/] > Literal[value=/(?<![-\\w])sidebar(?![-\\w])/i]',
message:
"Avoid using the word 'sidebar' in translatable strings. Consider using 'panel' instead.",
},
];

/** `no-restricted-syntax` rules for components. */
Expand Down
18 changes: 8 additions & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,21 @@ version: 2
updates:
# Check for updates to GitHub Actions.
- package-ecosystem: 'github-actions'
directory: '/'
directories:
- '.github/workflows'
- '.github/setup-node'
schedule:
interval: 'daily'
open-pull-requests-limit: 10
labels:
- 'GitHub Actions'
- '[Type] Build Tooling'
ignore:
- dependency-name: 'actions/setup-java'
- dependency-name: 'gradle/*'
- dependency-name: 'reactivecircus/*'
- dependency-name: 'ruby/setup-ruby'
groups:
github-actions:
patterns:
- '*'
exclude-patterns:
- 'actions/setup-java'
- 'gradle/*'
- 'reactivecircus/*'
react-native:
patterns:
- 'actions/setup-java'
- 'gradle/*'
- 'reactivecircus/*'
6 changes: 3 additions & 3 deletions .github/setup-node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ runs:
using: 'composite'
steps:
- name: Use desired version of Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version-file: '.nvmrc'
node-version: ${{ inputs.node-version }}
Expand All @@ -25,7 +25,7 @@ runs:

- name: Cache node_modules
id: cache-node_modules
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: '**/node_modules'
key: node_modules-${{ runner.os }}-${{ runner.arch }}-${{ steps.node-version.outputs.NODE_VERSION }}-${{ hashFiles('package-lock.json') }}
Expand All @@ -36,7 +36,7 @@ runs:
npm ci
shell: bash
- name: Upload npm logs as an artifact on failure
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
if: failure()
with:
name: npm-logs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bundle-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
check-latest: true
cache: npm

- uses: preactjs/compressed-size-action@6fa0e7ca017120c754863b31123c5ee2860fd434 # v2.7.0
- uses: preactjs/compressed-size-action@946a292cd35bd1088e0d7eb92b69d1a8d5b5d76a # v2.8.0
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
pattern: '{build/**/*.min.js,build/**/*.css,build-module/**/*.min.js}'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/upload-release-to-plugin-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ jobs:
steps:
- name: Install Subversion
run: |
apt-get update -y && apt-get install -y subversion
sudo apt-get update -y && sudo apt-get install -y subversion
- name: Check out Gutenberg trunk from WP.org plugin repo
run: |
Expand Down Expand Up @@ -228,7 +228,7 @@ jobs:
steps:
- name: Install Subversion
run: |
apt-get update -y && apt-get install -y subversion
sudo apt-get update -y && sudo apt-get install -y subversion
- name: Download and unzip Gutenberg plugin asset into tags folder
env:
Expand Down
2 changes: 2 additions & 0 deletions backport-changelog/6.8/8123.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ https://github.com/WordPress/wordpress-develop/pull/8123

* https://github.com/WordPress/gutenberg/pull/68549
* https://github.com/WordPress/gutenberg/pull/68745
* https://github.com/WordPress/gutenberg/pull/69160
* https://github.com/WordPress/gutenberg/pull/69209
2 changes: 2 additions & 0 deletions backport-changelog/6.8/8212.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
https://github.com/WordPress/wordpress-develop/pull/8212

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

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

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

* https://github.com/WordPress/gutenberg/pull/69106
File renamed without changes.
201 changes: 201 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,206 @@
== Changelog ==

= 20.0.2 =

### Bug Fixes

#### Block Editor
- Fix 'isBlockVisibleInTheInserter' selector helper performance ([68898](https://github.com/WordPress/gutenberg/pull/68898))


= 20.3.0 =

## Changelog

### Enhancements

- Disable hover animation on preview frame for classic themes. ([68976](https://github.com/WordPress/gutenberg/pull/68976))

#### Block Library
- Added discord in social links. ([68848](https://github.com/WordPress/gutenberg/pull/68848))
- Featured Image block: Use resolution tool component. ([68471](https://github.com/WordPress/gutenberg/pull/68471))
- Query block: Add option to ignore sticky posts behavior. ([69057](https://github.com/WordPress/gutenberg/pull/69057))
- RSS: Border & Spacing support. ([66411](https://github.com/WordPress/gutenberg/pull/66411))

#### Global Styles
- Disable Clear button if there's no shadow. ([69092](https://github.com/WordPress/gutenberg/pull/69092))
- Duotone Settings: Add `reset` button and improve toggle rendering in FiltersPanel. ([68672](https://github.com/WordPress/gutenberg/pull/68672))
- Shadow Panel: Add reset button. ([68981](https://github.com/WordPress/gutenberg/pull/68981))

#### Post Editor
- Editor: Add loading state to the 'PageAttributesParent' component. ([69062](https://github.com/WordPress/gutenberg/pull/69062))
- Editor: Add loading state to the 'PostAuthorCombobox' component. ([68991](https://github.com/WordPress/gutenberg/pull/68991))
- Editor: Display error message when loading current post fails. ([68999](https://github.com/WordPress/gutenberg/pull/68999))

#### Block Editor
- Quick Inserter: Restore pattern search and insertion. ([69028](https://github.com/WordPress/gutenberg/pull/69028))
- Update keyboard shortcuts to use `primaryShift+backspace` for block deletion. ([69074](https://github.com/WordPress/gutenberg/pull/69074))

#### Design Tools
- Archives: Add Color Support. ([68685](https://github.com/WordPress/gutenberg/pull/68685))
- Categories: Add Color Support. ([68686](https://github.com/WordPress/gutenberg/pull/68686))

#### Components
- ComboboxControl: Add an `isLoading` prop to show a loading spinner. ([68990](https://github.com/WordPress/gutenberg/pull/68990))


### Bug Fixes

- Exclude Iterator helpers from polyfills. ([69070](https://github.com/WordPress/gutenberg/pull/69070))
- Fix Dependabot ignore statements. ([69144](https://github.com/WordPress/gutenberg/pull/69144))

#### Block Editor
- Block popover: Fix scrolling over. ([68075](https://github.com/WordPress/gutenberg/pull/68075))
- Display root appender when default block is disabled. ([68951](https://github.com/WordPress/gutenberg/pull/68951))
- Fix regression for root appender logic. ([68994](https://github.com/WordPress/gutenberg/pull/68994))
- Inserter: Remove block default icon from no results message. ([68693](https://github.com/WordPress/gutenberg/pull/68693))
- Rename `aspect` property to `ratio` to carry the `defaultAspect` in `AspectRatioDropdown`. ([69085](https://github.com/WordPress/gutenberg/pull/69085))
- Writing Flow: Restore early return for no block selection in tab nav hook. ([69079](https://github.com/WordPress/gutenberg/pull/69079))

#### Site Editor
- Edit Site: Fix Fields package private APIs error. ([68964](https://github.com/WordPress/gutenberg/pull/68964))
- Fix: Site Editor should display a 404 message. ([69009](https://github.com/WordPress/gutenberg/pull/69009))
- Use the same editor component for all routes. ([69093](https://github.com/WordPress/gutenberg/pull/69093))

#### Global Styles
- Fix: Additional CSS button not working after back navigation. ([68954](https://github.com/WordPress/gutenberg/pull/68954))
- Fix: Missing 'No blocks found.' message for block search in editor. ([69036](https://github.com/WordPress/gutenberg/pull/69036))

#### Block Library
- Query Block: Fix 'parents' argument validation. ([68983](https://github.com/WordPress/gutenberg/pull/68983))
- Social Links: Fix appender size in non-iframe editor. ([68215](https://github.com/WordPress/gutenberg/pull/68215))

#### REST API
- Add support for the 'ignore_sticky_posts' argument. ([68970](https://github.com/WordPress/gutenberg/pull/68970))
- Fix: Prevent Errors in Header Processing and Encode URLs Properly. ([67780](https://github.com/WordPress/gutenberg/pull/67780))

#### Icons
- Fix the background, arrowUpLeft, keyboardReturn and square icons. ([69076](https://github.com/WordPress/gutenberg/pull/69076))

#### Font Library
- Refactor font variant components to use useId for checkbox IDs. ([69050](https://github.com/WordPress/gutenberg/pull/69050))

#### Block Directory
- Remove block icon from InstalledBlocksPrePublishPanel. ([69046](https://github.com/WordPress/gutenberg/pull/69046))

#### DataViews
- Fixed: Empty Pattern Overlap in Pattern Title in Dataviews Table Layout. ([68997](https://github.com/WordPress/gutenberg/pull/68997))

#### Media
- Add optional chain to sizes indexing of media details in edit-site. ([68995](https://github.com/WordPress/gutenberg/pull/68995))

#### CSS & Styling
- Enabled Full height in Additional CSS. ([68993](https://github.com/WordPress/gutenberg/pull/68993))

#### Block hooks
- Fix truncation of post content. ([68926](https://github.com/WordPress/gutenberg/pull/68926))

#### Interactivity API
- iAPI Router: Fix CSS rule order in some constructed style sheets. ([68923](https://github.com/WordPress/gutenberg/pull/68923))
- iAPI Router: Revert "Handle styles assets on region-based navigation" ([69222](https://github.com/WordPress/gutenberg/pull/69222))


### Accessibility

#### Components
- Font Size Picker: Remove Custom option from FontSizePickerSelect dropdown. ([69038](https://github.com/WordPress/gutenberg/pull/69038))

#### Global Styles
- Add missing list role to the list of blocks in the global Styles. ([69027](https://github.com/WordPress/gutenberg/pull/69027))

#### Block API
- Block support: Preserve aria-label value in comment delimiter. ([69002](https://github.com/WordPress/gutenberg/pull/69002))

#### Block Editor
- [Block Editor]: A11y - Add and Update missing reduce-motion mixing. ([68417](https://github.com/WordPress/gutenberg/pull/68417))


### Performance

#### Post Editor
- Editor: Don't use selector shortcuts for the taxonomy queries. ([68998](https://github.com/WordPress/gutenberg/pull/68998))
- Editor: Optimize 'PostAuthorCheck' component data selection. ([69105](https://github.com/WordPress/gutenberg/pull/69105))

#### Style Book
- Improve StyleBook resize responsiveness for Classic Theme. ([68980](https://github.com/WordPress/gutenberg/pull/68980))


### Documentation

- Added Missing Global Documentation. ([69104](https://github.com/WordPress/gutenberg/pull/69104))
- Changed Inline Document Order. ([68992](https://github.com/WordPress/gutenberg/pull/68992))
- wp-env: Add lifecycleScripts to the schema. ([68724](https://github.com/WordPress/gutenberg/pull/68724))


### Code Quality

- Core Data: Add type for term entity. ([69151](https://github.com/WordPress/gutenberg/pull/69151))
- iAPI Router: Add missing changelog entry for #68923. ([68945](https://github.com/WordPress/gutenberg/pull/68945))

#### Block Library
- E2E: Add regression test for spacer block in themes without spacing units. ([68913](https://github.com/WordPress/gutenberg/pull/68913))
- Navigation Link Block: Use stable variable for underline color styling. ([68953](https://github.com/WordPress/gutenberg/pull/68953))
- Regenerate block fixtures. ([68982](https://github.com/WordPress/gutenberg/pull/68982))
- Social Links: Remove redundant reduce-motion mixin. ([69000](https://github.com/WordPress/gutenberg/pull/69000))

#### Site Editor
- Fast follow: Redirections of deprecated site editor URLs. ([68971](https://github.com/WordPress/gutenberg/pull/68971))
- Quality: Remove unused props and styles from SidebarNavigationScreen. ([68972](https://github.com/WordPress/gutenberg/pull/68972))

#### Block Editor
- Inserter: Remove unused no-results-icon styles. ([69018](https://github.com/WordPress/gutenberg/pull/69018))


### Tools

- PR Template: Suggest linking the issue. ([68924](https://github.com/WordPress/gutenberg/pull/68924))
- Relocate changelog file for WP#6910 to 6.9 backports. ([69068](https://github.com/WordPress/gutenberg/pull/69068))

#### Build Tooling
- Fix installing svn during deploys. ([69047](https://github.com/WordPress/gutenberg/pull/69047))
- Remove `react-native` dependabot group. ([69118](https://github.com/WordPress/gutenberg/pull/69118))

#### Testing
- e2e: Fix "add new" selector. ([69111](https://github.com/WordPress/gutenberg/pull/69111))


### Various

- Remove react-native dependabot group - Take 2. ([69122](https://github.com/WordPress/gutenberg/pull/69122))

#### Plugin
- Code Quality: Delete unused function from PHP Sync Issue generation script. ([68947](https://github.com/WordPress/gutenberg/pull/68947))
- npm scripts: Use `node -p` instead of `echo`. ([68946](https://github.com/WordPress/gutenberg/pull/68946))


## First-time contributors

The following PRs were merged by first-time contributors:

- @benazeer-ben: RSS: Border & Spacing support. ([66411](https://github.com/WordPress/gutenberg/pull/66411))
- @grgar: Add optional chain to sizes indexing of media details in edit-site. ([68995](https://github.com/WordPress/gutenberg/pull/68995))
- @Gulamdastgir-Momin: Added discord in social links. ([68848](https://github.com/WordPress/gutenberg/pull/68848))
- @Juzar10: Fix: Prevent Errors in Header Processing and Encode URLs Properly. ([67780](https://github.com/WordPress/gutenberg/pull/67780))
- @singhakanshu00: Disable hover animation on preview frame for classic themes. ([68976](https://github.com/WordPress/gutenberg/pull/68976))
- @srtfisher: wp-env: Add lifecycleScripts to the schema. ([68724](https://github.com/WordPress/gutenberg/pull/68724))


## Contributors

The following contributors merged PRs in this release:

@adamsilverstein @afercia @akasunil @benazeer-ben @carolinan @DAreRodz @desrosj @ellatrix @grgar @Gulamdastgir-Momin @himanshupathak95 @Infinite-Null @joemcgill @Juzar10 @Mamaduka @Mayank-Tripathi32 @ockham @peterwilsoncc @Rishit30G @SainathPoojary @shail-mehta @shimotmk @singhakanshu00 @srtfisher @swissspidy @t-hamano @torounit @yogeshbhutkar


= 20.0.1 =

## Changelog

### Bug Fixes

- iAPI Router: add missing changelog entry for [#68923](https://github.com/WordPress/gutenberg/pull/68945)


= 20.2.0 =

## Changelog
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The WordPress project, and Gutenberg in particular, iterates quickly. Staying up

## Additional resources

For more resources on block development and extending the Block Editor, review the additional sections here in the Block Editor Handbook. Further practical examples are also available in the [block-development-examples](https://github.com/wptrainingteam/block-development-examples) GitHub repository.
For more resources on block development and extending the Block Editor, review the additional sections here in the Block Editor Handbook. Further practical examples are also available in the [block-development-examples](https://github.com/WordPress/block-development-examples) GitHub repository.

If you are looking for more educational content, check out [Learn WordPress](https://learn.wordpress.org/), where you can find [tutorials](https://learn.wordpress.org/tutorials/), [courses](https://learn.wordpress.org/courses/), and [online workshops](https://learn.wordpress.org/online-workshops/). Here is a selection of current offerings:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ wp.blocks.registerBlockVariation(

For scripts that need to run in the Block Editor, make sure you use the [`enqueue_block_editor_assets`](https://developer.wordpress.org/reference/hooks/enqueue_block_editor_assets/) hook coupled with the standard [`wp_enqueue_script`](https://developer.wordpress.org/reference/functions/wp_enqueue_script/) function.

Refer to [Enqueueing assets in the Editor](/docs/how-to-guides/enqueueing-assets-in-the-editor.md) for more information. You can also visit the [block-development-example](https://github.com/wptrainingteam/block-theme-examples/blob/master/example-block-variation/functions.php) GitHub repository for more practical examples.
Refer to [Enqueueing assets in the Editor](/docs/how-to-guides/enqueueing-assets-in-the-editor.md) for more information.

<div class="callout callout-tip">
Open your browser's dev tools and try running <code>wp.data.select('core/editor').getBlocks()</code> in the console when editing a post or when using the Site Editor. This command will return all available blocks.
Expand Down
2 changes: 1 addition & 1 deletion docs/how-to-guides/plugin-sidebar-0.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Add the following code to a JavaScript file called `plugin-sidebar.js` and save
} )( window.wp, window.React );
```

For this code to work, those utilities need to be available in the browser, so you must specify `wp-plugins`, `wp-edit-post`, and `react` as dependencies of your script.
For this code to work, those utilities need to be available in the browser, so you must specify `wp-plugins`, `wp-editor`, and `react` as dependencies of your script.

Here is the PHP code to register your script and specify the dependencies:

Expand Down
4 changes: 2 additions & 2 deletions docs/how-to-guides/themes/global-settings-and-styles.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ body {

## Specification

This specification is the same for the three different origins that use this format: core, themes, and users. Themes can override core's defaults by creating a file called `theme.json`. Users, via the site editor, will also be able to override theme's or core's preferences via an user interface that is being worked on.
This specification is the same for the three different origins that use this format: core, themes, and users. Themes can override core's defaults by creating a file called `theme.json`. Users, via the site editor, will also be able to override theme's or core's preferences via a user interface that is being worked on.

```json
{
Expand Down Expand Up @@ -1034,7 +1034,7 @@ h3 {
{% end %}
##### Element pseudo selectors

Pseudo selectors `:hover`, `:focus`, `:visited`, `:active`, `:link`, `:any-link` are supported by Gutenberg.
Pseudo selectors `:hover`, `:focus`, `:focus-visible`, `:visited`, `:active`, `:link`, `:any-link` are supported by Gutenberg.

```json
"elements": {
Expand Down
4 changes: 0 additions & 4 deletions docs/reference-guides/block-api/block-registration.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,6 @@ The key is the name of the block (`string`) to hook into, and the value is the p
}
```

It’s crucial to emphasize that the Block Hooks feature is only designed to work with _static_ block-based templates, template parts, and patterns. For patterns, this includes those provided by the theme, from [Block Pattern Directory](https://wordpress.org/patterns/), or from calls to [`register_block_pattern`](https://developer.wordpress.org/reference/functions/register_block_pattern/).

Block Hooks will not work with post content or patterns crafted by the user, such as synced patterns, or theme templates and template parts that have been modified by the user.

## Block collections

## `registerBlockCollection`
Expand Down
Loading

0 comments on commit 0b07615

Please sign in to comment.