-
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 Block: develop a content-only representation #65699
Comments
How do you see this kind of feature being "declared" for block types. In other words, until now, block types were not aware about whether they are in "content only" mode or not. We only detected blocks that have a "content" role attribute and allowed some specific behavior there. How do you see that evolving, should block types receive some kind of |
I don't think we should abstract this too soon. The navigation block already has a special tab in the inspector, so perhaps it's part of formalizing that view down the road. Conceptually, I don't think blocks should be made aware of "modes". |
I think we can tie this work into the content only stream as well as synced patterns in a few iterative ways.
It may look something like this edit-navigation-example.mp4The above shows two ways of accessing a menu. The first via the content list, and the second via the canvas with an "edit menu" button that just opens inspector with menu tab open. In future we can look at surfacing overridable properties directly vs drilling down like what is proposed above. |
If blocks are not aware of the mode they're in than something like #60412 can't work. Either the block tells the block editor that something is editable in content only, or the block editor designates what is content in content only. We went the first route and the block tells the block editor via the role prop of attributes what's editable in content only. But the navigation block does not really have any content. The content is stored in the navigation link and navigation submenu blocks which are navigation block children. Updating the defition of these two types (link and submenu) to include role content on attributes whcih are content partly gets us there. navigation-content-only.mp4But, what is lost, we can't see the tree of links 😢 However that seems to be an issue for the whole block tree which is flattened in content only.
About 2 there is something else to consider: if a user is only expected to replace pictures and text, then why do we expect them to rearrange the site's hierarchy? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Follow-up from a discussion with @youknowriad we can update content only to:
This is a good start for an exploratory phase which could answer things like:
|
@youknowriad following the PR (#66753) the incipient code and the reviews show that we're fighting the system rather than enriching it, implementing the idea here. Ideally we should reassess what this issue means. The way I read both the descriptio and the answer from @mtias we should start with the navigation block being "special" again. Probably a better approach is to not use the block inspector and just update the navigation block to render a popover with it's tree from inside the block. I'll try this too. |
The two main problems in the PR IMO are:
|
@talldan I've been exploring what you suggested above in #67389 building off your excellent work refactoring all the blockEditingMode stuff to the reducer. The main Issue I've come up against is how we handle blocks such as Page List which frequently appear as children of the Navigation block but which don't have any attributes that warrant Options I've been toying with:
I'd be curious to hear both yours and @draganescu thoughts on this 🙏 |
I'm also wondering whether we need to provide a means to distinguish between block attributes which are We could then incrementally update blocks to render controls for their attributes conditionally. We could then we could swap out the attributes exposed to |
It's interesting. I think part of the issue is that I'm not sure how Page List should ideally work in The one aspect of it that could be an option is changing the parent, so perhaps that's the attribute to add There's also Page List Item, which already has attributes that
If I'm understanding correctly, then there's some past discussion around this subject: |
There should be a way to make edits to your menu while on content-only mode. The canvas edits should be restricted but the inspector menu should be reachable.
We should explore exposing the "menu list view" in the inspector of template parts or patterns that contain a menu when the user is on content-only mode.
There should be a clear way to reach that panel from the toolbar of the nav block and the template/pattern. Could be an "edit menu" that just toggles the inspector with the tab for the menu open.
The text was updated successfully, but these errors were encountered: