Skip to content

Commit

Permalink
Merge branch 'trunk' into fix/border-box-control-clear-button
Browse files Browse the repository at this point in the history
  • Loading branch information
shimotmk authored Feb 13, 2025
2 parents da27fb7 + 4c6306b commit 0c892d1
Show file tree
Hide file tree
Showing 282 changed files with 1,251 additions and 577 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
1 change: 1 addition & 0 deletions backport-changelog/6.8/8123.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ 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
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
184 changes: 184 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,189 @@
== Changelog ==

= 20.3.0-rc.1 =


## 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))


### 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
Expand Down
2 changes: 1 addition & 1 deletion 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
2 changes: 1 addition & 1 deletion gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: Printing since 1440. This is the development plugin for the block editor, site editor, and other future WordPress core functionality.
* Requires at least: 6.6
* Requires PHP: 7.2
* Version: 20.2.0
* Version: 20.3.0-rc.1
* Author: Gutenberg Team
* Text Domain: gutenberg
*
Expand Down
19 changes: 17 additions & 2 deletions lib/compat/wordpress-6.8/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,15 +222,30 @@ function gutenberg_update_ignored_hooked_blocks_postmeta( $post ) {
* Update Query `parents` argument validation for hierarchical post types.
* A zero is a valid parent ID for hierarchical post types. Used to display top-level items.
*
* Add new handler for `sticky` query argument.
*
* @param array $query The query vars.
* @param WP_Block $block Block instance.
* @return array The filtered query vars.
*/
function gutenberg_parents_query_vars_from_query_block( $query, $block ) {
function gutenberg_update_query_vars_from_query_block_6_8( $query, $block ) {
if ( ! empty( $block->context['query']['parents'] ) && is_post_type_hierarchical( $query['post_type'] ) ) {
$query['post_parent__in'] = array_unique( array_map( 'intval', $block->context['query']['parents'] ) );
}

if ( isset( $block->context['query']['sticky'] ) && ! empty( $block->context['query']['sticky'] ) ) {
if ( 'ignore' === $block->context['query']['sticky'] ) {
$sticky = get_option( 'sticky_posts' );

/**
* The core will set `post__not_in` because it asserts that any sticky value other than `only` is `exclude`.
* Let's override that while supporting any `post__not_in` values outside sticky post logic.
*/
$query['post__not_in'] = array_diff( $query['post__not_in'], ! empty( $sticky ) ? $sticky : array() );
$query['ignore_sticky_posts'] = 1;
}
}

return $query;
}
add_filter( 'query_loop_block_query_vars', 'gutenberg_parents_query_vars_from_query_block', 10, 2 );
add_filter( 'query_loop_block_query_vars', 'gutenberg_update_query_vars_from_query_block_6_8', 10, 2 );
23 changes: 8 additions & 15 deletions lib/compat/wordpress-6.8/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,16 @@
* Set the default editor mode for the page post type to `template-locked`.
*
* Note: This backports into `create_initial_post_types` in WordPress Core.
*
* @param array $args Array of post type arguments.
* @return array Updated array of post type arguments.
*/
function gutenberg_update_page_editor_support( $args ) {
if ( empty( $args['supports'] ) ) {
return $args;
function gutenberg_update_page_editor_support() {
// Avoid enabling the editor for pages when it's not supported.
// This is plugin specific safeguard.
if ( ! post_type_supports( 'page', 'editor' ) ) {
return;
}

$editor_support_key = array_search( 'editor', $args['supports'], true );
if ( false !== $editor_support_key ) {
unset( $args['supports'][ $editor_support_key ] );
$args['supports']['editor'] = array(
'default-mode' => 'template-locked',
);
if ( wp_is_block_theme() ) {
add_post_type_support( 'page', 'editor', array( 'default-mode' => 'template-locked' ) );
}

return $args;
}
add_action( 'register_page_post_type_args', 'gutenberg_update_page_editor_support' );
add_action( 'init', 'gutenberg_update_page_editor_support' );
4 changes: 2 additions & 2 deletions lib/compat/wordpress-6.8/rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function gutenberg_add_default_template_types_to_index( WP_REST_Response $respon
* @param WP_Post_Type $post_type Post type object.
* @return array
*/
function gutenberg_modify_post_collection_paramt( $query_params, WP_Post_Type $post_type ) {
function gutenberg_modify_post_collection_param( $query_params, WP_Post_Type $post_type ) {
if ( 'post' === $post_type->name && ! isset( $query_params['ignore_sticky'] ) ) {
$query_params['ignore_sticky'] = array(
'description' => __( 'Whether to ignore sticky posts or not.' ),
Expand All @@ -91,7 +91,7 @@ function gutenberg_modify_post_collection_paramt( $query_params, WP_Post_Type $p

return $query_params;
}
add_filter( 'rest_post_collection_params', 'gutenberg_modify_post_collection_paramt', 10, 2 );
add_filter( 'rest_post_collection_params', 'gutenberg_modify_post_collection_param', 10, 2 );

/**
* Modify posts query based on `ignore_sticky` parameter.
Expand Down
2 changes: 2 additions & 0 deletions lib/experimental/navigation-theme-opt-in.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
*
* @see https://core.trac.wordpress.org/ticket/50544
*
* @global WP_Customize_Manager $wp_customize
*
* @param int $menu_id ID of the updated menu.
* @param int $menu_item_db_id ID of the new menu item.
* @param array $args An array of arguments used to update/add the menu item.
Expand Down
Loading

0 comments on commit 0c892d1

Please sign in to comment.