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

Post Title: improve preview on the editor site #50147

Conversation

gigitux
Copy link
Contributor

@gigitux gigitux commented Apr 27, 2023

What?

This PR improves the preview of the block on the editor.

Fixes #48963

Why?

Currently, in the editor, the preview of the Post Title is hard-coded, and it is Post Title. Making the preview would improve the user experience.

There is a similar issue for the Post Excerpt block #48964. Also, this PR could be part of this macro issue #49108.

How?

The PR renames the block to Title and updates the label to make it more generic.

Testing Instructions

  1. Edit a template (Single Post, for example).
  2. Add the Title block.
  3. Ensure the preview is generic and can work for other postType templates.

Screenshots or screencast

image

@gigitux gigitux requested a review from ajitbohra as a code owner April 27, 2023 16:52
@gziolo gziolo added [Block] Post Title Affects the Post Title Block [Type] Enhancement A suggestion for improvement. [Package] Block library /packages/block-library Good First Review A PR that's suitable for someone looking to contribute for the first time by reviewing code labels Apr 28, 2023
@gigitux gigitux force-pushed the add/48963-display-post-type-name-as-preview branch from d2309b1 to 5d7e75f Compare June 1, 2023 09:16
@gigitux gigitux force-pushed the add/48963-display-post-type-name-as-preview branch from 5d7e75f to 7112bee Compare June 1, 2023 10:02
@gigitux gigitux requested review from ntwb and nerrad as code owners June 1, 2023 10:02
Copy link
Contributor

@ntsekouras ntsekouras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @gigitux! Code wise this looks good and @jasmussen has agreed with this approach. I'd really love one more opinion though probably by @mtias 😄

@mtias
Copy link
Member

mtias commented Jun 1, 2023

Let's give it a try

@ntsekouras ntsekouras merged commit 828c60a into WordPress:trunk Jun 1, 2023
@github-actions github-actions bot added this to the Gutenberg 16.0 milestone Jun 1, 2023
@jameskoster
Copy link
Contributor

I'm very happy to see this change 😁

Though I must say it now feels a little inconsistent to see the 'Post' prefixes on other blocks. It might be neat to try renaming those too as originally suggested in #26856.

sethrubenstein pushed a commit to pewresearch/gutenberg that referenced this pull request Jul 13, 2023
* rename post-title to title and update labels

* fix E2E test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Title Affects the Post Title Block Good First Review A PR that's suitable for someone looking to contribute for the first time by reviewing code [Package] Block library /packages/block-library [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Post Title: Displays the post type name as preview in the editor
5 participants