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

Simplify the BlockBreadcrumb component #6507

Merged
merged 2 commits into from
May 1, 2018

Conversation

afercia
Copy link
Contributor

@afercia afercia commented Apr 30, 2018

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

  • there's. no need for a role="toolbar" (added by NavigableToolbar via NavigableMenu)
  • there's no need for arrows navigation (added by NavigableToolbar via NavigableMenu)
  • IconButton already uses Tooltip

No visual changes:

screen shot 2018-04-30 at 17 33 44

Fixes #6337

@afercia afercia added the [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). label Apr 30, 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.

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', {
Copy link
Member

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).

Copy link
Contributor Author

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:

screen shot 2018-05-01 at 10 26 38

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.

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.

@afercia afercia merged commit 5a5486b into master May 1, 2018
@afercia afercia deleted the update/simplify-blockbreadcrumb branch May 1, 2018 18:55
@mtias mtias added this to the 2.8 milestone May 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants