-
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
Try: Show inserter only when block selected for nesting contexts. #20753
Try: Show inserter only when block selected for nesting contexts. #20753
Conversation
Size Change: +137 B (0%) Total Size: 864 kB
ℹ️ View Unchanged
|
@@ -8,6 +8,12 @@ | |||
.has-background & { | |||
margin: ($grid-unit-20 + $block-spacing) $grid-unit-10; | |||
} | |||
|
|||
// Animate appearance. |
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.
I think we should consolidate these with react-spring
cc @youknowriad
Starts work on #20728. It doesn't completely fix it though. What it does is create a generic rule to hide the appender in nesting contexts, until the parent or a child of the same block, is selected.
cb92529
to
6f21762
Compare
@@ -24,3 +30,13 @@ | |||
.block-list-appender > .block-editor-inserter { | |||
display: block; | |||
} | |||
|
|||
|
|||
// Hide the nested appender unless parent or child is selected. |
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.
This PR was created just prior to #20729, and did not account for "lighter DOM" blocks. Serendipitously, such a block was just merged, meaning the rebase caught an issue.
The selector is now slightly more complex, but I've added additional context to explain it.
In #20753 I caused a regression that collapsed the big square appender that exists in an empty columns block, or an empty group block. The only thing that should collapse, until selected, is the black appender button inside blocks like Social Links, Buttons, or Navigation Menu. This PR fixes that regression by scoping the animation to said button.
In #20753 I caused a regression that collapsed the big square appender that exists in an empty columns block, or an empty group block. The only thing that should collapse, until selected, is the black appender button inside blocks like Social Links, Buttons, or Navigation Menu. This PR fixes that regression by scoping the animation to said button.
Starts work on #20728. It doesn't completely fix it though.
What it does is create a generic rule to hide the appender in nesting contexts, until the parent or a child of the same block, is selected.
Not yet addressed is the addition of a label. A behavior of the columns block that used to show the plus in arbitrary situations has not been touched, as that issue does not appear to be present in master anymore.