Skip to content
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

Remove block placeholder in favour of list of Pages as fallback state #42563

Closed
getdave opened this issue Jul 20, 2022 · 1 comment · Fixed by #42735
Closed

Remove block placeholder in favour of list of Pages as fallback state #42563

getdave opened this issue Jul 20, 2022 · 1 comment · Fixed by #42735
Assignees
Labels
[Block] Navigation Affects the Navigation Block

Comments

@getdave
Copy link
Contributor

getdave commented Jul 20, 2022

We are aiming to normalise the behaviour of the Navigation block across both the Editor and the front of the site.

Many Themes utilise the Page List block (as an inner block) as a fallback experience to ensure the user sees some content if a wp_navigation is not assigned to the block.

In #42182 however, we are updating the block to always respect and render inner blocks if they are provided by the block.

This means that any Themes that include the Page List block as part of their default Nav block within their template parts will cause the page list block to be rendered over all other possible content (e.g. wp_navigation posts .etc).

Most Themes will likely want to remove the inner blocks because it will mean they are unable to take advantage of future work to enable automatic selection of menus (based on various heuristics).

As a result we need to update the block to ensure it provides appropriate fallback content. The front of the site already does this by rendering a list of pages. We now need to update the editor implementation to mirror this.

Therefore instead of rendering a placeholder as a default fallback, the block should instead render a Page List block.

As part of this effort we should also tackle #42602 as this will help avoid cluttering the UI.

@getdave getdave added the [Block] Navigation Affects the Navigation Block label Jul 20, 2022
@getdave getdave changed the title Nav block remove placeholder in favour of list of Pages as fallback setup state Remove block placeholder in favour of list of Pages as fallback setup state Jul 20, 2022
@getdave getdave changed the title Remove block placeholder in favour of list of Pages as fallback setup state Remove block placeholder in favour of list of Pages as fallback state Jul 20, 2022
@draganescu draganescu self-assigned this Jul 27, 2022
@draganescu draganescu linked a pull request Aug 2, 2022 that will close this issue
14 tasks
@draganescu
Copy link
Contributor

I have mistakenly rebased #42735 on trunk and getting it back is a pain. If eventually that goes in I'll figure out the authors thing as the PR is branched from this one originally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants