Skip to content

Panel Layout breaks if the Control label is short #41671

@namithj

Description

@namithj

Description

Add a text control in a sidebar panel as below
<TextControl label={'Title'} value={postMeta._header_banner_heading} onChange={(value) => setPostMeta({ _header_banner_heading: value })} />

Now add another textcontrol underneath it with a longer label

<TextControl label={'Longer Label'} value={postMeta._header_banner_heading} onChange={(value) => setPostMeta({ _header_banner_heading: value })} />

The first control will break layout and not be full width as all the other controls. The Label should be such that it should be atleast 42px in length for the input field underneath to display correctly as full width.

Step-by-step reproduction instructions

  1. Create a block plugin with a sidebar panel.
  2. Add multiple text controls to it.
  3. Any control with a label where the combined length of character is less than 42px in width wont align with the other controls

Screenshots, screen recording, code snippet

sidebarpanel

Environment info

Wordpress 6.0 Default Theme and Plugins

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs Technical FeedbackNeeds testing from a developer perspective.[Package] Components/packages/components[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions