-
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
Nav block content only representation #67389
base: trunk
Are you sure you want to change the base?
Conversation
// HACK FOR TESTING PURPOSES. | ||
const isNavigationBlock = useSelect( |
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.
Do not ship with this in place.
clientIds={ contentClientIds } | ||
/> | ||
</PanelBody> | ||
{ ! isNavigationBlock && |
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.
We could make this condition some kind of private editor setting. We can then pass in the various blocks we want to enable this behaviour for.
Size Change: +47 B (0%) Total Size: 1.83 MB
ℹ️ View Unchanged
|
Yes this is a simplified version of #66753 and it shows the open questions:
|
💯 and I shameless borrowed some code patterns from your PR there, aiming to distill out the smallest PR possible.
As I see it we should probably start by exploring this as a hardcoded list of blocks that "expose" a List View in contentOnly. We can do this via a private block editor setting which provides a list of blocks which should use this function.
As the list of blocks expands, we can use the above work to shape the correct API. It may be that blocks with controlled inner blocks can opt into some API that exposes a sub tree representation and also opts the block into I'm hesitant to try and come up with an all encompassing API first. @talldan also appears to be doing some related work in #67372 which might allow us to simplify some of this PR. |
What?
WIP
Closes #65699
Why?
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast
Screen.Capture.on.2024-11-28.at.10-45-15.mp4