Repository navigation
Placeholder: Add an illustration option to the Placeholder component - #41605
Conversation
|
Size Change: -575 B (0%) Total Size: 1.24 MB
ℹ️ View Unchanged
|
draganescu
left a comment
There was a problem hiding this comment.
This is great and it works great! Thanks for finding this place for the illustration, didn't occur to me, I thought I'd have to export yet another thing, but it was right there.
I think the addition could improve other blocks as well, to show the under construction state, check out image and table with illustration set to true:
|
Added the Needs Dev Note label in case this needs a dev note (either individual or as part of a "misc" dev note) for WP 6.1 release. |
|
It should need a misc note about |
|
@draganescu would you please add a comment for the Misc Dev note here, please? |
|
In WordPress 6.1 the |


What?
I noticed that we have the same SVG in three places to add an illustration to the Placeholder component. This moves that SVG into a the Placeholder component itself so that we can share the code and simplify the implementation.
Why?
Make it simpler!
How?
This adds a new prop
withIllustrationto the placeholder component, which is used to determine whether to output the illustration. It then removes the illustration from the individual components as well as the associated CSS.Testing Instructions
Screenshots or screencast
Note
The illustration used in the Site Logo block is slightly different to the others, but IMO its better to have consistency.