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

Navigation: Add clearance for appender in submenus. #36720

Merged
merged 3 commits into from Dec 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/block-library/src/navigation-submenu/edit.js
Expand Up @@ -520,7 +520,7 @@ export default function NavigationSubmenuEdit( {
! selectedBlockHasDescendants ) ||
// Show the appender while dragging to allow inserting element between item and the appender.
hasDescendants
? InnerBlocks.DefaultAppender
? InnerBlocks.ButtonBlockAppender
: false,
}
);
Expand Down
12 changes: 12 additions & 0 deletions packages/block-library/src/navigation/editor.scss
Expand Up @@ -96,6 +96,18 @@
}
}

// Show even when a child is selected. This is an edgecase just for navigation submenus.
.is-editing > .wp-block-navigation__submenu-container > .block-list-appender {
display: block;
position: static;
}

// Hide when hovering.
.wp-block-navigation__submenu-container .block-list-appender {
display: none;
}


/**
* Colors Selector component
*/
Expand Down