WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.58k stars 4.23k forks source link

Site Editor: Clicking "Browse all footers" shows list of all template parts (not just footers). #41170

Closed johnstonphilip closed 2 years ago

johnstonphilip commented 2 years ago

Description

When I have only a single footer template part in my theme, in the site editor I can click "Browse all Footers", which then takes me to see all of the template parts in my theme, even my header (which is not a footer).

The issue here seems to be that the terminology is wrong. It should say "Browse all Template Parts".

Step-by-step reproduction instructions

  1. Install the Frost FSE theme: https://github.com/wpengine/frost
  2. Go to "Appearance" > "Site Editor".
  3. Click on "Template Parts" in the sidebar.
  4. Click to edit the "footer".
  5. At the top click the toggle-down beside the template part title, and then click on "Browse all Footers".
  6. Notice you are now taken to see all of your site's template parts, not just "footers".

Screenshots, screen recording, code snippet

Screen Shot 2022-05-19 at 3 59 11 PM

Environment info

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Mamaduka commented 2 years ago

@johnstonphilip, it looks like filtering hasn't been implemented yet.

https://github.com/WordPress/gutenberg/blob/0e4747d8e9b26f1317d33ca31c5cd3da2859d476/packages/edit-site/src/components/template-details/index.js#L47-L51

@jameskoster, should we update the label as suggested in the issue?

jameskoster commented 2 years ago

Good catch. Yes I think we should probably update the label until we implement https://github.com/WordPress/gutenberg/issues/36613, or some filtering on the template part list like you mentioned.