What problem does this address?
When the Navigation block is inserted there is a setup/placeholder state that requires the user to select a Menu to be used in the Navigation.
The result of this is that it is possible to insert a Navigation block and not have a Menu selected.
The most important scenario where this might occur is when switching Themes. As we cannot guarantee the Navigation block will be preserved on Theme switch (especially if Nav Areas are omitted from 5.9) it is entirely possible that we might end up in a state where a Navigation block exists in the content but it has no menu assigned to it.
Currently in this scenario the block will render nothing on the front end. This isn't great. Imagine if the Navigation block is in your header and then you switch Themes. Suddenly the front of your site is "broken" because there is no Navigation block.
What is your proposed solution?
In the case that no menu is assigned to a Nav block we should provide a suitable fallback on the site front end (only). Suggestions:
list of the first 4 top level pages.
show the first wp_navigation Post (if available)
something else...?
Let's follow the pattern set in Core by wp_nav_menu as closely as possible.
the function displays
the menu matching the ID, slug, or name given by the menu parameter;
otherwise, the first non-empty menu;
otherwise (or if the menu given by menu is empty), output of the function given by the fallback_cb parameter (wp_page_menu(), by default);
otherwise nothing.
To be clear, it's absolutely fine to have the editor in a "setup state" (i.e. requiring user interaction) but the front end should render something to avoid "broken" states on the front of the website.
What problem does this address?
When the Navigation block is inserted there is a setup/placeholder state that requires the user to select a Menu to be used in the Navigation.
The result of this is that it is possible to insert a Navigation block and not have a Menu selected.
The most important scenario where this might occur is when switching Themes. As we cannot guarantee the Navigation block will be preserved on Theme switch (especially if Nav Areas are omitted from 5.9) it is entirely possible that we might end up in a state where a Navigation block exists in the content but it has no menu assigned to it.
Currently in this scenario the block will render nothing on the front end. This isn't great. Imagine if the Navigation block is in your header and then you switch Themes. Suddenly the front of your site is "broken" because there is no Navigation block.
What is your proposed solution?
In the case that no menu is assigned to a Nav block we should provide a suitable fallback on the site front end (only). Suggestions:
list of the first 4 top level pages.show the firstwp_navigationPost (if available)something else...?Let's follow the pattern set in Core by
wp_nav_menuas closely as possible.To be clear, it's absolutely fine to have the editor in a "setup state" (i.e. requiring user interaction) but the front end should render something to avoid "broken" states on the front of the website.