{ supportsAuthor
diff --git a/packages/block-library/src/query/edit/inspector-controls/index.js b/packages/block-library/src/query/edit/inspector-controls/index.js
index 0ae4b052b57873..3470846a14795b 100644
--- a/packages/block-library/src/query/edit/inspector-controls/index.js
+++ b/packages/block-library/src/query/edit/inspector-controls/index.js
@@ -2,7 +2,6 @@
* WordPress dependencies
*/
import {
- PanelBody,
TextControl,
SelectControl,
RangeControl,
@@ -187,110 +186,171 @@ export default function QueryInspectorControls( props ) {
return (
<>
{ showSettingsPanel && (
-
+ {
+ setQuery( {
+ postType: 'post',
+ order: 'desc',
+ orderBy: 'date',
+ sticky: '',
+ inherit: true,
+ } );
+ } }
+ dropdownMenuProps={ dropdownMenuProps }
+ >
{ showInheritControl && (
- ! inherit }
label={ __( 'Query type' ) }
- isBlock
- onChange={ ( value ) => {
- setQuery( { inherit: value === 'default' } );
- } }
- help={
- inherit
- ? __(
- 'Display a list of posts or custom post types based on the current template.'
- )
- : __(
- 'Display a list of posts or custom post types based on specific criteria.'
- )
- }
- value={ !! inherit ? 'default' : 'custom' }
+ onDeselect={ () => setQuery( { inherit: true } ) }
+ isShownByDefault
>
-
-
-
- ) }
- { showPostTypeControl &&
- ( postTypesSelectOptions.length > 2 ? (
-
- ) : (
{
+ setQuery( {
+ inherit: value === 'default',
+ } );
+ } }
+ help={
+ inherit
+ ? __(
+ 'Display a list of posts or custom post types based on the current template.'
+ )
+ : __(
+ 'Display a list of posts or custom post types based on specific criteria.'
+ )
+ }
+ value={ !! inherit ? 'default' : 'custom' }
>
- { postTypesSelectOptions.map( ( option ) => (
-
- ) ) }
+
+
- ) ) }
+
+ ) }
- { showColumnsControl && (
- <>
-
- setDisplayLayout( {
- columns: value,
- } )
- }
- min={ 2 }
- max={ Math.max( 6, displayLayout.columns ) }
- />
- { displayLayout.columns > 6 && (
- postType !== 'post' }
+ label={ postTypeControlLabel }
+ onDeselect={ () => onPostTypeChange( 'post' ) }
+ isShownByDefault
+ >
+ { postTypesSelectOptions.length > 2 ? (
+
+ ) : (
+
- { __(
- 'This column count exceeds the recommended amount and may cause visual breakage.'
+ { postTypesSelectOptions.map(
+ ( option ) => (
+
+ )
) }
-
+
) }
- >
+
) }
+
+ { showColumnsControl && (
+ displayLayout?.columns !== 2 }
+ label={ __( 'Columns' ) }
+ onDeselect={ () =>
+ setDisplayLayout( { columns: 2 } )
+ }
+ isShownByDefault
+ >
+ <>
+
+ setDisplayLayout( {
+ columns: value,
+ } )
+ }
+ min={ 2 }
+ max={ Math.max( 6, displayLayout.columns ) }
+ />
+ { displayLayout.columns > 6 && (
+
+ { __(
+ 'This column count exceeds the recommended amount and may cause visual breakage.'
+ ) }
+
+ ) }
+ >
+
+ ) }
+
{ showOrderControl && (
-
+
+ order !== 'desc' || orderBy !== 'date'
+ }
+ label={ __( 'Order by' ) }
+ onDeselect={ () =>
+ setQuery( { order: 'desc', orderBy: 'date' } )
+ }
+ isShownByDefault
+ >
+
+
) }
+
{ showStickyControl && (
-
- setQuery( { sticky: value } )
- }
- />
+ !! sticky }
+ label={ __( 'Sticky posts' ) }
+ onDeselect={ () => setQuery( { sticky: '' } ) }
+ isShownByDefault
+ >
+
+ setQuery( { sticky: value } )
+ }
+ />
+
) }
-
+
) }
{ ! inherit && showDisplayPanel && (
{
+ if ( filesList?.length > 1 ) {
+ onUploadError( __( 'Only one image can be used as a site logo.' ) );
+ return;
+ }
+
getSettings().mediaUpload( {
allowedTypes: ALLOWED_MEDIA_TYPES,
filesList,
@@ -517,7 +522,6 @@ export default function LogoEdit( {
onInitialSelectLogo( image );
},
onError: onUploadError,
- onRemoveLogo,
} );
};
diff --git a/packages/block-library/src/table-of-contents/edit.js b/packages/block-library/src/table-of-contents/edit.js
index 394ff2666067d4..1b1da0f3d78baa 100644
--- a/packages/block-library/src/table-of-contents/edit.js
+++ b/packages/block-library/src/table-of-contents/edit.js
@@ -10,11 +10,12 @@ import {
} from '@wordpress/block-editor';
import { createBlock } from '@wordpress/blocks';
import {
- PanelBody,
Placeholder,
ToggleControl,
ToolbarButton,
ToolbarGroup,
+ __experimentalToolsPanel as ToolsPanel,
+ __experimentalToolsPanelItem as ToolsPanelItem,
} from '@wordpress/components';
import { useDispatch, useSelect } from '@wordpress/data';
import { renderToString } from '@wordpress/element';
@@ -29,6 +30,7 @@ import { tableOfContents as icon } from '@wordpress/icons';
import TableOfContentsList from './list';
import { linearToNestedHeadingList } from './utils';
import { useObserveHeadings } from './hooks';
+import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
/** @typedef {import('./utils').HeadingData} HeadingData */
@@ -79,7 +81,7 @@ export default function TableOfContentsEdit( {
);
const { replaceBlocks } = useDispatch( blockEditorStore );
-
+ const dropdownMenuProps = useToolsPanelDropdownMenuProps();
const headingTree = linearToNestedHeadingList( headings );
const toolbarControls = canInsertList && (
@@ -108,25 +110,42 @@ export default function TableOfContentsEdit( {
const inspectorControls = (
-
- {
+ setAttributes( {
+ onlyIncludeCurrentPage: false,
+ } );
+ } }
+ dropdownMenuProps={ dropdownMenuProps }
+ >
+ !! onlyIncludeCurrentPage }
label={ __( 'Only include current page' ) }
- checked={ onlyIncludeCurrentPage }
- onChange={ ( value ) =>
- setAttributes( { onlyIncludeCurrentPage: value } )
- }
- help={
- onlyIncludeCurrentPage
- ? __(
- 'Only including headings from the current page (if the post is paginated).'
- )
- : __(
- 'Include headings from all pages (if the post is paginated).'
- )
+ onDeselect={ () =>
+ setAttributes( { onlyIncludeCurrentPage: false } )
}
- />
-
+ isShownByDefault
+ >
+
+ setAttributes( { onlyIncludeCurrentPage: value } )
+ }
+ help={
+ onlyIncludeCurrentPage
+ ? __(
+ 'Only including headings from the current page (if the post is paginated).'
+ )
+ : __(
+ 'Include headings from all pages (if the post is paginated).'
+ )
+ }
+ />
+
+
);
diff --git a/packages/dataviews/src/components/dataviews-footer/style.scss b/packages/dataviews/src/components/dataviews-footer/style.scss
index a5cd4dcac9ca02..d8f205f6c8f75c 100644
--- a/packages/dataviews/src/components/dataviews-footer/style.scss
+++ b/packages/dataviews/src/components/dataviews-footer/style.scss
@@ -6,8 +6,11 @@
padding: $grid-unit-15 $grid-unit-60;
border-top: $border-width solid $gray-100;
flex-shrink: 0;
- transition: padding ease-out 0.1s;
- @include reduce-motion("transition");
+
+ @media not (prefers-reduced-motion) {
+ transition: padding ease-out 0.1s;
+ }
+
z-index: z-index(".dataviews-footer");
}
diff --git a/packages/dataviews/src/components/dataviews/style.scss b/packages/dataviews/src/components/dataviews/style.scss
index 3c85115c06dddf..b44d5b2543f4af 100644
--- a/packages/dataviews/src/components/dataviews/style.scss
+++ b/packages/dataviews/src/components/dataviews/style.scss
@@ -18,8 +18,10 @@
flex-shrink: 0;
position: sticky;
left: 0;
- transition: padding ease-out 0.1s;
- @include reduce-motion( "transition" );
+
+ @media not (prefers-reduced-motion) {
+ transition: padding ease-out 0.1s;
+ }
}
.dataviews-no-results,
@@ -29,8 +31,10 @@
display: flex;
align-items: center;
justify-content: center;
- transition: padding ease-out 0.1s;
- @include reduce-motion( "transition" );
+
+ @media not (prefers-reduced-motion) {
+ transition: padding ease-out 0.1s;
+ }
}
@container (max-width: 430px) {
diff --git a/packages/dataviews/src/dataviews-layouts/grid/style.scss b/packages/dataviews/src/dataviews-layouts/grid/style.scss
index 333e6e9a4caf9f..a741b185572934 100644
--- a/packages/dataviews/src/dataviews-layouts/grid/style.scss
+++ b/packages/dataviews/src/dataviews-layouts/grid/style.scss
@@ -2,10 +2,11 @@
margin-bottom: auto;
grid-template-rows: max-content;
padding: 0 $grid-unit-60 $grid-unit-30;
- transition: padding ease-out 0.1s;
container-type: inline-size;
- @include reduce-motion("transition");
+ @media not (prefers-reduced-motion) {
+ transition: padding ease-out 0.1s;
+ }
.dataviews-view-grid__card {
height: 100%;
diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js b/packages/edit-site/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js
index 11635c6c6abb12..4138280c2ba28e 100644
--- a/packages/edit-site/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js
+++ b/packages/edit-site/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js
@@ -42,7 +42,7 @@ function useDeleteNavigationMenu() {
type: 'snackbar',
}
);
- history.navivate( '/navigation' );
+ history.navigate( '/navigation' );
} catch ( error ) {
createErrorNotice(
sprintf(
diff --git a/test/e2e/specs/editor/blocks/navigation-list-view.spec.js b/test/e2e/specs/editor/blocks/navigation-list-view.spec.js
index 2f9963169a5230..47313590f65794 100644
--- a/test/e2e/specs/editor/blocks/navigation-list-view.spec.js
+++ b/test/e2e/specs/editor/blocks/navigation-list-view.spec.js
@@ -555,7 +555,10 @@ test.describe( 'Navigation block - List view editing', () => {
await editor.openDocumentSettingsSidebar();
- await page.getByLabel( 'Test Menu' ).click();
+ await page
+ .getByRole( 'tabpanel' )
+ .getByRole( 'button', { name: 'Test Menu' } )
+ .click();
await page.keyboard.press( 'ArrowUp' );
diff --git a/test/e2e/specs/editor/various/block-renaming.spec.js b/test/e2e/specs/editor/various/block-renaming.spec.js
index 6998683cb96163..5b7ac1226d1589 100644
--- a/test/e2e/specs/editor/various/block-renaming.spec.js
+++ b/test/e2e/specs/editor/various/block-renaming.spec.js
@@ -126,8 +126,9 @@ test.describe( 'Block Renaming', () => {
await pageUtils.pressKeys( 'primary+a' );
await page.keyboard.press( 'Delete' );
- // Check placeholder for input is the original block name.
+ // Check that input is empty and placeholder is the original block name.
await expect( nameInput ).toHaveAttribute( 'placeholder', 'Group' );
+ await expect( nameInput ).toHaveValue( '' );
// It should be possible to submit empty.
await expect( saveButton ).toBeEnabled();
diff --git a/test/e2e/specs/site-editor/navigation-editor.spec.js b/test/e2e/specs/site-editor/navigation-editor.spec.js
index 64a80e814d6298..2ceaea06ec2d44 100644
--- a/test/e2e/specs/site-editor/navigation-editor.spec.js
+++ b/test/e2e/specs/site-editor/navigation-editor.spec.js
@@ -40,6 +40,10 @@ test.describe( 'Editing Navigation Menus', () => {
canvas: 'edit',
} );
+ await expect(
+ page.getByRole( 'button', { name: 'Document Overview' } )
+ ).toBeVisible();
+
// Open List View.
await pageUtils.pressKeys( 'access+o' );
@@ -54,7 +58,7 @@ test.describe( 'Editing Navigation Menus', () => {
await expect( listView ).toBeVisible();
const navBlockNode = listView.getByRole( 'link', {
- name: 'Navigation',
+ name: 'Primary Menu',
exact: true,
} );