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

Makes appenders visible only for the current selection #19598

Merged
merged 3 commits into from
Jan 21, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/block-library/src/navigation-link/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ function NavigationLinkEdit( {
</div>
<InnerBlocks
allowedBlocks={ [ 'core/navigation-link' ] }
renderAppender={ hasDescendants ? InnerBlocks.ButtonBlockAppender : false }
renderAppender={ ( hasDescendants && isSelected ) ? InnerBlocks.DefaultAppender : false }
/>
</div>
</Fragment>
Expand Down
6 changes: 6 additions & 0 deletions packages/block-library/src/navigation/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,17 @@
// Polish the Appender.
.wp-block-navigation .block-list-appender {
margin: 0;
width: 28px;
height: 28px;
margin-top: $grid-size/2;
draganescu marked this conversation as resolved.
Show resolved Hide resolved

.block-editor-button-block-appender {
padding: $grid-size;
padding-bottom: $grid-size/2;
padding-top: $grid-size/2;
outline: none;
background: none;
border-radius: 50%;
draganescu marked this conversation as resolved.
Show resolved Hide resolved
}
}
}
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/navigation/style.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.wp-block-navigation {

& > ul {
display: block;
list-style: none;
Expand Down