-
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
Adjust transition and delay for the between-blocks inserter. #3074
Conversation
This seeks to make this feature visible when needed, but out of the way when not.
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 like this, especially the line removal
Toot toot |
Seems like the delay should be skipped when the button is activated by focus. Feels awkward when tabbing between blocks. |
@@ -463,7 +464,7 @@ | |||
content: ''; | |||
position: absolute; | |||
width: 100%; | |||
height: 10px; | |||
height: 44px; |
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.
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:
gutenberg/editor/components/block-list/style.scss
Lines 415 to 417 in baa0ff7
&:hover:before { | |
height: 44px; | |
} |
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 can't speak to the intent of this particular code, but wanted to point in the direction of #4312, in case it's relevant.
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.
See #4384
This aims to make the between-blocks inserter appear when needed, but out of the way when not. It reduces the visual weight a bit by removing the line. When opening the inserter and hovering a block, the usual blue line still appears.