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: return no markup if title is empty #35861

Merged
merged 1 commit into from
Oct 22, 2021

Conversation

carolinan
Copy link
Contributor

@carolinan carolinan commented Oct 22, 2021

Description

If a post has an empty title, then the Post Title block should not return any markup.
Closes #35224

How has this been tested?

  1. Create a post or page without a title
  2. Add a post title block
  3. View the front and confirm that there is no markup for the empty title block.
  4. Add a title to the item and confirm that it still works correctly.

Screenshots

Twenty Twenty Two, single post without title:

Single posts without title has reduced spacing between the header and separator

Types of changes

Enhancement

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).

@carolinan carolinan added the [Block] Post Title Affects the Post Title Block label Oct 22, 2021
@carolinan carolinan requested a review from ajitbohra as a code owner October 22, 2021 06:04
@carolinan carolinan added the [Type] Enhancement A suggestion for improvement. label Oct 22, 2021
Copy link
Member

@Mamaduka Mamaduka left a comment

Choose a reason for hiding this comment

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

Thanks, @carolinan. It works great!

@carolinan carolinan merged commit cfc1c11 into trunk Oct 22, 2021
@carolinan carolinan deleted the update/post-title-markup-when-empty branch October 22, 2021 10:50
@github-actions github-actions bot added this to the Gutenberg 11.9 milestone Oct 22, 2021
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 [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Post Title: return no markup if title is empty
2 participants