Skip to content

Conversation

artemiomorales
Copy link
Contributor

What?

Addresses issue #44486 — if a site has no pages, this PR adds a placeholder to the Page List block whenever it is a child of a Navigation block.

Why?

This is to improve the user experience for folks whose main intent is to have no pages; it makes the content in the editor more closely match the published site and reduces clutter.

How?

It adds a placeholder and styling to the Page List block.

Testing Instructions

  • Remove all pages
  • Look at a Navigation block whose child is a Page List (if no such blocks exist on your page, create one)
  • You should see the placeholder displayed

Screenshots or screencast

Screen Shot 2022-11-17 at 5 19 x53 PM

Additional Notes

  • The issue this PR is linked to lists having no menus as a requirement to reproduce this; however, the triggering condition is simply having no pages — as long as the Navigation block is not configured with a menu and the Page List is a child, the new placeholder will appear.
  • I'm not sure if there are any accessibility considerations with this. Please let me know if so!

When there are no pages, the Page List block was showing an
unnecessary notice when it was a child of a Navigation block.

In order to more closely match the rendered front end and reduce
clutter, I instead added a placeholder so that users whose
intent is to have no pages can see a better representation
of their site.
@codesandbox
Copy link

codesandbox bot commented Nov 17, 2022

CodeSandbox logoCodeSandbox logo  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Nov 17, 2022
@github-actions
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @artemiomorales! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@skorasaurus skorasaurus added the [Block] Page List Affects the Page List Block label Nov 20, 2022
@vidhan63-soe
Copy link

If you allow can i help?

@Mamaduka
Copy link
Member

Mamaduka commented Aug 4, 2025

Hi, @artemiomorales

It looks like there's still an ongoing discussion on the issue. I think we can close this as stale until there's a final decision.

@Mamaduka Mamaduka added the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Aug 4, 2025
Copy link

github-actions bot commented Aug 4, 2025

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Type-related labels to choose from: [Type] Automated Testing, [Type] Breaking Change, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] Feature, [Type] New API, [Type] Task, [Type] Technical Prototype, [Type] Performance, [Type] Project Management, [Type] Regression, [Type] Security, [Type] WP Core Ticket, Backport from WordPress Core, Gutenberg Plugin.
  • Labels found: [Status] Stale, First-time Contributor, [Block] Page List.

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

@Mamaduka Mamaduka closed this Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Page List Affects the Page List Block First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants