-
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 Title block: Add placeholder state #28198
Conversation
Size Change: +410 B (0%) Total Size: 1.28 MB
ℹ️ View Unchanged
|
Works as advertised! :) Do you think it would be good to update the actual placeholder content and the block name / description (as outlined here) in this PR? Or to do that separately? |
{ ...( isLink ? {} : blockProps ) } | ||
/> | ||
<TagName { ...( isLink ? {} : blockProps ) }> | ||
{ __( 'Placeholder for post title' ) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if there's a better way to convey this... Maybe something like:
Post title (placeholder)
I also wonder if we can contextualize this placeholder to the actual postType
; So if I'm editing a Page it would say Page title (placeholder)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about what @jameskoster was proposing in his issue linked above - An example title
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it may be worth spending some more time exploring designs for this, and accounting for all different block types. I wouldn't say it needs to hold up this PR.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me from the code side and seems to test well!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah let's merge this and work out what the actual placeholder content should be separately :)
Description
Adds a "placeholder state" for Post Title block. This state is shown when Post Title block is outside of Query block or any other context that could provide an entity for the block.
Fixes #27029
Related #19256
How has this been tested?
Screenshots
Types of changes
Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Checklist: