-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Simplify the BlockBreadcrumb component #6507
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for these improvements @afercia. This test well for me. I left a possible improvement that I think we can make to remove a wrapping div.
|
||
return ( | ||
<NavigableToolbar className={ classnames( 'editor-block-list__breadcrumb', { | ||
<div className={ classnames( 'editor-block-list__breadcrumb', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of using a wrapping div can we pass the className directly in toolbar component? (Toolbar accepts a className prop).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jorgefilipecosta I've tried, but there's a lot of CSS involving also the block contextual toolbar. I can't make the positioning on desktop/mobile work nicely unless completely refactoring the CSS, which I'd like to avoid.
Worth noting with "wide" images, the breadcrumb completely hides the block movers (happens also on master) so I guess the breadcrumb styling will need some adjustments anyway:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @afercia, thank you for clarifying the usage of the div. It looks like in this case cannot avoid it without changes to the toolbar styles.
I made some tests and it looks like everything is working as expected 👍 Thank you for this PR.
This PR aims to simplify the BlockBreadcrumb component and remove some semantics and features that are not needed in this case. For more details, please refer to the related issue #6337
role="toolbar"
(added by NavigableToolbar via NavigableMenu)No visual changes:
Fixes #6337