Include Add menu item text on off canvas editor inserter.#46949
Include Add menu item text on off canvas editor inserter.#46949jorgefilipecosta wants to merge 1 commit into
Conversation
|
Size Change: +12 B (0%) Total Size: 1.31 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 8a1a2ea. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4066741641
|
jameskoster
left a comment
There was a problem hiding this comment.
This makes sense to me, particularly in the context of #46436 where there could be multiple [+] buttons in the future.
| background: var(--wp-admin-theme-color); | ||
| color: #fff; | ||
| } | ||
| padding: 6px 6px 6px 0; |
There was a problem hiding this comment.
Do we need this? It doesn't seem to affect anything when I toggle it off in dev tools 🤔
| return ( | ||
| <Button | ||
| icon={ plus } | ||
| label={ __( 'Add menu item' ) } |
There was a problem hiding this comment.
I don't think this label is needed since it is the same as the button text.
| label={ __( 'Add menu item' ) } |
| <Button | ||
| icon={ plus } | ||
| label={ __( 'Add menu item' ) } | ||
| tooltipPosition="bottom" |
There was a problem hiding this comment.
Is this used? I do not see a tooltip present and because the button text is always visible I don't think it is needed?
aac377c to
8a1a2ea
Compare
|
Hi @jameskoster, @carolinan thank you for the feedback. All of it was applied. This PR should be ready. |
|
Let's pause this one momentarily. There are some on-going design efforts as a part of #36667 which might affect how this button is displayed, and it would be a shame to have to revert. Apologies for the back and forth, but at least we have the PR ready in case this is the direction we want :) |
With the changes on #47853, we are not using a specific block editor for the navigation sidebar anymore. The inserter of the off-canvas menu editor assumes the navigation block or a child is selected. On the navigation sidebar, the navigation block may not be selected, so we need a specific inserter for the navigation sidebar. This PR adds a simple inserter for the navigation sidebar. Given that we previously wanted to have the text "Add menu item" this PR also adds the text to the inserter superseding PR #46949.
Follows a suggestion by @jameskoster and includes "Add menu item" test on the off-canvas menu editor inserter.
Screenshot