Skip to content

Commit

Permalink
prep build 2/15
Browse files Browse the repository at this point in the history
  • Loading branch information
bph committed Feb 15, 2025
2 parents a8c3d6f + 388d664 commit 9fbab2d
Show file tree
Hide file tree
Showing 250 changed files with 1,076 additions and 504 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
8 changes: 3 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ 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
Expand All @@ -13,13 +15,9 @@ updates:
- '[Type] Build Tooling'
ignore:
- dependency-name: 'actions/setup-java'
versions: ['*']
- dependency-name: 'gradle/*'
versions: ['*']
- dependency-name: 'reactivecircus/*'
versions: ['*']
- dependency-name: 'ruby/setup-ruby'
versions: ['*']
groups:
github-actions:
patterns:
Expand Down
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
1 change: 1 addition & 0 deletions backport-changelog/6.8/8212.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
https://github.com/WordPress/wordpress-develop/pull/8212

* https://github.com/WordPress/gutenberg/pull/68926
* https://github.com/WordPress/gutenberg/pull/69142
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
87 changes: 46 additions & 41 deletions lib/compat/wordpress-6.8/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,56 +77,61 @@ function apply_block_hooks_to_content_from_post_object( $content, WP_Post $post
add_filter( 'the_content', 'apply_block_hooks_to_content_from_post_object', 8 );
// Remove apply_block_hooks_to_content filter (previously added in Core).
remove_filter( 'the_content', 'apply_block_hooks_to_content', 8 );
}

/**
* Hooks into the REST API response for the Posts endpoint and adds the first and last inner blocks.
*
* @since 6.6.0
* @since 6.8.0 Support non-`wp_navigation` post types.
*
* @param WP_REST_Response $response The response object.
* @param WP_Post $post Post object.
* @return WP_REST_Response The response object.
*/
function gutenberg_insert_hooked_blocks_into_rest_response( $response, $post ) {
if ( empty( $response->data['content']['raw'] ) ) {
return $response;
}
/**
* Hooks into the REST API response for the Posts endpoint and adds the first and last inner blocks.
*
* @since 6.6.0
* @since 6.8.0 Support non-`wp_navigation` post types.
*
* @param WP_REST_Response $response The response object.
* @param WP_Post $post Post object.
* @return WP_REST_Response The response object.
*/
function gutenberg_insert_hooked_blocks_into_rest_response( $response, $post ) {
if ( empty( $response->data['content']['raw'] ) ) {
return $response;
}

$response->data['content']['raw'] = apply_block_hooks_to_content_from_post_object(
$response->data['content']['raw'],
$post,
'insert_hooked_blocks_and_set_ignored_hooked_blocks_metadata'
);
$response->data['content']['raw'] = apply_block_hooks_to_content_from_post_object(
$response->data['content']['raw'],
$post,
'insert_hooked_blocks_and_set_ignored_hooked_blocks_metadata'
);

// If the rendered content was previously empty, we leave it like that.
if ( empty( $response->data['content']['rendered'] ) ) {
return $response;
}
// If the rendered content was previously empty, we leave it like that.
if ( empty( $response->data['content']['rendered'] ) ) {
return $response;
}

// No need to inject hooked blocks twice.
$priority = has_filter( 'the_content', 'apply_block_hooks_to_content_from_post_object' );
if ( false !== $priority ) {
remove_filter( 'the_content', 'apply_block_hooks_to_content_from_post_object', $priority );
}
// No need to inject hooked blocks twice.
$priority = has_filter( 'the_content', 'apply_block_hooks_to_content_from_post_object' );
if ( false !== $priority ) {
remove_filter( 'the_content', 'apply_block_hooks_to_content_from_post_object', $priority );
}

/** This filter is documented in wp-includes/post-template.php */
$response->data['content']['rendered'] = apply_filters(
'the_content',
$response->data['content']['raw']
);
/** This filter is documented in wp-includes/post-template.php */
$response->data['content']['rendered'] = apply_filters(
'the_content',
$response->data['content']['raw']
);

// Add back the filter.
if ( false !== $priority ) {
add_filter( 'the_content', 'apply_block_hooks_to_content_from_post_object', $priority );
}

// Add back the filter.
if ( false !== $priority ) {
add_filter( 'the_content', 'apply_block_hooks_to_content_from_post_object', $priority );
return $response;
}
remove_filter( 'rest_prepare_page', 'insert_hooked_blocks_into_rest_response' );
add_filter( 'rest_prepare_page', 'gutenberg_insert_hooked_blocks_into_rest_response', 10, 2 );

remove_filter( 'rest_prepare_post', 'insert_hooked_blocks_into_rest_response' );
add_filter( 'rest_prepare_post', 'gutenberg_insert_hooked_blocks_into_rest_response', 10, 2 );

return $response;
remove_filter( 'rest_prepare_wp_block', 'insert_hooked_blocks_into_rest_response' );
add_filter( 'rest_prepare_wp_block', 'gutenberg_insert_hooked_blocks_into_rest_response', 10, 2 );
}
add_filter( 'rest_prepare_page', 'gutenberg_insert_hooked_blocks_into_rest_response', 10, 2 );
add_filter( 'rest_prepare_post', 'gutenberg_insert_hooked_blocks_into_rest_response', 10, 2 );
add_filter( 'rest_prepare_wp_block', 'gutenberg_insert_hooked_blocks_into_rest_response', 10, 2 );

/**
* Updates the wp_postmeta with the list of ignored hooked blocks
Expand Down
Loading

0 comments on commit 9fbab2d

Please sign in to comment.