Skip to content

Commit

Permalink
Remove redundant block name from "settings" panels (#40275)
Browse files Browse the repository at this point in the history
* File block

* Table block.

* Image block.

* Image block native.

* Gallery block.

* Audio block.

* Media & text

* Media & text native

* Video

* Video native

* Spacer

* Archives

* Categories.

* Latest comments.

* RSS

* Tag Cloud

* Post excerpt.

* Author

* Login
  • Loading branch information
jasmussen authored Apr 13, 2022
1 parent 3a69baa commit 4753e0e
Show file tree
Hide file tree
Showing 21 changed files with 21 additions and 23 deletions.
2 changes: 1 addition & 1 deletion packages/block-library/src/archives/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function ArchivesEdit( { attributes, setAttributes } ) {
return (
<>
<InspectorControls>
<PanelBody title={ __( 'Archives settings' ) }>
<PanelBody title={ __( 'Settings' ) }>
<ToggleControl
label={ __( 'Display as dropdown' ) }
checked={ displayAsDropdown }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/audio/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ function AudioEdit( {
/>
</BlockControls>
<InspectorControls>
<PanelBody title={ __( 'Audio settings' ) }>
<PanelBody title={ __( 'Settings' ) }>
<ToggleControl
label={ __( 'Autoplay' ) }
onChange={ toggleAttribute( 'autoplay' ) }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/audio/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ function AudioEdit( {
>
<View>
<InspectorControls>
<PanelBody title={ __( 'Audio settings' ) }>
<PanelBody title={ __( 'Settings' ) }>
<ToggleControl
label={ __( 'Autoplay' ) }
onChange={ toggleAttribute( 'autoplay' ) }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/categories/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export default function CategoriesEdit( {
return (
<div { ...useBlockProps() }>
<InspectorControls>
<PanelBody title={ __( 'Categories settings' ) }>
<PanelBody title={ __( 'Settings' ) }>
<ToggleControl
label={ __( 'Display as dropdown' ) }
checked={ displayAsDropdown }
Expand Down
4 changes: 1 addition & 3 deletions packages/block-library/src/file/inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default function FileBlockInspector( {
) }
</PanelBody>
) }
<PanelBody title={ __( 'Text link settings' ) }>
<PanelBody title={ __( 'Settings' ) }>
<SelectControl
label={ __( 'Link to' ) }
value={ textLinkHref }
Expand All @@ -80,8 +80,6 @@ export default function FileBlockInspector( {
checked={ openInNewWindow }
onChange={ changeOpenInNewWindow }
/>
</PanelBody>
<PanelBody title={ __( 'Download button settings' ) }>
<ToggleControl
label={ __( 'Show download button' ) }
checked={ showDownloadButton }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/gallery/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ function GalleryEdit( props ) {
return (
<>
<InspectorControls>
<PanelBody title={ __( 'Gallery settings' ) }>
<PanelBody title={ __( 'Settings' ) }>
{ images.length > 1 && (
<RangeControl
label={ __( 'Columns' ) }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/gallery/v1/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ function GalleryEdit( props ) {
return (
<>
<InspectorControls>
<PanelBody title={ __( 'Gallery settings' ) }>
<PanelBody title={ __( 'Settings' ) }>
{ images.length > 1 && (
<RangeControl
label={ __( 'Columns' ) }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/image/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ export class ImageEdit extends Component {

const getInspectorControls = () => (
<InspectorControls>
<PanelBody title={ __( 'Image settings' ) } />
<PanelBody title={ __( 'Settings' ) } />
<PanelBody style={ styles.panelBody }>
<BlockStyles clientId={ clientId } url={ url } />
</PanelBody>
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/image/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ export default function Image( {
</BlockControls>
) }
<InspectorControls>
<PanelBody title={ __( 'Image settings' ) }>
<PanelBody title={ __( 'Settings' ) }>
{ ! multiImageSelection && (
<TextareaControl
label={ __( 'Alt text (alternative text)' ) }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/latest-comments/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default function LatestComments( { attributes, setAttributes } ) {
return (
<div { ...useBlockProps() }>
<InspectorControls>
<PanelBody title={ __( 'Latest comments settings' ) }>
<PanelBody title={ __( 'Settings' ) }>
<ToggleControl
label={ __( 'Display avatar' ) }
checked={ displayAvatar }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/loginout/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function LoginOutEdit( { attributes, setAttributes } ) {
return (
<>
<InspectorControls>
<PanelBody title={ __( 'Login/out settings' ) }>
<PanelBody title={ __( 'Settings' ) }>
<ToggleControl
label={ __( 'Display login as form' ) }
checked={ displayLoginAsForm }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/media-text/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ function MediaTextEdit( { attributes, isSelected, setAttributes } ) {
};

const mediaTextGeneralSettings = (
<PanelBody title={ __( 'Media & Text settings' ) }>
<PanelBody title={ __( 'Settings' ) }>
<ToggleControl
label={ __( 'Stack on mobile' ) }
checked={ isStackedOnMobile }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/media-text/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class MediaTextEdit extends Component {

return (
<InspectorControls>
<PanelBody title={ __( 'Media & Text settings' ) }>
<PanelBody title={ __( 'Settings' ) }>
<ToggleControl
label={ __( 'Crop image to fill entire column' ) }
checked={ imageFill }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/post-author/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function PostAuthorEdit( {
return (
<>
<InspectorControls>
<PanelBody title={ __( 'Author Settings' ) }>
<PanelBody title={ __( 'Settings' ) }>
{ ! isDescendentOfQueryLoop && !! authors?.length && (
<SelectControl
label={ __( 'Author' ) }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/post-excerpt/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export default function PostExcerptEditor( {
/>
</BlockControls>
<InspectorControls>
<PanelBody title={ __( 'Post Excerpt Settings' ) }>
<PanelBody title={ __( 'Settings' ) }>
<ToggleControl
label={ __( 'Show link on new line' ) }
checked={ showMoreOnNewLine }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/rss/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export default function RSSEdit( { attributes, setAttributes } ) {
<ToolbarGroup controls={ toolbarControls } />
</BlockControls>
<InspectorControls>
<PanelBody title={ __( 'RSS settings' ) }>
<PanelBody title={ __( 'Settings' ) }>
<RangeControl
label={ __( 'Number of items' ) }
value={ itemsToShow }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/spacer/controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default function SpacerControls( {
} ) {
return (
<InspectorControls>
<PanelBody title={ __( 'Spacer settings' ) }>
<PanelBody title={ __( 'Settings' ) }>
{ orientation === 'horizontal' && (
<DimensionInput
label={ __( 'Width' ) }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/table/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ function TableEdit( {
{ ! isEmpty && (
<InspectorControls>
<PanelBody
title={ __( 'Table settings' ) }
title={ __( 'Settings' ) }
className="blocks-table-settings"
>
<ToggleControl
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/tag-cloud/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function TagCloudEdit( { attributes, setAttributes, taxonomies } ) {

const inspectorControls = (
<InspectorControls>
<PanelBody title={ __( 'Tag Cloud settings' ) }>
<PanelBody title={ __( 'Settings' ) }>
<SelectControl
label={ __( 'Taxonomy' ) }
options={ getTaxonomyOptions() }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/video/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ function VideoEdit( {
/>
</BlockControls>
<InspectorControls>
<PanelBody title={ __( 'Video settings' ) }>
<PanelBody title={ __( 'Settings' ) }>
<VideoCommonSettings
setAttributes={ setAttributes }
attributes={ attributes }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/video/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ class VideoEdit extends Component {
) }
{ isSelected && (
<InspectorControls>
<PanelBody title={ __( 'Video settings' ) }>
<PanelBody title={ __( 'Settings' ) }>
<VideoCommonSettings
setAttributes={ setAttributes }
attributes={ attributes }
Expand Down

0 comments on commit 4753e0e

Please sign in to comment.