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

Add placeholder to the Button Block #16783

Merged
merged 1 commit into from Jul 29, 2019

Conversation

@marekhrabe
Copy link
Contributor

commented Jul 27, 2019

Description

Adds a new attribute placeholder for the core/button block. This allows block developers and template makers to add initial instructions, just like it is already possible with core/heading and core/paragraph.

I think this change doesn't need any kind of block deprecation - it adds a new attribute and has no effect on the resulting markup. This would be good to confirm during the review.

Fixes: #16618

How has this been tested?

I have tested by manually updating the content source to include the placeholder attribute.

Example content:

<!-- wp:button {"placeholder":"Add Primary Button…"} -->
<div class="wp-block-button"><a class="wp-block-button__link"></a></div>
<!-- /wp:button -->

Screenshots

Code above should render in the editor as:

Screenshot 2019-07-27 at 08 09 40

Types of changes

New feature (non-breaking change which adds functionality)

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
@senadir
Copy link
Contributor

left a comment

this changes seems reasonable to me, I've also checked if they interferes with other tests & and they don't.

@Soean

Soean approved these changes Jul 28, 2019

@mtias mtias merged commit f4206ef into master Jul 29, 2019

1 of 10 checks passed

Milestone It Milestone It
Details
Milestone It Milestone It
Details
Milestone It Milestone It
Details
Milestone It Milestone It
Details
Milestone It Milestone It
Details
Milestone It Milestone It
Details
Milestone It Milestone It
Details
Milestone It Milestone It
Details
Milestone It Milestone It
Details
Travis CI - Pull Request Build Passed
Details

@mtias mtias deleted the add/button-block-placeholder branch Jul 29, 2019

sbardian added a commit to sbardian/gutenberg that referenced this pull request Jul 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.