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

Remove colons from control labels #65205

Merged
merged 5 commits into from
Sep 11, 2024
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
2 changes: 1 addition & 1 deletion docs/reference-guides/block-api/block-context.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export default function Edit( props ) {
return (
<div>
<TextControl
label={ __( 'Record ID:' ) }
label={ __( 'Record ID' ) }
value={ recordId }
onChange={ ( val ) =>
setAttributes( { recordId: Number( val ) } )
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 @@ -53,7 +53,7 @@ export default function ArchivesEdit( { attributes, setAttributes } ) {
<SelectControl
__next40pxDefaultSize
__nextHasNoMarginBottom
label={ __( 'Group by:' ) }
label={ __( 'Group by' ) }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before After
Archives block inspector, before Archives block inspector, after

options={ [
{ label: __( 'Year' ), value: 'yearly' },
{ label: __( 'Month' ), value: 'monthly' },
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/latest-posts/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
{ displayPostContent && (
<RadioControl
className="wp-block-latest-posts__post-content-radio"
label={ __( 'Show:' ) }
label={ __( 'Show' ) }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before After
Latest Posts block inspector, before Latest Posts block inspector, after

selected={ displayPostContentRadio }
options={ [
{ label: __( 'Excerpt' ), value: 'excerpt' },
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/select-control/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Render a user interface to select multiple users from a list.
```jsx
<SelectControl
multiple
label={ __( 'Select some users:' ) }
label={ __( 'User' ) }
value={ this.state.users } // e.g: value = [ 'a', 'c' ]
onChange={ ( users ) => {
this.setState( { users } );
Expand All @@ -126,7 +126,7 @@ const [ item, setItem ] = useState( '' );
// ...

<SelectControl
label={ __( 'Select an item:' ) }
label={ __( 'My dinosaur' ) }
value={ item } // e.g: value = 'a'
onChange={ ( selection ) => { setItem( selection ) } }
__nextHasNoMarginBottom
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function WidgetTypeSelector( { selectedId, onSelect } ) {
<SelectControl
__next40pxDefaultSize
__nextHasNoMarginBottom
label={ __( 'Select a legacy widget to display:' ) }
label={ __( 'Legacy widget' ) }
value={ selectedId ?? '' }
options={ [
{ value: '', label: __( 'Select widget' ) },
Expand Down
4 changes: 1 addition & 3 deletions test/e2e/specs/widgets/customizing-widgets.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,7 @@ test.describe( 'Widgets Customizer', () => {
const legacyWidgetBlock =
await widgetsCustomizerPage.addBlock( 'Legacy Widget' );
await page
.locator(
'role=combobox[name="Select a legacy widget to display:"i]'
)
.locator( 'role=combobox[name="Legacy widget"i]' )
.selectOption( 'test_widget' );

await expect(
Expand Down
Loading