-
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
Navigation list view: use smaller lock icon #46578
Conversation
Size Change: +151 B (0%) Total Size: 1.32 MB
ℹ️ View Unchanged
|
This is an interesting approach. The way I had envisioned it working was that if a block is locked/controlled then all of the blocks that are locked beneath it would use the smaller icon. I'm not sure which idea is better now :) |
I would vote for:
Also can we add some accessible semantics to these icons so they are perceivable? 🙏 |
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 works great in my testing!
Thanks for the PR! A couple of quick thoughts, none of which are blocking:
Nice work. |
Ok, so then if I understand correctly: we want the small lock for bost page list and page list items on both list and inspector views, and then we use the bigger lock icon for other locked blocks? I'm not sure about the suggestion of changing the opacity of the icons, I don't think we do that anywhere else |
My take is that we don't actually want to use the big lock icon in very many places at all. It's appropriate for the block toolbar of a locked block, so it has some oomph there. But in the list view, where it's repeated in many places, it can be small across the board. |
ddc365b
to
791fa2f
Compare
@@ -319,11 +319,16 @@ | |||
|
|||
.block-editor-list-view-block-select-button__lock { | |||
line-height: 0; | |||
width: 24px; | |||
width: 16px; | |||
min-width: 24px; |
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.
Should we change this too?
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.
no, that makes them look tiny! we are respecting the space of the container because the SVG is still 24px wide. I'm following Joen's codepen of CSS magic for this :D
What?
This PR reduces the size of the lock icon on the off canvas list view
I believe this closes #46191
Why?
The right sidebar has less space and everything was looking very cramped when we have a menu with multiple nesting levels. This helps alleviate that while we keep improving the styles for the menu on the off canvas list view.
How?
Testing Instructions
Insert a navigation block
Add a page list to it in case it doesn't already have it
Check the icons of the page list items on the list view and the right sidebar. They should be small on the later, and bigger on the former.
Screenshots or screencast