diff --git a/.github/workflows/upload-release-to-plugin-repo.yml b/.github/workflows/upload-release-to-plugin-repo.yml
index e866964e69b2d1..4d2b0a66a7e7d6 100644
--- a/.github/workflows/upload-release-to-plugin-repo.yml
+++ b/.github/workflows/upload-release-to-plugin-repo.yml
@@ -168,7 +168,9 @@ jobs:
steps:
- name: Check out Gutenberg trunk from WP.org plugin repo
- run: svn checkout "$PLUGIN_REPO_URL/trunk" --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
+ run: |
+ svn checkout "$PLUGIN_REPO_URL/trunk" --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
+ svn checkout "$PLUGIN_REPO_URL/tags" --depth=immediates --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
- name: Delete everything
working-directory: ./trunk
@@ -182,7 +184,7 @@ jobs:
unzip gutenberg.zip -d trunk
rm gutenberg.zip
- - name: Replace the stable tag placeholder with the existing stable tag on the SVN repository
+ - name: Replace the stable tag placeholder with the new version
env:
STABLE_TAG_PLACEHOLDER: 'Stable tag: V\.V\.V'
run: |
@@ -194,27 +196,16 @@ jobs:
name: changelog trunk
path: trunk
- - name: Commit the content changes
+ - name: Commit the release
working-directory: ./trunk
run: |
svn st | grep '^?' | awk '{print $2}' | xargs -r svn add
svn st | grep '^!' | awk '{print $2}' | xargs -r svn rm
- svn commit -m "Committing version $VERSION" \
+ svn cp . "../tags/$VERSION"
+ svn commit . "../tags/$VERSION" \
+ -m "Releasing version $VERSION" \
--no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD" \
- --config-option=servers:global:http-timeout=300
-
- - name: Create the SVN tag
- working-directory: ./trunk
- run: |
- svn copy "$PLUGIN_REPO_URL/trunk" "$PLUGIN_REPO_URL/tags/$VERSION" -m "Tagging version $VERSION" \
- --no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
-
- - name: Update the plugin's stable version
- working-directory: ./trunk
- run: |
- sed -i "s/Stable tag: ${STABLE_VERSION_REGEX}/Stable tag: ${VERSION}/g" ./readme.txt
- svn commit -m "Releasing version $VERSION" \
- --no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
+ --config-option=servers:global:http-timeout=600
upload-tag:
name: Publish as tag
diff --git a/backport-changelog/6.8/7129.md b/backport-changelog/6.8/7129.md
index 90c9168cdc6f8a..301f1abc45d0d7 100644
--- a/backport-changelog/6.8/7129.md
+++ b/backport-changelog/6.8/7129.md
@@ -1,3 +1,4 @@
https://github.com/WordPress/wordpress-develop/pull/7129
* https://github.com/WordPress/gutenberg/pull/62304
+* https://github.com/WordPress/gutenberg/pull/67879
diff --git a/bin/check-licenses.mjs b/bin/check-licenses.mjs
index 458590e696a9fd..b453ebd84cd3a7 100755
--- a/bin/check-licenses.mjs
+++ b/bin/check-licenses.mjs
@@ -10,7 +10,7 @@ import { spawnSync } from 'node:child_process';
*/
import { checkDepsInTree } from '../packages/scripts/utils/license.js';
-const ignored = [ '@ampproject/remapping' ];
+const ignored = [ '@ampproject/remapping', 'webpack' ];
/*
* `wp-scripts check-licenses` uses prod and dev dependencies of the package to scan for dependencies. With npm workspaces, workspace packages (the @wordpress/* packages) are not listed in the main package json and this approach does not work.
diff --git a/docs/README.md b/docs/README.md
index 31471a9928b2cf..4fd7d16595e133 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -48,7 +48,7 @@ This handbook should be considered the canonical resource for all things related
## Are you in the right place?
-The Block Editor Handbook is designed for those looking to create and develop for the Block Editor. However, it's important to note that there are multiple other handbooks available within the [Developer Resources](http://developer.wordpress.org/) that you may find beneficial:
+The Block Editor Handbook is designed for those looking to create and develop for the Block Editor. However, it's important to note that there are multiple other handbooks available within the [Developer Resources](https://developer.wordpress.org/) that you may find beneficial:
- [Theme Handbook](https://developer.wordpress.org/themes)
- [Plugin Handbook](https://developer.wordpress.org/plugins)
diff --git a/docs/getting-started/devenv/get-started-with-wp-env.md b/docs/getting-started/devenv/get-started-with-wp-env.md
index 74942ea3ee93bf..a6427deb863b7e 100644
--- a/docs/getting-started/devenv/get-started-with-wp-env.md
+++ b/docs/getting-started/devenv/get-started-with-wp-env.md
@@ -47,7 +47,7 @@ wp-env start
Once the script completes, you can access the local environment at: http://localhost:8888
. Log into the WordPress dashboard using username `admin` and password `password`.
wp-env
configurations, and the documentation might prompt you to run npm run start wp-env
instead.
+ Some projects, like Gutenberg, include their own specific wp-env
configurations, and the documentation might prompt you to run npm run wp-env start
instead.
{ convertDescription }
- -{ convertDescription }
+ +See the WordPress Storybook for more detailed, interactive documentation.
+ +## Props + +### `children` + +Text to display inside the badge. + + - Type: `string` + - Required: Yes + +### `intent` + +Badge variant. + + - Type: `"default" | "info" | "success" | "warning" | "error"` + - Required: No + - Default: `default` diff --git a/packages/components/src/badge/docs-manifest.json b/packages/components/src/badge/docs-manifest.json new file mode 100644 index 00000000000000..3b70c0ef228432 --- /dev/null +++ b/packages/components/src/badge/docs-manifest.json @@ -0,0 +1,5 @@ +{ + "$schema": "../../schemas/docs-manifest.json", + "displayName": "Badge", + "filePath": "./index.tsx" +} diff --git a/packages/components/src/badge/index.tsx b/packages/components/src/badge/index.tsx new file mode 100644 index 00000000000000..8a55f3881215f3 --- /dev/null +++ b/packages/components/src/badge/index.tsx @@ -0,0 +1,66 @@ +/** + * External dependencies + */ +import clsx from 'clsx'; + +/** + * WordPress dependencies + */ +import { info, caution, error, published } from '@wordpress/icons'; + +/** + * Internal dependencies + */ +import type { BadgeProps } from './types'; +import type { WordPressComponentProps } from '../context'; +import Icon from '../icon'; + +function Badge( { + className, + intent = 'default', + children, + ...props +}: WordPressComponentProps< BadgeProps, 'span', false > ) { + /** + * Returns an icon based on the badge context. + * + * @return The corresponding icon for the provided context. + */ + function contextBasedIcon() { + switch ( intent ) { + case 'info': + return info; + case 'success': + return published; + case 'warning': + return caution; + case 'error': + return error; + default: + return null; + } + } + + return ( + + { intent !== 'default' && ( +