Skip to content

Commit

Permalink
Merge branch 'trunk' into update/pattern-import-menuitem
Browse files Browse the repository at this point in the history
  • Loading branch information
jameskoster committed Sep 25, 2023
2 parents 0ccf957 + bfd3bb7 commit a9f4be4
Show file tree
Hide file tree
Showing 22 changed files with 226 additions and 64 deletions.
6 changes: 6 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ f63053cace3c02e284f00918e1854284c85b9132

# Prettier upgrade to 2.6.2.
33d84b036592a5bf31af05b7710f3b2b14163dc4

# Prettier upgrade to 2.8.5.
c56e8a1910ed74f405b74bbb12fe81dea974e5c3

# Prettier upgrade to 3.0.3.
0bee15148fe4330c20cf372cb46a33693e45cb5f
122 changes: 122 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,127 @@
== Changelog ==

= 16.7.0-rc.2 =

## Changelog

### Features

#### Typography
- Font Library: Font Collections frontend. ([54566](https://github.com/WordPress/gutenberg/pull/54566))


### Enhancements

#### Interactivity API
- Query block: Start prefetching on first click to next/previous. ([54781](https://github.com/WordPress/gutenberg/pull/54781))

#### Collaborative Editing
- Try bundling sync package. ([54738](https://github.com/WordPress/gutenberg/pull/54738))

#### Patterns
- Memoize `useSelect` for `usePatterns`. ([54588](https://github.com/WordPress/gutenberg/pull/54588))

#### Design Tools
- Improve background image control. ([54439](https://github.com/WordPress/gutenberg/pull/54439))

#### List View
- Try directing focus to the list view toggle button when closing the list view. ([54175](https://github.com/WordPress/gutenberg/pull/54175))

#### Typography
- Font Library: Load collection JSON data from a URL in the collection configuration. ([54067](https://github.com/WordPress/gutenberg/pull/54067))


### Bug Fixes

- Block Editor: Fix 'isBlockSubtreeDisabled' private selector. ([54618](https://github.com/WordPress/gutenberg/pull/54618))
- Make sure sync code only runs when experiment is enabled. ([54710](https://github.com/WordPress/gutenberg/pull/54710))

#### Patterns
- Add My patterns back to post editor inserter categories. ([54767](https://github.com/WordPress/gutenberg/pull/54767))
- De-emphasise pattern filters in inserter. ([54681](https://github.com/WordPress/gutenberg/pull/54681))
- Fix All Patterns category default display. ([54721](https://github.com/WordPress/gutenberg/pull/54721))
- Fix bug with new categories not showing. ([54768](https://github.com/WordPress/gutenberg/pull/54768))
- Fix bug with pattern categories not saving sometimes. ([54676](https://github.com/WordPress/gutenberg/pull/54676))
- Fix category type for back link. ([54753](https://github.com/WordPress/gutenberg/pull/54753))
- Fix duplication of uncategorized patterns. ([54755](https://github.com/WordPress/gutenberg/pull/54755))
- Inject the theme name into the block attributes. ([54595](https://github.com/WordPress/gutenberg/pull/54595))
- Reinstate my patterns category in site editor. ([54726](https://github.com/WordPress/gutenberg/pull/54726))
- Require a title in the creation modal. ([54717](https://github.com/WordPress/gutenberg/pull/54717))
- Use slug as fallback for empty title. ([54731](https://github.com/WordPress/gutenberg/pull/54731))

#### Typography
- Font Face: Get name from "fontFamily" setting, not "name". ([54615](https://github.com/WordPress/gutenberg/pull/54615))
- Font Library: Fix modal width on mobile viewport. ([54518](https://github.com/WordPress/gutenberg/pull/54518))

#### Block Editor
- Reset page after changing pattern filters or search value. ([54774](https://github.com/WordPress/gutenberg/pull/54774))

#### Interactivity API
- Query Loop: Select first anchor inside Post Template with "enhanced pagination" enabled. ([54730](https://github.com/WordPress/gutenberg/pull/54730))

#### Plugin
- Update cherry-pick script to correctly verify GitHub CLI setup. ([54720](https://github.com/WordPress/gutenberg/pull/54720))

#### Block API
- Block Hooks: Avoid processing empty content for loaded templates. ([54719](https://github.com/WordPress/gutenberg/pull/54719))

#### Site Editor
- CreateTemplatePartModal: Disable the 'Create' button while saving. ([54716](https://github.com/WordPress/gutenberg/pull/54716))

#### Design Tools
- Background Image control: Use consistent button, ensure descriptive text accounts for no image selected. ([54711](https://github.com/WordPress/gutenberg/pull/54711))

#### Block Library
- Replace the `gutenberg_` prefix with `wp_` in image block. ([54678](https://github.com/WordPress/gutenberg/pull/54678))

#### Components
- DateTimePicker: Fix onChange callback check so that it also works inside iframes. ([54669](https://github.com/WordPress/gutenberg/pull/54669))

#### Fonts API
- Font Library: Fix space above theme fonts in font library modal. ([54598](https://github.com/WordPress/gutenberg/pull/54598))


### Accessibility

#### Components
- Allow Modal to place focus on first element within contents via new API. ([54590](https://github.com/WordPress/gutenberg/pull/54590))
- Improve the placeholder instructions accessibility. ([45801](https://github.com/WordPress/gutenberg/pull/45801))


### Documentation

- Add missing global declaration in DocBlock of interactivity files. ([54683](https://github.com/WordPress/gutenberg/pull/54683))


### Code Quality

#### Site Editor
- Prune store constants. ([54585](https://github.com/WordPress/gutenberg/pull/54585))
- Use constants rather than hard coded template strings. ([54586](https://github.com/WordPress/gutenberg/pull/54586))

#### Patterns
- Fix sidebar nav screen fallback category. ([54754](https://github.com/WordPress/gutenberg/pull/54754))

#### Typography
- Font Library: Refactor logic to disable font library in the frontend. ([54748](https://github.com/WordPress/gutenberg/pull/54748))

#### Plugin
- Ensure that Block Hooks work correctly after landing in WP core. ([54651](https://github.com/WordPress/gutenberg/pull/54651))
- Update uuid package to 9.0.1. ([54725](https://github.com/WordPress/gutenberg/pull/54725))

### Tools

#### Testing
- Font Library: Use resolvable domain in test. ([54763](https://github.com/WordPress/gutenberg/pull/54763))


## Contributors

The following contributors merged PRs in this release:

@aaronrobertshaw @afercia @andrewserong @ciampo @DAreRodz @getdave @glendaviesnz @gziolo @hellofromtonya @kevin940726 @luisherranz @madhusudhand @Mamaduka @matiasbenedetto @mikachan @ramonjd @richtabor @SaxonF @scruffian @t-hamano @tellthemachines


= 16.7.0-rc.1 =

## Changelog
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This guide takes you through creating a basic block to display a message in a po
There are two main types of blocks: static and dynamic, this guide focuses on static blocks. A static block is used to insert HTML content into the post and save it with the post. A dynamic block builds the content on the fly when rendered on the front end, see the [dynamic blocks guide](/docs/how-to-guides/block-tutorial/creating-dynamic-blocks.md).

<div class="callout callout-alert">
This guide focuses on just the block, see the [Create a Block tutorial](/docs/getting-started/create-block/README.md) for a complete setup.
This guide focuses on just the block, see the <a href="https://developer.wordpress.org/block-editor/getting-started/create-block/">Create a Block tutorial</a> for a complete setup.
</div>

## Before you start
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.2
* Requires PHP: 7.0
* Version: 16.7.0-rc.1
* Version: 16.7.0-rc.2
* Author: Gutenberg Team
* Text Domain: gutenberg
*
Expand Down
26 changes: 13 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gutenberg",
"version": "16.7.0-rc.1",
"version": "16.7.0-rc.2",
"private": true,
"description": "A new WordPress editor experience.",
"author": "The WordPress Contributors",
Expand Down Expand Up @@ -226,7 +226,7 @@
"patch-package": "6.2.2",
"postcss": "8.4.16",
"postcss-loader": "6.2.1",
"prettier": "npm:wp-prettier@3.0.3-beta-3",
"prettier": "npm:wp-prettier@3.0.3",
"progress": "2.0.3",
"react": "18.2.0",
"react-dom": "18.2.0",
Expand Down
1 change: 1 addition & 0 deletions packages/block-library/src/query-pagination-next/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ function render_block_core_query_pagination_next( $attributes, $content, $block
$p->set_attribute( 'data-wp-key', 'query-pagination-next' );
$p->set_attribute( 'data-wp-on--click', 'actions.core.query.navigate' );
$p->set_attribute( 'data-wp-on--mouseenter', 'actions.core.query.prefetch' );
$p->set_attribute( 'data-wp-effect', 'effects.core.query.prefetch' );
$content = $p->get_updated_html();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ function render_block_core_query_pagination_previous( $attributes, $content, $bl
$p->set_attribute( 'data-wp-key', 'query-pagination-previous' );
$p->set_attribute( 'data-wp-on--click', 'actions.core.query.navigate' );
$p->set_attribute( 'data-wp-on--mouseenter', 'actions.core.query.prefetch' );
$p->set_attribute( 'data-wp-effect', 'effects.core.query.prefetch' );
$content = $p->get_updated_html();
}
}
Expand Down
12 changes: 12 additions & 0 deletions packages/block-library/src/query/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ store( {
: '' );

context.core.query.animation = 'finish';
context.core.query.url = ref.href;

// Focus the first anchor of the Query block.
const firstAnchor = `[data-wp-navigation-id=${ id }] .wp-block-post-template a[href]`;
Expand All @@ -76,4 +77,15 @@ store( {
},
},
},
effects: {
core: {
query: {
prefetch: async ( { ref, context } ) => {
if ( context.core.query.url && isValidLink( ref ) ) {
await prefetch( ref.href );
}
},
},
},
},
} );
14 changes: 8 additions & 6 deletions packages/core-data/src/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,12 +385,14 @@ export const editEntityRecord =
}, {} ),
};
if ( window.__experimentalEnableSync && entityConfig.syncConfig ) {
const objectId = entityConfig.getSyncObjectId( recordId );
getSyncProvider().update(
entityConfig.syncObjectType + '--edit',
objectId,
edit.edits
);
if ( process.env.IS_GUTENBERG_PLUGIN ) {
const objectId = entityConfig.getSyncObjectId( recordId );
getSyncProvider().update(
entityConfig.syncObjectType + '--edit',
objectId,
edit.edits
);
}
} else {
if ( ! options.undoIgnore ) {
select.getUndoManager().addRecord(
Expand Down
10 changes: 8 additions & 2 deletions packages/core-data/src/entities.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,11 @@ export const getOrLoadEntitiesConfig =
let configs = select.getEntitiesConfig( kind );
if ( configs && configs.length !== 0 ) {
if ( window.__experimentalEnableSync ) {
registerSyncConfigs( configs );
if ( process.env.IS_GUTENBERG_PLUGIN ) {
registerSyncConfigs( configs );
}
}

return configs;
}

Expand All @@ -415,8 +418,11 @@ export const getOrLoadEntitiesConfig =

configs = await loader.loadEntities();
if ( window.__experimentalEnableSync ) {
registerSyncConfigs( configs );
if ( process.env.IS_GUTENBERG_PLUGIN ) {
registerSyncConfigs( configs );
}
}

dispatch( addEntities( configs ) );

return configs;
Expand Down
Loading

0 comments on commit a9f4be4

Please sign in to comment.