diff --git a/packages/block-library/src/template-part/edit/index.js b/packages/block-library/src/template-part/edit/index.js index 4dc0b89640c8ef..ff38401d57ee79 100644 --- a/packages/block-library/src/template-part/edit/index.js +++ b/packages/block-library/src/template-part/edit/index.js @@ -119,7 +119,7 @@ export default function TemplatePartEdit( { - { - setTitle( value ); - const newSlug = cleanForSlug( value ); - setSlug( newSlug ); - if ( status !== 'publish' ) { - setStatus( 'publish' ); - } - setAttributes( { slug: newSlug, postId } ); - } } - onFocus={ ( event ) => event.target.select() } - /> + { title || slug } ); } diff --git a/packages/block-library/src/template-part/editor.scss b/packages/block-library/src/template-part/editor.scss index aed32baffd118f..b21c068ce2918f 100644 --- a/packages/block-library/src/template-part/editor.scss +++ b/packages/block-library/src/template-part/editor.scss @@ -67,7 +67,9 @@ .wp-block-template-part__name-panel { outline: 1px solid transparent; - padding: $grid-unit-10 0 $grid-unit-10 $grid-unit-15; + padding: $grid-unit-10 0 $grid-unit-10 $grid-unit-20; + display: flex; + align-items: center; .components-base-control__field { align-items: center; @@ -89,3 +91,13 @@ box-shadow: 0 0 0 $border-width var(--wp-admin-theme-color); } } + +.block-editor-block-toolbar__slot { + .components-toolbar-group { + order: 1; + } + + .wp-block-template-part__block-control-group { + order: 0; + } +}