Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply sentence case formatting to PanelBody titles #19901

Merged
merged 2 commits into from
Jan 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/block-editor/src/components/colors/use-colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const InspectorControlsColorPanel = ( props ) => (
export default function __experimentalUseColors(
colorConfigs,
{
panelTitle = __( 'Color Settings' ),
panelTitle = __( 'Color settings' ),
colorPanelProps,
contrastCheckers,
panelChildren,
Expand All @@ -126,7 +126,7 @@ export default function __experimentalUseColors(
textColorTargetRef = targetRef,
} = {},
} = {
panelTitle: __( 'Color Settings' ),
panelTitle: __( 'Color settings' ),
},
deps = []
) {
Expand Down
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 @@ -16,7 +16,7 @@ export default function ArchivesEdit( { attributes, setAttributes } ) {
return (
<>
<InspectorControls>
<PanelBody title={ __( 'Archives Settings' ) }>
<PanelBody title={ __( 'Archives 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 @@ -144,7 +144,7 @@ class AudioEdit extends Component {
/>
</BlockControls>
<InspectorControls>
<PanelBody title={ __( 'Audio Settings' ) }>
<PanelBody title={ __( 'Audio settings' ) }>
<ToggleControl
label={ __( 'Autoplay' ) }
onChange={ this.toggleAttribute( 'autoplay' ) }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/button/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function BorderPanel( { borderRadius = '', setAttributes } ) {
[ setAttributes ]
);
return (
<PanelBody title={ __( 'Border Settings' ) }>
<PanelBody title={ __( 'Border settings' ) }>
<RangeControl
value={ borderRadius }
label={ __( 'Border Radius' ) }
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 @@ -150,7 +150,7 @@ class CategoriesEdit extends Component {

const inspectorControls = (
<InspectorControls>
<PanelBody title={ __( 'Categories Settings' ) }>
<PanelBody title={ __( 'Categories settings' ) }>
<ToggleControl
label={ __( 'Display as Dropdown' ) }
checked={ displayAsDropdown }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/column/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function ColumnEdit( {
/>
</BlockControls>
<InspectorControls>
<PanelBody title={ __( 'Column Settings' ) }>
<PanelBody title={ __( 'Column settings' ) }>
<RangeControl
label={ __( 'Percentage width' ) }
value={ width || '' }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/cover/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ function CoverEdit( {
</BlockControls>
<InspectorControls>
{ !! url && (
<PanelBody title={ __( 'Media Settings' ) }>
<PanelBody title={ __( 'Media settings' ) }>
{ IMAGE_BACKGROUND_TYPE === backgroundType && (
<ToggleControl
label={ __( 'Fixed Background' ) }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/embed/embed-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const EmbedControls = ( props ) => {
</BlockControls>
{ themeSupportsResponsive && blockSupportsResponsive && (
<InspectorControls>
<PanelBody title={ __( 'Media Settings' ) } className="blocks-responsive">
<PanelBody title={ __( 'Media settings' ) } className="blocks-responsive">
<ToggleControl
label={ __( 'Resize for smaller devices' ) }
checked={ allowResponsive }
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 @@ -353,7 +353,7 @@ class GalleryEdit extends Component {
return (
<>
<InspectorControls>
<PanelBody title={ __( 'Gallery Settings' ) }>
<PanelBody title={ __( 'Gallery settings' ) }>
{ images.length > 1 && <RangeControl
label={ __( 'Columns' ) }
{ ...MOBILE_CONTROL_PROPS }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/heading/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function HeadingEdit( {
} } />
</BlockControls>
<InspectorControls>
<PanelBody title={ __( 'Heading Settings' ) }>
<PanelBody title={ __( 'Heading settings' ) }>
<p>{ __( 'Level' ) }</p>
<HeadingToolbar isCollapsed={ false } minLevel={ 1 } maxLevel={ 7 } selectedLevel={ level } onChange={ ( newLevel ) => setAttributes( { level: newLevel } ) } />
</PanelBody>
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/image/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ export class ImageEdit extends Component {
const getInspectorControls = ( imageWidth, imageHeight ) => (
<>
<InspectorControls>
<PanelBody title={ __( 'Image Settings' ) }>
<PanelBody title={ __( 'Image settings' ) }>
<TextareaControl
label={ __( 'Alt Text (Alternative Text)' ) }
value={ alt }
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 @@ -331,7 +331,7 @@ export class ImageEdit extends React.Component {

const getInspectorControls = () => (
<InspectorControls>
<PanelBody title={ __( 'Image Settings' ) } >
<PanelBody title={ __( 'Image settings' ) } >
<TextControl
icon={ 'admin-links' }
label={ __( 'Link To' ) }
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 @@ -63,7 +63,7 @@ class LatestComments extends Component {
return (
<>
<InspectorControls>
<PanelBody title={ __( 'Latest Comments Settings' ) }>
<PanelBody title={ __( 'Latest comments settings' ) }>
<ToggleControl
label={ __( 'Display Avatar' ) }
checked={ displayAvatar }
Expand Down
6 changes: 3 additions & 3 deletions packages/block-library/src/latest-posts/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class LatestPostsEdit extends Component {

const inspectorControls = (
<InspectorControls>
<PanelBody title={ __( 'Post Content Settings' ) }>
<PanelBody title={ __( 'Post content settings' ) }>
<ToggleControl
label={ __( 'Post Content' ) }
checked={ displayPostContent }
Expand Down Expand Up @@ -102,15 +102,15 @@ class LatestPostsEdit extends Component {
}
</PanelBody>

<PanelBody title={ __( 'Post Meta Settings' ) }>
<PanelBody title={ __( 'Post meta settings' ) }>
<ToggleControl
label={ __( 'Display post date' ) }
checked={ displayPostDate }
onChange={ ( value ) => setAttributes( { displayPostDate: value } ) }
/>
</PanelBody>

<PanelBody title={ __( 'Sorting and Filtering' ) }>
<PanelBody title={ __( 'Sorting and filtering' ) }>
<QueryControls
{ ...{ order, orderBy } }
numberOfItems={ postsToShow }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/list/ordered-list-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {

const OrderedListSettings = ( { setAttributes, reversed, start } ) => (
<InspectorControls>
<PanelBody title={ __( 'Ordered List Settings' ) }>
<PanelBody title={ __( 'Ordered list settings' ) }>
<TextControl
label={ __( 'Start Value' ) }
type="number"
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/media-text/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class MediaTextEdit extends Component {
setAttributes( { verticalAlignment: alignment } );
};
const mediaTextGeneralSettings = (
<PanelBody title={ __( 'Media & Text Settings' ) }>
<PanelBody title={ __( 'Media & Text settings' ) }>
<ToggleControl
label={ __( 'Stack on mobile' ) }
checked={ isStackedOnMobile }
Expand Down Expand Up @@ -250,7 +250,7 @@ class MediaTextEdit extends Component {
<InspectorControls>
{ mediaTextGeneralSettings }
<PanelColorSettings
title={ __( 'Color Settings' ) }
title={ __( 'Color settings' ) }
initialOpen={ false }
colorSettings={ colorSettings }
/>
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/navigation-link/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function NavigationLinkEdit( {
</BlockControls>
<InspectorControls>
<PanelBody
title={ __( 'Link Settings' ) }
title={ __( 'Link settings' ) }
>
<TextareaControl
value={ description || '' }
Expand All @@ -117,7 +117,7 @@ function NavigationLinkEdit( {
/>
</PanelBody>
<PanelBody
title={ __( 'SEO Settings' ) }
title={ __( 'SEO settings' ) }
>
<TextControl
value={ title || '' }
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/navigation/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ function Navigation( {
>
<BlockNavigationList clientId={ clientId } />
</PanelBody>
<PanelBody title={ __( 'Text Settings' ) }>
<PanelBody title={ __( 'Text settings' ) }>
<FontSizePicker
value={ fontSize.size }
onChange={ setFontSize }
Expand All @@ -221,7 +221,7 @@ function Navigation( {
{ InspectorControlsColorPanel }
<InspectorControls>
<PanelBody
title={ __( 'Display Settings' ) }
title={ __( 'Display settings' ) }
>
<ToggleControl
checked={ attributes.showSubmenuIcon }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/paragraph/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function ParagraphBlock( {
/>
</BlockControls>
<InspectorControls>
<PanelBody title={ __( 'Text Settings' ) }>
<PanelBody title={ __( 'Text settings' ) }>
<FontSizePicker
value={ fontSize.size }
onChange={ setFontSize }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/pullquote/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class PullQuoteEdit extends Component {
</figure>
<InspectorControls>
<PanelColorSettings
title={ __( 'Color Settings' ) }
title={ __( 'Color settings' ) }
colorSettings={ [
{
value: mainColor.color,
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 @@ -112,7 +112,7 @@ class RSSEdit extends Component {
<ToolbarGroup controls={ toolbarControls } />
</BlockControls>
<InspectorControls>
<PanelBody title={ __( 'RSS Settings' ) }>
<PanelBody title={ __( 'RSS settings' ) }>
<RangeControl
label={ __( 'Number of items' ) }
value={ itemsToShow }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/separator/separator-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
const SeparatorSettings = ( { color, setColor } ) => (
<InspectorControls>
<PanelColorSettings
title={ __( 'Color Settings' ) }
title={ __( 'Color settings' ) }
colorSettings={ [
{
value: color.color,
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/social-link/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const SocialLinkEdit = ( { attributes, setAttributes, isSelected } ) => {
return (
<Fragment>
<InspectorControls>
<PanelBody title={ sprintf( __( '%s Label' ), socialLinkName ) } initialOpen={ false }>
<PanelBody title={ sprintf( __( '%s label' ), socialLinkName ) } initialOpen={ false }>
<PanelRow>
<TextControl
label={ __( 'Link Label' ) }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/spacer/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const SpacerEdit = ( { attributes, isSelected, setAttributes, instanceId, onResi
} }
/>
<InspectorControls>
<PanelBody title={ __( 'Spacer Settings' ) }>
<PanelBody title={ __( 'Spacer settings' ) }>
<BaseControl label={ __( 'Height in pixels' ) } id={ id }>
<input
type="number"
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/spacer/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const SpacerEdit = ( { isSelected, attributes, setAttributes, getStylesFromColor
return (
<View style={ [ defaultStyle, isSelected && styles.selectedSpacer, { height } ] }>
<InspectorControls>
<PanelBody title={ __( 'Spacer Settings' ) } >
<PanelBody title={ __( 'Spacer settings' ) } >
<RangeControl
label={ __( 'Height in pixels' ) }
minimumValue={ minSpacerHeight }
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/table/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ export class TableEdit extends Component {
/>
</BlockControls>
<InspectorControls>
<PanelBody title={ __( 'Table Settings' ) } className="blocks-table-settings">
<PanelBody title={ __( 'Table settings' ) } className="blocks-table-settings">
<ToggleControl
label={ __( 'Fixed width table cells' ) }
checked={ !! hasFixedLayout }
Expand All @@ -577,7 +577,7 @@ export class TableEdit extends Component {
/>
</PanelBody>
<PanelColorSettings
title={ __( 'Color Settings' ) }
title={ __( 'Color settings' ) }
initialOpen={ false }
colorSettings={ [
{
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 @@ -66,7 +66,7 @@ class TagCloudEdit extends Component {

const inspectorControls = (
<InspectorControls>
<PanelBody title={ __( 'Tag Cloud Settings' ) }>
<PanelBody title={ __( 'Tag Cloud settings' ) }>
<SelectControl
label={ __( 'Taxonomy' ) }
options={ taxonomyOptions }
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 @@ -178,7 +178,7 @@ class VideoEdit extends Component {
/>
</BlockControls>
<InspectorControls>
<PanelBody title={ __( 'Video Settings' ) }>
<PanelBody title={ __( 'Video 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 @@ -222,7 +222,7 @@ class VideoEdit extends React.Component {
{ toolbarEditButton }
</BlockControls> }
<InspectorControls>
<PanelBody title={ __( 'Video Settings' ) }>
<PanelBody title={ __( 'Video settings' ) }>
<VideoCommonSettings
setAttributes={ setAttributes }
attributes={ attributes }
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-tests/specs/editor/blocks/heading.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe( 'Heading', () => {
const CUSTOM_COLOR_TEXT = 'Custom Color';
const CUSTOM_COLOR_BUTTON_X_SELECTOR = `//button[contains(text(),'${ CUSTOM_COLOR_TEXT }')]`;
const COLOR_INPUT_FIELD_SELECTOR = '.components-color-palette__picker .components-text-control__input';
const COLOR_PANEL_TOGGLE_X_SELECTOR = '//button[./span[contains(text(),\'Color Settings\')]]';
const COLOR_PANEL_TOGGLE_X_SELECTOR = '//button[./span[contains(text(),\'Color settings\')]]';

beforeEach( async () => {
await createNewPost();
Expand Down