-
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
List View: Reduce whitespace and always show nested blocks #28029
Conversation
Size Change: -21.6 kB (-2%) Total Size: 1.28 MB
ℹ️ View Unchanged
|
…ton. This makes the whole row clickable, regardless of indentation.
I tried this, but started to get over my head pretty quickly; The
Done.
I find this a little strange, too. I think its something to change as part of resolving #27395. |
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 is working well, I enjoyed seeing how much code has been removed 🎉
Couple of minor questions related to the changes, but I don't think anything that's a blocker.
packages/block-editor/src/components/block-navigation/descender-lines.js
Outdated
Show resolved
Hide resolved
|
||
<BlockNavigationTree | ||
blocks={ hasHierarchy ? [ rootBlock ] : rootBlocks } | ||
selectedBlockClientId={ selectedBlockClientId } | ||
selectBlock={ selectBlock } | ||
__experimentalFeatures={ __experimentalFeatures } | ||
showNestedBlocks | ||
/> |
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.
The hasHierarchy ? [ rootBlock ] : rootBlocks
bit and the associated code in the withSelect
function lower down in this file means that when a child block is selected, ListView zooms in to only show a limited part of the tree.
So that could be changed as well. I wonder if it might be good to make the changes to ListView's logic a separate PR?
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 couldn't quite wrap my brain around this logic — its very strange to me, but its the existing behavior. I'm happy to change it, but it might make more sense in a separate PR, perhaps along with adding a sidebar for this list view.
Before:
After:
This PR does a few small things: