-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Post Excerpt: add previewPlaceholder
attribute
#49036
Post Excerpt: add previewPlaceholder
attribute
#49036
Conversation
Hi, @gigitux Using attributes for preview purposes isn't ideal. There's a similar discussion for the Site Title block - #48300 (comment). |
Hi, @Mamaduka, thanks for the review! 🙇 (I will close this PR) |
@gigitux, I can't recall any general issue for improving the preview states for blocks that require entities. Maybe @ntsekouras does. |
I don't think there is a general issue for this.. @gigitux could you create one? The problem is twofold:
|
I created #49108. I don't think one approach excludes the other, even if the block is used as a top-level in the site editor. What do you think?
I didn't know anything about the Do you think that using the |
I don't think there is documentation about this, but Regarding the |
Thanks for pointing me to the line of code 🙇
I will work on this in the next weeks! |
What?
This PR adds the
previewPlaceholder
attribute. If defined, the block will show this latter as a placeholder. Also, I updated the default text following the suggestion in the issue.Why?
As I explained in #48964, I'm more inclined to update the preview placeholder in this way:
Unfortunately, retrieving the post type in a block is impossible. So, this is another approach to fixing the issue.
With this approach, a block developer can create a variation of the
Post Excerpt
block and customize the preview placeholder via the attribute.Testing Instructions
previewPlaceholder
attribute.