Skip to content

Conversation

@johngodley
Copy link
Contributor

The class components-toolbar appears twice in the DOM, added by <Toolbar /> and <ToolbarContainer />.

devtools_-_latest_local_wp-admin_post_php_post_3294_action_edit

This PR removes the class from <Toolbar /> so it's not passed down to <ToolbarContainer /> and so won't appear twice.

How has this been tested?

  1. Use browser inspector and verify that a block toolbar does not have duplicate components-toolbar on the block toolbar

Types of changes

Minor class removal

`components-toolbar` is added by `ToolbarContainer` itself, so we don’t need to add it again

return (
<ToolbarContainer className={ classnames( 'components-toolbar', className ) }>
<ToolbarContainer className={ className }>
Copy link
Member

Choose a reason for hiding this comment

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

Hi @johngodley, in this file, we are in the components/toolbar component so I think it makes sense to add the class here like we do for the DropdownMenu component, as an alternative I think we should remove the class addition from the ToolbarContainer component.

@jorgefilipecosta jorgefilipecosta added this to the 4.8 milestone Dec 4, 2018
Copy link
Member

@jorgefilipecosta jorgefilipecosta left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@youknowriad youknowriad merged commit 80be381 into master Dec 20, 2018
@youknowriad youknowriad deleted the fix/duplicate-toolbar-class branch December 20, 2018 08:36
youknowriad pushed a commit that referenced this pull request Jan 9, 2019
* Remove duplicate toolbarcontainer class name

`components-toolbar` is added by `ToolbarContainer` itself, so we don’t need to add it again

* Swap components-toolbar between container and toolbar
youknowriad pushed a commit that referenced this pull request Jan 9, 2019
* Remove duplicate toolbarcontainer class name

`components-toolbar` is added by `ToolbarContainer` itself, so we don’t need to add it again

* Swap components-toolbar between container and toolbar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants