Skip to content

Commit

Permalink
Merge branch 'trunk' into add/site-logo-border
Browse files Browse the repository at this point in the history
  • Loading branch information
carolinan committed Aug 12, 2024
2 parents 95f264f + e0b54b3 commit 1e7f619
Show file tree
Hide file tree
Showing 644 changed files with 11,314 additions and 24,994 deletions.
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,14 @@ module.exports = {
...[
'CheckboxControl',
'ComboboxControl',
'DimensionControl',
'FocalPointPicker',
'RangeControl',
'SearchControl',
'SelectControl',
'TextControl',
'TextareaControl',
'ToggleControl',
'ToggleGroupControl',
'TreeSelect',
].map( ( componentName ) => ( {
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ jobs:
- name: Compare performance with base branch
if: github.event_name == 'push'
# The base hash used here need to be a commit that is compatible with the current WP version
# The current one is 9725060a5b18904c6cc5fdbe4b06fbde7419e02c and it needs to be updated every WP major release.
# The current one is 5f4c9c853b15092ed885d5280edefb973c37d9e9 and it needs to be updated every WP major release.
# It is used as a base comparison point to avoid fluctuation in the performance metrics.
run: |
WP_VERSION=$(awk -F ': ' '/^Tested up to/{print $2}' readme.txt)
IFS=. read -ra WP_VERSION_ARRAY <<< "$WP_VERSION"
WP_MAJOR="${WP_VERSION_ARRAY[0]}.${WP_VERSION_ARRAY[1]}"
./bin/plugin/cli.js perf $GITHUB_SHA 9725060a5b18904c6cc5fdbe4b06fbde7419e02c --tests-branch $GITHUB_SHA --wp-version "$WP_MAJOR"
./bin/plugin/cli.js perf $GITHUB_SHA 5f4c9c853b15092ed885d5280edefb973c37d9e9 --tests-branch $GITHUB_SHA --wp-version "$WP_MAJOR"
- name: Compare performance with custom branches
if: github.event_name == 'workflow_dispatch'
Expand All @@ -101,7 +101,7 @@ jobs:
CODEHEALTH_PROJECT_TOKEN: ${{ secrets.CODEHEALTH_PROJECT_TOKEN }}
run: |
COMMITTED_AT=$(git show -s $GITHUB_SHA --format="%cI")
./bin/log-performance-results.js $CODEHEALTH_PROJECT_TOKEN trunk $GITHUB_SHA 9725060a5b18904c6cc5fdbe4b06fbde7419e02c $COMMITTED_AT
./bin/log-performance-results.js $CODEHEALTH_PROJECT_TOKEN trunk $GITHUB_SHA 5f4c9c853b15092ed885d5280edefb973c37d9e9 $COMMITTED_AT
- name: Archive debug artifacts (screenshots, HTML snapshots)
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
Expand Down
4 changes: 4 additions & 0 deletions backport-changelog/6.7/7137.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
https://github.com/WordPress/wordpress-develop/pull/7137

* https://github.com/WordPress/gutenberg/pull/64192
* https://github.com/WordPress/gutenberg/pull/64328
519 changes: 435 additions & 84 deletions changelog.txt

Large diffs are not rendered by default.

Binary file removed docs/assets/plugin-sidebar-closed-state.png
Binary file not shown.
Binary file modified docs/assets/plugin-sidebar-open-state.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/getting-started/devenv/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Refer to the [Get started with `wp-env`](/docs/getting-started/devenv/get-starte
This list is not exhaustive, but here are several additional options to choose from if you prefer not to use `wp-env`:

- [Local](https://localwp.com/)
- [WP Studio](https://developer.wordpress.com/studio/)
- [XAMPP](https://www.apachefriends.org/)
- [MAMP](https://www.mamp.info/en/mamp/mac/)
- [Varying Vagrant Vagrants](https://varyingvagrantvagrants.org/) (VVV)
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,17 @@ And a `style.css` file to load on the frontend:

The files will automatically be enqueued when specified in the block.json.

<div class="callout callout-info">

If you are using `@wordpress/scripts` you will need to import your stylesheet within your corresponding JavaScript file in order for `@wordpress/scripts` to process the stylesheet.

Example:

- In `edit.js` you would place `import './editor.scss';`
- In `index.js` you would place `import './style.scss';`
- In `view.js` you would place `import './view.scss';` (interactive block template)
</div>

**Note:** If you have multiple files to include, you can use standard `wp_enqueue_style` functions like any other plugin or theme. You will want to use the following hooks for the block editor:

- `enqueue_block_editor_assets` - to load only in editor view
Expand Down
6 changes: 6 additions & 0 deletions docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,12 @@
"markdown_source": "../packages/components/src/combobox-control/README.md",
"parent": "components"
},
{
"title": "Composite",
"slug": "composite",
"markdown_source": "../packages/components/src/composite/README.md",
"parent": "components"
},
{
"title": "ConfirmDialog",
"slug": "confirm-dialog",
Expand Down
18 changes: 9 additions & 9 deletions docs/reference-guides/core-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ Displays a title with the number of comments. ([Source](https://github.com/WordP
- **Category:** theme
- **Ancestor:** core/comments
- **Supports:** align, color (background, gradients, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~anchor~~, ~~html~~
- **Attributes:** level, showCommentsCount, showPostTitle, textAlign
- **Attributes:** level, levelOptions, showCommentsCount, showPostTitle, textAlign

## Cover

Expand Down Expand Up @@ -410,7 +410,7 @@ Display a list of your most recent posts. ([Source](https://github.com/WordPress

## List

Create a bulleted or numbered list. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/list))
An organized collection of items displayed in a specific order. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/list))

- **Name:** core/list
- **Category:** text
Expand All @@ -420,13 +420,13 @@ Create a bulleted or numbered list. ([Source](https://github.com/WordPress/guten

## List item

Create a list item. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/list-item))
An individual item within a list. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/list-item))

- **Name:** core/list-item
- **Category:** text
- **Parent:** core/list
- **Allowed Blocks:** core/list
- **Supports:** color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), splitting, typography (fontSize, lineHeight), ~~className~~
- **Supports:** anchor, color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), splitting, typography (fontSize, lineHeight), ~~className~~
- **Attributes:** content, placeholder

## Login/out
Expand Down Expand Up @@ -689,7 +689,7 @@ Displays the title of a post, page, or any other content-type. ([Source](https:/
- **Name:** core/post-title
- **Category:** theme
- **Supports:** align (full, wide), color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Attributes:** isLink, level, linkTarget, rel, textAlign
- **Attributes:** isLink, level, levelOptions, linkTarget, rel, textAlign

## Preformatted

Expand Down Expand Up @@ -775,7 +775,7 @@ Display the query title. ([Source](https://github.com/WordPress/gutenberg/tree/t
- **Name:** core/query-title
- **Category:** theme
- **Supports:** align (full, wide), color (background, gradients, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Attributes:** level, showPrefix, showSearchTerm, textAlign, type
- **Attributes:** level, levelOptions, showPrefix, showSearchTerm, textAlign, type

## Quote

Expand Down Expand Up @@ -847,7 +847,7 @@ Describe in a few words what the site is about. The tagline can be used in searc
- **Name:** core/site-tagline
- **Category:** theme
- **Supports:** align (full, wide), color (background, gradients, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Attributes:** level, textAlign
- **Attributes:** level, levelOptions, textAlign

## Site Title

Expand All @@ -856,7 +856,7 @@ Displays the name of this site. Update the block, and the changes apply everywhe
- **Name:** core/site-title
- **Category:** theme
- **Supports:** align (full, wide), color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Attributes:** isLink, level, linkTarget, textAlign
- **Attributes:** isLink, level, levelOptions, linkTarget, textAlign

## Social Icon

Expand Down Expand Up @@ -908,7 +908,7 @@ Summarize your post with a list of headings. Add HTML anchors to Heading blocks

## Tag Cloud

A cloud of your most used tags. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/tag-cloud))
A cloud of popular keywords, each sized by how often it appears. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/tag-cloud))

- **Name:** core/tag-cloud
- **Category:** widgets
Expand Down
101 changes: 100 additions & 1 deletion docs/reference-guides/data/data-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,106 @@

Namespace: `core`.

## Selectors
## Dynamically generated selectors

There are a number of user-friendly selectors that are wrappers of the more generic `getEntityRecord` and `getEntityRecords` that can be used to retrieve information for the various entities.

### getPostType

Returns the information for a given post type.

_Usage_

import { useSelect } from '@wordpress/data';
import { store as coreDataStore } from '@wordpress/core-data';

const postType = useSelect(
( select ) => select( coreDataStore ).getPostType( 'post' )

// Equivalent to: select( coreDataStore ).getEntityRecord( 'root', 'postType', 'post' )
);

_Parameters_

- postType `string`

_Returns_

- `EntityRecord | undefined`: Record.

### getPostTypes

Returns the information for post types.

_Usage_

import { useSelect } from '@wordpress/data';
import { store as coreDataStore } from '@wordpress/core-data';

const postTypes = useSelect( ( select ) => {
return select( coreDataStore ).getPostTypes( { per_page: 4 } );

// Equivalent to:
// select( coreDataStore ).getEntityRecords( 'root', 'postType', { per_page: 4 } );
} );

_Parameters_

- _query_ `GetRecordsHttpQuery`: Optional terms query. If requesting specific fields, fields must always include the ID. For valid query parameters see the [Reference](https://developer.wordpress.org/rest-api/reference/) in the REST API Handbook and select the entity kind. Then see the arguments available for "List [Entity kind]s".

_Returns_

- `EntityRecord[] | null`: Records.

### getTaxonomy

Returns information for a given taxonomy.

_Usage_

import { useSelect } from '@wordpress/data';
import { store as coreDataStore } from '@wordpress/core-data';

const taxonomy = useSelect( ( select ) => {
return select( coreDataStore ).getTaxonomy( 'category' );

// Equivalent to:
// select( coreDataStore ).getEntityRecord( 'root', 'taxonomy', 'category' );
} );

_Parameters_

- taxonomy `string`

_Returns_

- `EntityRecord | undefined`: Record.

### getTaxonomies

Returns information for taxonomies.

_Usage_

import { useSelect } from '@wordpress/data';
import { store as coreDataStore } from '@wordpress/core-data';

const taxonomies = useSelect( ( select ) => {
return select( coreDataStore ).getTaxonomies( { type: 'post' } );

// Equivalent to:
// select( coreDataStore ).getEntityRecords( 'root', 'taxonomy', { type: 'post' } );
} );

_Parameters_

- _query_ `GetRecordsHttpQuery`: Optional terms query. If requesting specific fields, fields must always include the ID. For valid query parameters see the [Reference](https://developer.wordpress.org/rest-api/reference/) in the REST API Handbook and select the entity kind. Then see the arguments available for "List [Entity kind]s".

_Returns_

- `EntityRecord[] | null`: Records.

## Other Selectors

<!-- START TOKEN(Autogenerated selectors|../../../packages/core-data/src/selectors.ts) -->

Expand Down
Loading

0 comments on commit 1e7f619

Please sign in to comment.