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

Custom Post Types with no title support have their first paragraph control bar cut off. #26239

Closed
garretthyder opened this issue Oct 17, 2020 · 3 comments
Labels
[Feature] Blocks Overall functionality of blocks [Type] Bug An existing feature does not function as intended

Comments

@garretthyder
Copy link
Contributor

Describe the bug
If you setup a custom post type with no title support and edit a post of this type in Gutenberg (WP trunk) the first paragaphs control bar is cut off;
Screen Shot 2020-10-17 at 12 02 32 AM

To reproduce
Steps to reproduce the behavior:

  1. Install WP trunk.
  2. Update the functions.php to add a CPT with no title support;
$labels = array(
	'name'               => _x( 'Social posts', 'post type general name', 'text-domain' ),
	'singular_name'      => _x( 'Social post', 'post type singular name', 'text-domain' ),
	'menu_name'          => _x( 'Social posts', 'admin menu', 'text-domain' ),
	'name_admin_bar'     => _x( 'Social post', 'add new on admin bar', 'text-domain' ),
	'add_new'            => _x( 'Add New', 'social-post', 'text-domain' ),
	'add_new_item'       => __( 'Add New Social post', 'text-domain' ),
	'new_item'           => __( 'New Social post', 'text-domain' ),
	'edit_item'          => __( 'Edit Social post', 'text-domain' ),
	'view_item'          => __( 'View Social post', 'text-domain' ),
	'all_items'          => __( 'All Social posts', 'text-domain' ),
	'search_items'       => __( 'Search Social posts', 'text-domain' ),
	'parent_item_colon'  => __( 'Parent Social posts:', 'text-domain' ),
	'not_found'          => __( 'No social-posts found.', 'text-domain' ),
	'not_found_in_trash' => __( 'No social-posts found in Trash.', 'text-domain' )
);
$args = array(
	'labels'             => $labels,
	'description'        => __( 'Description.', 'text-domain' ),
	'public'             => true,
	'publicly_queryable' => true,
	'show_ui'            => true,
	'show_in_menu'       => true,
	'query_var'          => true,
	'rewrite'            => array( 'slug' => 'social-post' ),
	'capability_type'    => 'post',
	'has_archive'        => true,
	'hierarchical'       => false,
	'menu_position'      => 10,
	'menu_icon'          => 'dashicons-id',
	'delete_with_user'   => true,
	'can_export'         => true,
	'show_in_rest'       => true,
	'supports'           => array( 'editor' )
);
register_post_type( 'social-post', $args );
  1. Login to WordPress
  2. Edit a post of the new type.
  3. Go to enter a first paragraph and see the control bar is cut off.

Expected behavior
The control bar should either have a higher z-index or we need to give some space at the top of the editor when there's no title element.

Screenshots
Screen Shot 2020-10-17 at 12 02 32 AM

Version:

  • WordPress Trunk (pre-5.6 beta)

Desktop:
OS: Mac 10.15.7
Browser: Chrome 86.0.4240.75

@talldan talldan added [Feature] Blocks Overall functionality of blocks Needs Testing Needs further testing to be confirmed. labels Oct 19, 2020
@skorasaurus
Copy link
Member

skorasaurus commented Jan 29, 2021

Thanks for the clear report with screenshots and the code to reproduce.

Reproducible in Gutenberg 8.9.2 through Gutenberg 10.1.2

@jeremyfelt
Copy link
Member

I see the same thing in Gutenberg 10.0.2 (WP 5.6.2) with the Twenty Twenty One theme.

Desktop, MacOS 11.2, Brave 1.20.110

@skorasaurus
Copy link
Member

I'm no longer able to reproduce this using the Gutenberg 12.3.1 plugin; I think it's been fixed in #33981

The menu isn't ideal as indicated in the image -
image
but it's no longer cut off. Please reopen if you are still experiencing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants