-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Display block anchor in List View when set. #31992
Conversation
border-radius: 2px; | ||
display: inline-block; | ||
padding: 2px 6px; | ||
margin: 0 8px; |
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.
8px can be $grid-unit-10
|
||
.block-editor-block-navigation-block-select-button__anchor { | ||
background: rgba(30, 30, 30, 0.1); | ||
border-radius: 2px; |
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 can be $radius-block-ui
} | ||
|
||
&.is-selected .block-editor-block-navigation-block-select-button__anchor { | ||
background: rgba(30, 30, 30, 0.3); |
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 can be rgba( $black, 0.3 )
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.
6b7b32f
to
802ae2e
Compare
@@ -243,6 +243,18 @@ | |||
color: $white; | |||
} | |||
} | |||
|
|||
.block-editor-block-navigation-block-select-button__anchor { | |||
background: rgba(30, 30, 30, 0.1); |
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 hate to bug you again, but this could also be rgba( $black, 0.1 ) 🙈
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 went ahead and pushed a fix.
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.
Nice little addition, looks good to me code wise
It feels like the panel should have a max-width and not grow as the item grows. |
In the future it might be nice to consider allowing the anchor to focus the advanced input in the sidebar. |
This is an existing issue, I just tested: So we can still land this, but it would be good to polish this further. Specifically we can show the block name, a tool on the right, and then through both truncation, max-widths and making the tool be an overlay, ensure that the block name and tool are at least always visible. Shouldn't block this PR, I think. |
Size Change: +141 B (0%) Total Size: 1.62 MB
ℹ️ View Unchanged
|
a29da9e
to
39945ef
Compare
Closes #16307.
See #16296.
When an anchor is set on a block this displays it on the List View. It should help both naming blocks and identifying an important aspect of the site structure. (We should probably truncate long names.)
Video: https://user-images.githubusercontent.com/548849/118816212-3bafd280-b8b2-11eb-9fb7-31d942d606bf.mov