Skip to content

Commit

Permalink
Revert Site Tagline placeholder attribute, move example to block.json (
Browse files Browse the repository at this point in the history
…#48383)

* Revert Site Tagline placeholder attribute, move example to block.json

* Remove from docs

* Fix bad commit
  • Loading branch information
andrewserong authored Feb 24, 2023
1 parent 5dbd698 commit 186e4c3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/reference-guides/core-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ Describe in a few words what the site is about. The tagline can be used in searc
- **Name:** core/site-tagline
- **Category:** theme
- **Supports:** align (full, wide), anchor, color (background, gradients, text), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Attributes:** placeholder, textAlign
- **Attributes:** textAlign

## Site Title

Expand Down
4 changes: 1 addition & 3 deletions packages/block-library/src/site-tagline/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@
"keywords": [ "description" ],
"textdomain": "default",
"attributes": {
"placeholder": {
"type": "string"
},
"textAlign": {
"type": "string"
}
},
"example": {},
"supports": {
"anchor": true,
"align": [ "wide", "full" ],
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/site-tagline/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function SiteTaglineEdit( {
setAttributes,
insertBlocksAfter,
} ) {
const { placeholder, textAlign } = attributes;
const { textAlign } = attributes;
const { canUserEdit, tagline } = useSelect( ( select ) => {
const { canUser, getEntityRecord, getEditedEntityRecord } =
select( coreStore );
Expand Down Expand Up @@ -57,7 +57,7 @@ export default function SiteTaglineEdit( {
allowedFormats={ [] }
onChange={ setTagline }
aria-label={ __( 'Site tagline text' ) }
placeholder={ placeholder || __( 'Write site tagline…' ) }
placeholder={ __( 'Write site tagline…' ) }
tagName="p"
value={ tagline }
disableLineBreaks
Expand Down
10 changes: 0 additions & 10 deletions packages/block-library/src/site-tagline/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';

/**
* Internal dependencies
*/
Expand All @@ -18,11 +13,6 @@ export { metadata, name };
export const settings = {
icon,
edit,
example: {
attributes: {
placeholder: __( 'A site tagline.' ),
},
},
deprecated,
};

Expand Down

1 comment on commit 186e4c3

@github-actions
Copy link

Choose a reason for hiding this comment

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

Flaky tests detected in 186e4c3.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4259481875
📝 Reported issues:

Please sign in to comment.