Fix missing buttons example#24249
Merged
Soean merged 1 commit intoWordPress:masterfrom Jul 28, 2020
retlehs:fix-missing-buttons-example
Merged
Fix missing buttons example#24249Soean merged 1 commit intoWordPress:masterfrom retlehs:fix-missing-buttons-example
Soean merged 1 commit intoWordPress:masterfrom
retlehs:fix-missing-buttons-example
Conversation
Member
|
The buttons block contains inner blocks of the type example: {
innerBlocks: [
{
name: 'core/button',
attributes: {
className: 'is-style-fill',
backgroundColor: 'vivid-green-cyan',
text: __( 'Call to Action' ),
},
},
],
},If you want to show the example like in the screenshot, you just need to add an empty object: example: {}, |
Contributor
Author
|
@Soean thank you! i updated this PR to just pass the empty please let me know if there's any other changes i should make |
Soean
approved these changes
Jul 28, 2020
Member
Soean
left a comment
There was a problem hiding this comment.
I think it's good for the example preview. Thanks for contributing!
youknowriad
reviewed
Aug 5, 2020
| ), | ||
| icon, | ||
| keywords: [ __( 'link' ) ], | ||
| example: {}, |
Contributor
There was a problem hiding this comment.
maybe we can be more creative and use something close to the two or three buttons pattern here.
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The buttons block is missing an example from the block inserter
The button block has an example, but it isn't used from the inserter
How has this been tested?
I forked and
git clone'd the repo, built the plugin locally and loaded on my local dev WP running 5.4.2 and no other plugins, default themeScreenshots
Before
After
Types of changes
Enhancement: This makes sure that the buttons block preview shows an example
Checklist: