Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/trunk' into add/defer-script-loa…
Browse files Browse the repository at this point in the history
…ding-strategy

* origin/trunk: (59 commits)
  Promisify action creator return type for WP data dispatch (#52530)
  [RNMobile] Add WP hook for registering non-core blocks (#52791)
  removes check for active preview device type to enable the fixed toolbar preference (#52770)
  Enforce checks against redeclaration for functions and classes (#52696)
  update appearance tools, (#52785)
  Behaviors: Extend Global Styles API to read/write behaviors config. (#52370)
  HeaderToolbar - Update inserterMethod meta data (#52735)
  add options for debugging php unit tests (#52778)
  Docs: Interactivity API > Getting Started Guide - minor adjustments (#52786)
  Footnotes: Use static closures when not using '' (#52781)
  Improve slug generation & matching in request utils (#52414)
  Open "docs" folder for the Interactivity API package and Getting Started Guide (#52462)
  Global Styles: Don't use named arguments for 'sprintf' (#52782)
  E2E utils - Update locator to hide the keyboard on iOS to pick the first element, on iPad two buttons are available and the second one makes the floating keyboard to show up (#52771)
  Patterns: Reinstate template parts mode spec (#52780)
  chore(release): publish
  Update changelog files
  Patterns: Fix empty general template parts category (#52747)
  Add id to pattern inserted notice to stop multiple notices stacking (#52746)
  Site Editor: Fix site link accessibility issues (#52744)
  ...
  • Loading branch information
westonruter committed Jul 20, 2023
2 parents 73e3564 + 2f90b24 commit da2380a
Show file tree
Hide file tree
Showing 397 changed files with 8,450 additions and 2,931 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,14 @@
/packages/scripts @gziolo @ntwb @nerrad @ajitbohra @ryanwelcher
/packages/stylelint-config @ntwb
/test/e2e @kevin940726 @Mamaduka
/test/php/gutenberg-coding-standards @anton-vlasenko

# UI Components
/packages/components @ajitbohra
/packages/compose @ajitbohra
/packages/element @ajitbohra
/packages/notices @ajitbohra
/packages/nux @ajitbohra @peterwilsoncc
/packages/viewport @ajitbohra
/packages/base-styles
/packages/icons
Expand Down
294 changes: 294 additions & 0 deletions changelog.txt

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,18 @@
"wp-coding-standards/wpcs": "^2.2",
"sirbrillig/phpcs-variable-analysis": "^2.8",
"spatie/phpunit-watcher": "^1.23",
"yoast/phpunit-polyfills": "^1.0"
"yoast/phpunit-polyfills": "^1.0",
"gutenberg/gutenberg-coding-standards": "@dev"
},
"repositories": [
{
"type": "path",
"url": "./test/php/gutenberg-coding-standards",
"options": {
"symlink": false
}
}
],
"require": {
"composer/installers": "~1.0"
},
Expand Down
Binary file added docs/assets/text-transform-component.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/contributors/code/scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ The editor includes a number of packages to enable various pieces of functionali
| [Is Shallow Equal](/packages/is-shallow-equal/README.md) | wp-is-shallow-equal | A function for performing a shallow comparison between two objects or arrays |
| [Keycodes](/packages/keycodes/README.md) | wp-keycodes | Keycodes utilities for WordPress, used to check the key pressed in events like `onKeyDown` |
| [List Reusable blocks](/packages/list-reusable-blocks/README.md) | wp-list-reusable-blocks | Package used to add import/export links to the listing page of the reusable blocks |
| [NUX](/packages/nux/README.md) | wp-nux | Components, and wp.data methods useful for onboarding a new user to the WordPress admin interface |
| [Plugins](/packages/plugins/README.md) | wp-plugins | Plugins module for WordPress |
| [Redux Routine](/packages/redux-routine/README.md) | wp-redux-routine | Redux middleware for generator coroutines |
| [Rich Text](/packages/rich-text/README.md) | wp-rich-text | Helper functions to convert HTML or a DOM tree into a rich text value and back |
Expand Down
2 changes: 2 additions & 0 deletions docs/how-to-guides/themes/theme-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,8 @@ Use this setting to enable the following Global Styles settings:
- color: link
- spacing: blockGap, margin, padding
- typography: lineHeight
- dimensions: minHeight
- position: sticky

```php
add_theme_support( 'appearance-tools' );
Expand Down
12 changes: 12 additions & 0 deletions docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -1757,6 +1757,12 @@
"markdown_source": "../packages/npm-package-json-lint-config/README.md",
"parent": "packages"
},
{
"title": "@wordpress/nux",
"slug": "packages-nux",
"markdown_source": "../packages/nux/README.md",
"parent": "packages"
},
{
"title": "@wordpress/plugins",
"slug": "packages-plugins",
Expand Down Expand Up @@ -2003,6 +2009,12 @@
"markdown_source": "../docs/reference-guides/data/data-core-notices.md",
"parent": "data"
},
{
"title": "The NUX (New User Experience) Data",
"slug": "data-core-nux",
"markdown_source": "../docs/reference-guides/data/data-core-nux.md",
"parent": "data"
},
{
"title": "Preferences",
"slug": "data-core-preferences",
Expand Down
1 change: 1 addition & 0 deletions docs/reference-guides/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
- [**core/editor**: The Post Editor’s Data](/docs/reference-guides/data/data-core-editor.md)
- [**core/keyboard-shortcuts**: The Keyboard Shortcuts Data](/docs/reference-guides/data/data-core-keyboard-shortcuts.md)
- [**core/notices**: Notices Data](/docs/reference-guides/data/data-core-notices.md)
- [**core/nux**: The NUX (New User Experience) Data](/docs/reference-guides/data/data-core-nux.md)
- [**core/preferences**: Preferences](/docs/reference-guides/data/data-core-preferences.md)
- [**core/reusable-blocks**: Reusable blocks](/docs/reference-guides/data/data-core-reusable-blocks.md)
- [**core/rich-text**: Rich Text](/docs/reference-guides/data/data-core-rich-text.md)
Expand Down
1 change: 1 addition & 0 deletions docs/reference-guides/data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- [**core/editor**: The Post Editor’s Data](/docs/reference-guides/data/data-core-editor.md)
- [**core/keyboard-shortcuts**: The Keyboard Shortcuts Data](/docs/reference-guides/data/data-core-keyboard-shortcuts.md)
- [**core/notices**: Notices Data](/docs/reference-guides/data/data-core-notices.md)
- [**core/nux**: The NUX (New User Experience) Data](/docs/reference-guides/data/data-core-nux.md)
- [**core/preferences**: Preferences](/docs/reference-guides/data/data-core-preferences.md)
- [**core/reusable-blocks**: Reusable blocks](/docs/reference-guides/data/data-core-reusable-blocks.md)
- [**core/rich-text**: Rich Text](/docs/reference-guides/data/data-core-rich-text.md)
Expand Down
23 changes: 0 additions & 23 deletions docs/reference-guides/data/data-core-block-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,29 +168,6 @@ _Returns_

- `Array?`: The list of allowed block types.

### getBehaviors

Returns the behaviors registered with the editor.

Behaviors are named, reusable pieces of functionality that can be attached to blocks. They are registered with the editor using the `theme.json` file.

_Usage_

```js
const behaviors = select( blockEditorStore ).getBehaviors();
if ( behaviors?.lightbox ) {
// Do something with the lightbox.
}
```
_Parameters_
- _state_ `Object`: Editor state.
_Returns_
- `Object`: The editor behaviors object.
### getBlock

Returns a block given its client ID. This is a parsed copy of the block, containing its `blockName`, `clientId`, and current `attributes` state. This is not the block's registration settings, which must be retrieved from the blocks module registration store.
Expand Down
93 changes: 93 additions & 0 deletions docs/reference-guides/data/data-core-nux.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# The NUX (New User Experience) Data

Namespace: `core/nux`.

## Selectors

<!-- START TOKEN(Autogenerated selectors|../../../packages/nux/src/store/selectors.js) -->

### areTipsEnabled

Returns whether or not tips are globally enabled.

_Parameters_

- _state_ `Object`: Global application state.

_Returns_

- `boolean`: Whether tips are globally enabled.

### getAssociatedGuide

Returns an object describing the guide, if any, that the given tip is a part of.

_Parameters_

- _state_ `Object`: Global application state.
- _tipId_ `string`: The tip to query.

_Returns_

- `?NUXGuideInfo`: Information about the associated guide.

### isTipVisible

Determines whether or not the given tip is showing. Tips are hidden if they are disabled, have been dismissed, or are not the current tip in any guide that they have been added to.

_Parameters_

- _state_ `Object`: Global application state.
- _tipId_ `string`: The tip to query.

_Returns_

- `boolean`: Whether or not the given tip is showing.

<!-- END TOKEN(Autogenerated selectors|../../../packages/nux/src/store/selectors.js) -->

## Actions

<!-- START TOKEN(Autogenerated actions|../../../packages/nux/src/store/actions.js) -->

### disableTips

Returns an action object that, when dispatched, prevents all tips from showing again.

_Returns_

- `Object`: Action object.

### dismissTip

Returns an action object that, when dispatched, dismisses the given tip. A dismissed tip will not show again.

_Parameters_

- _id_ `string`: The tip to dismiss.

_Returns_

- `Object`: Action object.

### enableTips

Returns an action object that, when dispatched, makes all tips show again.

_Returns_

- `Object`: Action object.

### triggerGuide

Returns an action object that, when dispatched, presents a guide that takes the user through a series of tips step by step.

_Parameters_

- _tipIds_ `string[]`: Which tips to show in the guide.

_Returns_

- `Object`: Action object.

<!-- END TOKEN(Autogenerated actions|../../../packages/nux/src/store/actions.js) -->
1 change: 1 addition & 0 deletions docs/toc.json
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@
"docs/reference-guides/data/data-core-keyboard-shortcuts.md": []
},
{ "docs/reference-guides/data/data-core-notices.md": [] },
{ "docs/reference-guides/data/data-core-nux.md": [] },
{
"docs/reference-guides/data/data-core-preferences.md": []
},
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.1
* Requires PHP: 5.6
* Version: 16.2.1
* Version: 16.3.0-rc.1
* Author: Gutenberg Team
* Text Domain: gutenberg
*
Expand Down
4 changes: 4 additions & 0 deletions lib/class-wp-duotone-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
* @since 6.3.0
*/

if ( class_exists( 'WP_Duotone_Gutenberg' ) ) {
return;
}

/**
* Manages duotone block supports and global styles.
*
Expand Down
4 changes: 4 additions & 0 deletions lib/class-wp-theme-json-data-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
* @since 6.1.0
*/

if ( class_exists( 'WP_Theme_JSON_Data_Gutenberg' ) ) {
return;
}

/**
* Class to provide access to update a theme.json structure.
*/
Expand Down
4 changes: 4 additions & 0 deletions lib/class-wp-theme-json-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
* @since 5.8.0
*/

if ( class_exists( 'WP_Theme_JSON_Gutenberg' ) ) {
return;
}

/**
* Class that encapsulates the processing of structures that adhere to the theme.json spec.
*
Expand Down
4 changes: 4 additions & 0 deletions lib/class-wp-theme-json-resolver-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
* @since 5.8.0
*/

if ( class_exists( 'WP_Theme_JSON_Resolver_Gutenberg' ) ) {
return;
}

/**
* Class that abstracts the processing of the different data sources
* for site-level config and offers an API to work with them.
Expand Down
9 changes: 9 additions & 0 deletions lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,15 @@ function gutenberg_register_packages_styles( $styles ) {
);
$styles->add_data( 'wp-edit-blocks', 'rtl', 'replace' );

gutenberg_override_style(
$styles,
'wp-nux',
gutenberg_url( 'build/nux/style.css' ),
array( 'wp-components' ),
$version
);
$styles->add_data( 'wp-nux', 'rtl', 'replace' );

gutenberg_override_style(
$styles,
'wp-block-library-theme',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
* @since 6.2.0
*/

if ( class_exists( 'WP_HTML_Attribute_Token' ) ) {
return;
}

/**
* Data structure for the attribute token that allows to drastically improve performance.
*
Expand Down
4 changes: 4 additions & 0 deletions lib/compat/wordpress-6.2/html-api/class-wp-html-span.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
* @since 6.2.0
*/

if ( class_exists( 'WP_HTML_Span' ) ) {
return;
}

/**
* Represents a textual span inside an HTML document.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
* @since 6.2.0
*/

if ( class_exists( 'WP_HTML_Tag_Processor' ) ) {
return;
}

/**
* Modifies attributes in an HTML document for tags matching a query.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
* @since 6.2.0
*/

if ( class_exists( 'WP_HTML_Text_Replacement' ) ) {
return;
}

/**
* Data structure used to replace existing content from start to end that allows to drastically improve performance.
*
Expand Down
Loading

0 comments on commit da2380a

Please sign in to comment.