diff --git a/.github/workflows/pull-request-automation.yml b/.github/workflows/pull-request-automation.yml index 6219c5ae3c8483..5163ae3f0ea0cb 100644 --- a/.github/workflows/pull-request-automation.yml +++ b/.github/workflows/pull-request-automation.yml @@ -25,7 +25,7 @@ jobs: node-version: ${{ matrix.node }} - name: Cache NPM packages - uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 # v3.2.4 + uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # v3.2.5 with: # npm cache files are stored in `~/.npm` on Linux/macOS path: ~/.npm diff --git a/.github/workflows/rnmobile-android-runner.yml b/.github/workflows/rnmobile-android-runner.yml index fc019dfa5d504d..033789ee30a92d 100644 --- a/.github/workflows/rnmobile-android-runner.yml +++ b/.github/workflows/rnmobile-android-runner.yml @@ -26,7 +26,7 @@ jobs: uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - name: Use desired version of Java - uses: actions/setup-java@1df8dbefe2a8cbc99770194893dd902763bee34b # v3.9.0 + uses: actions/setup-java@3f07048e3d294f56e9b90ac5ea2c6f74e9ad0f98 # v3.10.0 with: distribution: 'temurin' java-version: '11' @@ -43,7 +43,7 @@ jobs: uses: gradle/gradle-build-action@3fbe033aaae657f011f88f29be9e65ed26bd29ef # v2.3.3 - name: AVD cache - uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 # v3.2.4 + uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # v3.2.5 id: avd-cache with: path: | diff --git a/.github/workflows/rnmobile-ios-runner.yml b/.github/workflows/rnmobile-ios-runner.yml index 6d497491bdf9c3..52fab007b19173 100644 --- a/.github/workflows/rnmobile-ios-runner.yml +++ b/.github/workflows/rnmobile-ios-runner.yml @@ -37,7 +37,7 @@ jobs: run: find package-lock.json packages/react-native-editor/ios packages/react-native-aztec/ios packages/react-native-bridge/ios -type f -print0 | sort -z | xargs -0 shasum | tee ios-checksums.txt - name: Restore build cache - uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 # v3.2.4 + uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # v3.2.5 with: path: | packages/react-native-editor/ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app @@ -45,7 +45,7 @@ jobs: key: ${{ runner.os }}-ios-build-${{ matrix.xcode }}-${{ matrix.device }}-${{ hashFiles('ios-checksums.txt') }} - name: Restore pods cache - uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 # v3.2.4 + uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # v3.2.5 with: path: | packages/react-native-editor/ios/Pods diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 8b1884835f416e..6552f2ecf6a2b0 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -182,7 +182,7 @@ jobs: run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT - name: Cache PHPCS scan cache - uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 # v3.0.11 + uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # v3.0.11 with: path: .cache/phpcs.json key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcs-cache-${{ hashFiles('**/composer.json', 'phpcs.xml.dist') }} diff --git a/changelog.txt b/changelog.txt index 46f339243bd085..798ea972663f9e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,18 @@ == Changelog == += 15.2.0-rc.2 = + +Various +Fonts API: Add missing files to lib/load.php. (https://github.com/WordPress/gutenberg/pull/48108) +First time contributors +The following PRs were merged by first time contributors: + +Contributors +The following contributors merged PRs in this release: + +@hellofromtonya + + = 15.1.1 = diff --git a/docs/contributors/code/scripts.md b/docs/contributors/code/scripts.md index b7cabe0130d71c..d4ce263c80ad14 100644 --- a/docs/contributors/code/scripts.md +++ b/docs/contributors/code/scripts.md @@ -68,8 +68,8 @@ It is recommended to use the main `wp-polyfill` script handle which takes care o ## Bundling and code sharing When using a JavaScript bundler like [webpack](https://webpack.js.org/), the scripts mentioned here -can be excluded from the bundle and provided by WordPress in the form of script dependencies [(see -`wp_enqueue_script`)][https://developer.wordpress.org/reference/functions/wp_enqueue_script/#default-scripts-included-and-registered-by-wordpress]. +can be excluded from the bundle and provided by WordPress in the form of script dependencies [see +`wp_enqueue_script`](https://developer.wordpress.org/reference/functions/wp_enqueue_script/#default-scripts-included-and-registered-by-wordpress). The [`@wordpress/dependency-extraction-webpack-plugin`](https://github.com/WordPress/gutenberg/tree/HEAD/packages/dependency-extraction-webpack-plugin) diff --git a/gutenberg.php b/gutenberg.php index ca9be89162ebc8..fe3e8669605ebe 100644 --- a/gutenberg.php +++ b/gutenberg.php @@ -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.0 * Requires PHP: 5.6 - * Version: 15.2.0-rc.1 + * Version: 15.2.0-rc.2 * Author: Gutenberg Team * Text Domain: gutenberg * diff --git a/lib/compat/wordpress-6.3/class-gutenberg-rest-templates-controller-6-3.php b/lib/compat/wordpress-6.3/class-gutenberg-rest-templates-controller-6-3.php index f857cedd37f9a1..2f9bd7a8cd9e42 100644 --- a/lib/compat/wordpress-6.3/class-gutenberg-rest-templates-controller-6-3.php +++ b/lib/compat/wordpress-6.3/class-gutenberg-rest-templates-controller-6-3.php @@ -65,4 +65,65 @@ public function get_template_fallback( $request ) { $response = $this->prepare_item_for_response( $fallback_template, $request ); return rest_ensure_response( $response ); } + + /** + * Add revisions to the response. + * + * @param WP_Block_Template $item Template instance. + * @param WP_REST_Request $request Request object. + * @return WP_REST_Response Response object. + */ + public function prepare_item_for_response( $item, $request ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + $template = $item; + + $fields = $this->get_fields_for_response( $request ); + + $response = parent::prepare_item_for_response( $item, $request ); + + if ( rest_is_field_included( '_links', $fields ) || rest_is_field_included( '_embedded', $fields ) ) { + $links = $this->prepare_revision_links( $template ); + $response->add_links( $links ); + if ( ! empty( $links['self']['href'] ) ) { + $actions = $this->get_available_actions(); + $self = $links['self']['href']; + foreach ( $actions as $rel ) { + $response->add_link( $rel, $self ); + } + } + } + + return $response; + } + + /** + * Adds revisions to links. + * + * @since 6.2.0 + * + * @param WP_Block_Template $template Template instance. + * @return array Links for the given post. + */ + protected function prepare_revision_links( $template ) { + $links = array(); + + if ( post_type_supports( $this->post_type, 'revisions' ) && (int) $template->wp_id ) { + $revisions = wp_get_latest_revision_id_and_total_count( (int) $template->wp_id ); + $revisions_count = ! is_wp_error( $revisions ) ? $revisions['count'] : 0; + $revisions_base = sprintf( '/%s/%s/%s/revisions', $this->namespace, $this->rest_base, $template->id ); + + $links['version-history'] = array( + 'href' => rest_url( $revisions_base ), + 'count' => $revisions_count, + ); + + if ( $revisions_count > 0 ) { + $links['predecessor-version'] = array( + 'href' => rest_url( $revisions_base . '/' . $revisions['latest_id'] ), + 'id' => $revisions['latest_id'], + ); + } + } + + return $links; + } } diff --git a/lib/experimental/class-gutenberg-rest-template-revision-count.php b/lib/experimental/class-gutenberg-rest-template-revision-count.php deleted file mode 100644 index 82bedd6e0c8fff..00000000000000 --- a/lib/experimental/class-gutenberg-rest-template-revision-count.php +++ /dev/null @@ -1,75 +0,0 @@ -get_fields_for_response( $request ); - - $response = parent::prepare_item_for_response( $item, $request ); - - if ( rest_is_field_included( '_links', $fields ) || rest_is_field_included( '_embedded', $fields ) ) { - $links = $this->prepare_revision_links( $template ); - $response->add_links( $links ); - if ( ! empty( $links['self']['href'] ) ) { - $actions = $this->get_available_actions(); - $self = $links['self']['href']; - foreach ( $actions as $rel ) { - $response->add_link( $rel, $self ); - } - } - } - - return $response; - } - - /** - * Adds revisions to links. - * - * @since 6.2.0 - * - * @param WP_Block_Template $template Template instance. - * @return array Links for the given post. - */ - protected function prepare_revision_links( $template ) { - $links = array(); - - if ( post_type_supports( $this->post_type, 'revisions' ) && (int) $template->wp_id ) { - $revisions = wp_get_latest_revision_id_and_total_count( (int) $template->wp_id ); - $revisions_count = ! is_wp_error( $revisions ) ? $revisions['count'] : 0; - $revisions_base = sprintf( '/%s/%s/%s/revisions', $this->namespace, $this->rest_base, $template->id ); - - $links['version-history'] = array( - 'href' => rest_url( $revisions_base ), - 'count' => $revisions_count, - ); - - if ( $revisions_count > 0 ) { - $links['predecessor-version'] = array( - 'href' => rest_url( $revisions_base . '/' . $revisions['latest_id'] ), - 'id' => $revisions['latest_id'], - ); - } - } - - return $links; - } -} diff --git a/lib/experimental/rest-api.php b/lib/experimental/rest-api.php index 31a96b6572f26b..77f7d091d2655d 100644 --- a/lib/experimental/rest-api.php +++ b/lib/experimental/rest-api.php @@ -29,27 +29,6 @@ function gutenberg_register_block_editor_settings() { add_action( 'rest_api_init', 'gutenberg_register_block_editor_settings' ); -/** - * Hook in to the template and template part post types and decorate - * the rest endpoint with the revision count. - * - * When merging to core, this can be removed once Gutenberg_REST_Template_Revision_Count is - * merged with WP_REST_Template_Controller. - * - * @param array $args Current registered post type args. - * @param string $post_type Name of post type. - * - * @return array - */ -function wp_api_template_revision_args( $args, $post_type ) { - if ( 'wp_template' === $post_type || 'wp_template_part' === $post_type ) { - $args['rest_controller_class'] = 'Gutenberg_REST_Template_Revision_Count'; - } - - return $args; -} -add_filter( 'register_post_type_args', 'wp_api_template_revision_args', 10, 2 ); - /** * Shim for get_sample_permalink() to add support for auto-draft status. * diff --git a/lib/load.php b/lib/load.php index c99668ff3739c0..e00c20286d4e70 100644 --- a/lib/load.php +++ b/lib/load.php @@ -57,7 +57,6 @@ function gutenberg_is_experiment_enabled( $name ) { if ( ! class_exists( 'WP_Rest_Customizer_Nonces' ) ) { require_once __DIR__ . '/experimental/class-wp-rest-customizer-nonces.php'; } - require_once __DIR__ . '/experimental/class-gutenberg-rest-template-revision-count.php'; require_once __DIR__ . '/experimental/rest-api.php'; } diff --git a/package-lock.json b/package-lock.json index 2c8ed22b0e0229..ec36b98bde155e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "gutenberg", - "version": "15.2.0-rc.1", + "version": "15.2.0-rc.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -9429,9 +9429,9 @@ } }, "@sideway/formula": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.0.tgz", - "integrity": "sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg==" + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz", + "integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==" }, "@sideway/pinpoint": { "version": "2.0.0", diff --git a/package.json b/package.json index d950b3e69010ee..3d19e41105e66a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gutenberg", - "version": "15.2.0-rc.1", + "version": "15.2.0-rc.2", "private": true, "description": "A new WordPress editor experience.", "author": "The WordPress Contributors", diff --git a/packages/block-editor/src/components/off-canvas-editor/leaf-more-menu.js b/packages/block-editor/src/components/off-canvas-editor/leaf-more-menu.js index a266f0d9377c36..a3829998361bc0 100644 --- a/packages/block-editor/src/components/off-canvas-editor/leaf-more-menu.js +++ b/packages/block-editor/src/components/off-canvas-editor/leaf-more-menu.js @@ -2,9 +2,14 @@ * WordPress dependencies */ import { createBlock } from '@wordpress/blocks'; -import { addSubmenu, moreVertical } from '@wordpress/icons'; +import { + addSubmenu, + chevronUp, + chevronDown, + moreVertical, +} from '@wordpress/icons'; import { DropdownMenu, MenuItem, MenuGroup } from '@wordpress/components'; -import { useDispatch } from '@wordpress/data'; +import { useDispatch, useSelect } from '@wordpress/data'; import { __, sprintf } from '@wordpress/i18n'; /** @@ -80,14 +85,24 @@ function AddSubmenuItem( { block, onClose } ) { export default function LeafMoreMenu( props ) { const { clientId, block } = props; - const { removeBlocks } = useDispatch( blockEditorStore ); + const { moveBlocksDown, moveBlocksUp, removeBlocks } = + useDispatch( blockEditorStore ); - const label = sprintf( + const removeLabel = sprintf( /* translators: %s: block name */ __( 'Remove %s' ), BlockTitle( { clientId, maximumLength: 25 } ) ); + const rootClientId = useSelect( + ( select ) => { + const { getBlockRootClientId } = select( blockEditorStore ); + + return getBlockRootClientId( clientId ); + }, + [ clientId ] + ); + return ( { ( { onClose } ) => ( - - - { - removeBlocks( [ clientId ], false ); - onClose(); - } } - > - { label } - - + <> + + { + moveBlocksUp( [ clientId ], rootClientId ); + onClose(); + } } + > + { __( 'Move up' ) } + + { + moveBlocksDown( [ clientId ], rootClientId ); + onClose(); + } } + > + { __( 'Move down' ) } + + + + + { + removeBlocks( [ clientId ], false ); + onClose(); + } } + > + { removeLabel } + + + ) } ); diff --git a/packages/block-library/src/page-list/convert-to-links-modal.js b/packages/block-library/src/page-list/convert-to-links-modal.js new file mode 100644 index 00000000000000..b212fccb774177 --- /dev/null +++ b/packages/block-library/src/page-list/convert-to-links-modal.js @@ -0,0 +1,38 @@ +/** + * WordPress dependencies + */ +import { Button, Modal } from '@wordpress/components'; +import { __ } from '@wordpress/i18n'; + +export const convertDescription = __( + 'This menu is automatically kept in sync with pages on your site. You can manage the menu yourself by clicking "Edit" below.' +); + +export function ConvertToLinksModal( { onClick, onClose, disabled } ) { + return ( + +

+ { convertDescription } +

+
+ + +
+
+ ); +} diff --git a/packages/block-library/src/page-list/edit.js b/packages/block-library/src/page-list/edit.js index 6b525960db2246..876496686929a3 100644 --- a/packages/block-library/src/page-list/edit.js +++ b/packages/block-library/src/page-list/edit.js @@ -23,7 +23,6 @@ import { Notice, ComboboxControl, Button, - Modal, } from '@wordpress/components'; import { __, sprintf } from '@wordpress/i18n'; import { useMemo, useState, useEffect } from '@wordpress/element'; @@ -34,16 +33,15 @@ import { useSelect } from '@wordpress/data'; * Internal dependencies */ import { useConvertToNavigationLinks } from './use-convert-to-navigation-links'; +import { + convertDescription, + ConvertToLinksModal, +} from './convert-to-links-modal'; // We only show the edit option when page count is <= MAX_PAGE_COUNT // Performance of Navigation Links is not good past this value. const MAX_PAGE_COUNT = 100; const NOOP = () => {}; - -const convertDescription = __( - 'This menu is automatically kept in sync with pages on your site. You can manage the menu yourself by clicking "Edit" below.' -); - function BlockContent( { blockProps, innerBlocksProps, @@ -113,7 +111,7 @@ function BlockContent( { } } -function ConvertToLinksModal( { onClick, disabled } ) { +function ConvertToLinks( { onClick, disabled } ) { const [ isOpen, setOpen ] = useState( false ); const openModal = () => setOpen( true ); const closeModal = () => setOpen( false ); @@ -126,30 +124,11 @@ function ConvertToLinksModal( { onClick, disabled } ) { { isOpen && ( - -

- { convertDescription } -

-
- - -
-
+ ) } ); @@ -344,7 +323,7 @@ export default function PageListEdit( { ) } { allowConvertToLinks && ( - diff --git a/packages/components/src/higher-order/navigate-regions/style.scss b/packages/components/src/higher-order/navigate-regions/style.scss index 6e66c854dd70ee..f146413a09dc9e 100644 --- a/packages/components/src/higher-order/navigate-regions/style.scss +++ b/packages/components/src/higher-order/navigate-regions/style.scss @@ -24,13 +24,14 @@ // visible. For the future, it's important to take into consideration that // the navigable regions should always have a computed size. For now, we can // fix some edge cases but these CSS rules should be later removed in favor of - // a more abstracted approach to make the navigabel regions focus style work + // a more abstracted approach to make the navigable regions focus style work // regardles of the CSS used on other components. // Header top bar when Distraction free mode is on. &.is-distraction-free .interface-interface-skeleton__header .edit-post-header, .interface-interface-skeleton__sidebar .edit-post-layout__toggle-sidebar-panel, .interface-interface-skeleton__actions .edit-post-layout__toggle-publish-panel, + .interface-interface-skeleton__actions .edit-post-layout__toggle-entities-saved-states-panel, .editor-post-publish-panel { outline: 4px solid $components-color-accent; outline-offset: -4px; diff --git a/packages/e2e-tests/specs/performance/site-editor.test.js b/packages/e2e-tests/specs/performance/site-editor.test.js index 2e4002bf0bb1c3..a14b40d72b01bc 100644 --- a/packages/e2e-tests/specs/performance/site-editor.test.js +++ b/packages/e2e-tests/specs/performance/site-editor.test.js @@ -90,7 +90,6 @@ describe( 'Site Editor Performance', () => { await visitSiteEditor( { postId: id, postType: 'page', - path: '/navigation/single', } ); } ); diff --git a/packages/e2e-tests/specs/site-editor/multi-entity-saving.test.js b/packages/e2e-tests/specs/site-editor/multi-entity-saving.test.js index 30b634712119af..fa039fb10fd2ed 100644 --- a/packages/e2e-tests/specs/site-editor/multi-entity-saving.test.js +++ b/packages/e2e-tests/specs/site-editor/multi-entity-saving.test.js @@ -265,7 +265,6 @@ describe( 'Multi-entity save flow', () => { await visitSiteEditor( { postId: 'emptytheme//index', postType: 'wp_template', - path: '/templates/single', } ); await enterEditMode(); @@ -305,7 +304,6 @@ describe( 'Multi-entity save flow', () => { await visitSiteEditor( { postId: 'emptytheme//index', postType: 'wp_template', - path: '/templates/single', } ); await enterEditMode(); diff --git a/packages/e2e-tests/specs/site-editor/settings-sidebar.test.js b/packages/e2e-tests/specs/site-editor/settings-sidebar.test.js index c1d4a755a7c57b..3428ddd654023a 100644 --- a/packages/e2e-tests/specs/site-editor/settings-sidebar.test.js +++ b/packages/e2e-tests/specs/site-editor/settings-sidebar.test.js @@ -69,7 +69,6 @@ describe( 'Settings sidebar', () => { await visitSiteEditor( { postId: 'emptytheme//singular', postType: 'wp_template', - path: '/templates/single', } ); await enterEditMode(); const templateCardAfterNavigation = await getTemplateCard(); diff --git a/packages/edit-post/src/components/layout/index.js b/packages/edit-post/src/components/layout/index.js index 8353b4ed6b15e7..3fe02dbe5004f9 100644 --- a/packages/edit-post/src/components/layout/index.js +++ b/packages/edit-post/src/components/layout/index.js @@ -128,13 +128,6 @@ function Layout( { styles } ) { const isDistractionFree = isDistractionFreeMode && isLargeViewport; - const className = classnames( 'edit-post-layout', 'is-mode-' + mode, { - 'is-sidebar-opened': sidebarIsOpened, - 'has-fixed-toolbar': hasFixedToolbar, - 'has-metaboxes': hasActiveMetaboxes, - 'show-icon-labels': showIconLabels, - 'is-distraction-free': isDistractionFree, - } ); const openSidebarPanel = () => openGeneralSidebar( hasBlockSelected ? 'edit-post/block' : 'edit-post/document' @@ -166,6 +159,15 @@ function Layout( { styles } ) { [ entitiesSavedStatesCallback ] ); + const className = classnames( 'edit-post-layout', 'is-mode-' + mode, { + 'is-sidebar-opened': sidebarIsOpened, + 'has-fixed-toolbar': hasFixedToolbar, + 'has-metaboxes': hasActiveMetaboxes, + 'show-icon-labels': showIconLabels, + 'is-distraction-free': isDistractionFree, + 'is-entity-save-view-open': !! entitiesSavedStatesCallback, + } ); + const secondarySidebarLabel = isListViewOpened ? __( 'Document Overview' ) : __( 'Block Library' ); diff --git a/packages/edit-post/src/components/visual-editor/index.js b/packages/edit-post/src/components/visual-editor/index.js index 21760ccfb40dd6..263dc8044e3f2c 100644 --- a/packages/edit-post/src/components/visual-editor/index.js +++ b/packages/edit-post/src/components/visual-editor/index.js @@ -44,6 +44,8 @@ import { store as coreStore } from '@wordpress/core-data'; */ import { store as editPostStore } from '../../store'; +const isGutenbergPlugin = process.env.IS_GUTENBERG_PLUGIN ? true : false; + function MaybeIframe( { children, contentRef, shouldIframe, styles, style } ) { const ref = useMouseMoveTypingReset(); @@ -339,7 +341,9 @@ export default function VisualEditor( { styles } ) { > { - history.push( { - postId: templatePart.id, - postType: 'wp_template_part', - path: '/template-parts/single', - } ); + history.push( { + postId: templatePart.id, + postType: 'wp_template_part', } ); // TODO: Add a success notice? diff --git a/packages/edit-site/src/components/add-new-template/new-template.js b/packages/edit-site/src/components/add-new-template/new-template.js index 6b41c0625a4ca6..fb1a6f1fb9f79c 100644 --- a/packages/edit-site/src/components/add-new-template/new-template.js +++ b/packages/edit-site/src/components/add-new-template/new-template.js @@ -128,12 +128,9 @@ export default function NewTemplate( { setCanvasMode( 'edit' ); // Navigate to the created template editor. - window.queueMicrotask( () => { - history.push( { - postId: newTemplate.id, - postType: newTemplate.type, - path: '/templates/single', - } ); + history.push( { + postId: newTemplate.id, + postType: newTemplate.type, } ); createSuccessNotice( diff --git a/packages/edit-site/src/components/editor/style.scss b/packages/edit-site/src/components/editor/style.scss index c63a0dcb954d2b..1a24d3ee1475e7 100644 --- a/packages/edit-site/src/components/editor/style.scss +++ b/packages/edit-site/src/components/editor/style.scss @@ -6,12 +6,6 @@ padding: $grid-unit-30; display: flex; justify-content: center; - - .edit-site-layout__actions:focus &, - .edit-site-layout__actions:focus-within & { - top: auto; - bottom: 0; - } } // Adjust the position of the notices diff --git a/packages/edit-site/src/components/global-styles/screen-border.js b/packages/edit-site/src/components/global-styles/screen-border.js index 8312483cce6b2f..6a5578e20fcefa 100644 --- a/packages/edit-site/src/components/global-styles/screen-border.js +++ b/packages/edit-site/src/components/global-styles/screen-border.js @@ -16,7 +16,7 @@ function ScreenBorder( { name, variation = '' } ) { const variationClassName = getVariationClassName( variation ); return ( <> - + { hasBorderPanel && ( diff --git a/packages/edit-site/src/components/global-styles/ui.js b/packages/edit-site/src/components/global-styles/ui.js index 5372ce9e5fbd53..13c1d0f2067a18 100644 --- a/packages/edit-site/src/components/global-styles/ui.js +++ b/packages/edit-site/src/components/global-styles/ui.js @@ -68,7 +68,7 @@ function GlobalStylesActionMenu() { { isSaveViewOpen ? ( diff --git a/packages/edit-site/src/components/sidebar-edit-mode/global-styles-sidebar.js b/packages/edit-site/src/components/sidebar-edit-mode/global-styles-sidebar.js index 0e33bb6142ab2e..cec6dc209cceb9 100644 --- a/packages/edit-site/src/components/sidebar-edit-mode/global-styles-sidebar.js +++ b/packages/edit-site/src/components/sidebar-edit-mode/global-styles-sidebar.js @@ -37,18 +37,14 @@ export default function GlobalStylesSidebar() { closeLabel={ __( 'Close Styles sidebar' ) } panelClassName="edit-site-global-styles-sidebar__panel" header={ - - + + { __( 'Styles' ) }