Can't add description to ToolsPanel as per readme example #42543
Labels
[Package] Components
/packages/components
[Type] Bug
An existing feature does not function as intended
Description
When adding a description inside the ToolsPanel component, using the syntax provided in the component readme example, the layout appears broken:
ToolsPanel
is defining a 2 col grid style, withToolsPanelItem
s styled to span both columns, but any other element inserted in theToolsPanel
will automatically be assigned to a single column. I came across this while working on #42309, in which I'm also using aFlex
component to wrap a couple ofToolsPanelItem
s so they stay on the same line. That works as long asFlex
is the only child ofToolsPanel
; once I add the paragraph the layout breaks as shown above. But it still looks broken even if the other children span both cols:Ideally, the
ToolsPanel
should provide a way to render a semantic description for the controls. Could we perhaps leveragefieldset
andlegend
here?But the styling issue should also be looked into: do we really need it to be a grid if its contents always span both columns?
Step-by-step reproduction instructions
ToolsPanel
component with one or moreToolsPanelItem
s.Screenshots, screen recording, code snippet
No response
Environment info
No response
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
The text was updated successfully, but these errors were encountered: