Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions editor/modes/visual-editor/sibling-inserter.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,14 @@ class VisualEditorSiblingInserter extends Component {
{ showInsertionPoint && (
<div className="editor-visual-editor__insertion-point" />
) }
{ isVisible && [
<hr
key="rule"
className="editor-visual-editor__sibling-inserter-rule"
/>,
{ isVisible &&
<Inserter
key="inserter"
position="bottom"
insertIndex={ insertIndex }
onToggle={ this.suspendToggleVisible }
/>,
] }
/>
}
</div>
);
}
Expand Down
21 changes: 7 additions & 14 deletions editor/modes/visual-editor/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,8 @@
max-width: $visual-editor-max-width + ( 2 * $block-mover-padding-visible );
margin: 0 auto;
opacity: 0;
transition: 0.1s opacity;
transition: opacity 0.25s ease-in-out;
transition-delay: 0.3s;

&:not( [data-insert-index="0"] ) {
top: #{ -1 * ( $block-spacing / 2 ) };
Expand All @@ -463,7 +464,7 @@
content: '';
position: absolute;
width: 100%;
height: 10px;
height: 44px;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the reason for this change? Was it that it was too difficult to trigger the hover effect? The issue with this is that it aggravates the difficulty in selecting blocks which are short (like single-line paragraphs). The 44px was intended for hover effect only, intentionally overlapping some of the content of the block so that it would be slightly less easy to unhover the between-inserter (related). The natural height would be closer to 28px. At the very least, if we keep this, we need to remove the now-redundant hover style override:

&:hover:before {
height: 44px;
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't speak to the intent of this particular code, but wanted to point in the direction of #4312, in case it's relevant.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #4384

transition: 0.1s height;
transform: translateY( -50% );
}
Expand All @@ -485,17 +486,9 @@
margin: 0;
padding: 4px;
background-color: white;
}
}

.editor-visual-editor__sibling-inserter-rule {
position: absolute;
left: 50%;
top: 50%;
width: 80px;
margin: 0;
margin-top: -1px;
margin-left: -40px;
border: none;
border-top: 2px solid $blue-medium-500;
.dashicon {
vertical-align: bottom;
}
}
}