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

Inserter: new Header, Footer, and Banner patterns not listed #44843

Closed
annezazu opened this issue Oct 10, 2022 · 11 comments
Closed

Inserter: new Header, Footer, and Banner patterns not listed #44843

annezazu opened this issue Oct 10, 2022 · 11 comments
Labels
[Block] Pattern Affects the Patterns Block [Feature] Inserter The main way to insert blocks using the + button in the editing interface [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Type] Bug An existing feature does not function as intended

Comments

@annezazu
Copy link
Contributor

annezazu commented Oct 10, 2022

Description

In testing 6.1 Beta 3, I noticed that the Header category includes the prior patterns, the Footer category doesn't list the new patterns, and the inserter doesn't list the new "Banner" patterns despite prior work done leading up to the release cc @mcsf #44203 & #43157 This is causing the header template part to not have the option to be replaced, since it seems those patterns are missing. cc @ndiego @ironprogrammer can ya'll replicate?

Of note, there's a separate issue here which is interfering with my ability to even find the Header patterns #44842

Step-by-step reproduction instructions

  1. Use 6.1 beta 3.
  2. Open Appearance > Site Editor.
  3. Open Inserter > Patterns.
  4. Select the Header or Footer options. Notice it's missing a bunch of patterns.

Screenshots, screen recording, code snippet

patterns.missing.mov

Environment info

  • WP 6.1-beta3-54428
  • No GB
  • TT3
  • Chrome 106.0.5249.61

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

@annezazu annezazu added [Type] Bug An existing feature does not function as intended [Feature] Inserter The main way to insert blocks using the + button in the editing interface [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Block] Pattern Affects the Patterns Block labels Oct 10, 2022
@annezazu
Copy link
Contributor Author

If I activate the latest version of Gutenberg, I can see them listed (and they include the headings that should be in a banner category):

headerss.mov

@annezazu annezazu changed the title Inserter: new Header and Banner patterns not listed Inserter: new Header, Footer, and Banner patterns not listed Oct 10, 2022
@ironprogrammer
Copy link
Contributor

Hi, @annezazu -- I can replicate this behavior as well.

Reproduction Report

Environment

  • Hardware: MacBook Pro Apple M1 Pro
  • OS: macOS 12.6
  • Browser: Safari 16.0
  • Server: nginx/1.23.1
  • PHP: 7.4.32
  • WordPress: 6.1-beta3-54390-src
  • Theme: twentytwentythree v1.0

Actual Results

  • ✅ New Banner pattern list is not displayed in inserter.
  • ✅ Header and Footer pattern inserter lists are missing expected patterns.

With Gutenberg 14.3.0-rc.1 active, the expected patterns in Header and Footer appear. However, the Banner category is still not displayed.

@priethor
Copy link
Contributor

priethor commented Oct 11, 2022

I can reproduce as well.

Reproduction Report

Environment

  • Hardware: MacBook Pro Apple M1 Pro
  • OS: macOS 12.6
  • Browser: Chrome 105
  • Server: nginx/1.16.0
  • PHP: 7.4.1
  • WordPress: 6.1-beta3
  • Theme: twentytwentythree v1.0

Regarding the banners category itself, as far as I see, #44203 registered the new Banner pattern category, but as of today, none of the existing bundled patterns have been moved to the new category (see @mcsf's comment here). Therefore, the Banner category is not shown in the Inserter, which I don't think is failing per se.

@priethor
Copy link
Contributor

priethor commented Oct 11, 2022

Action items:

@annezazu
Copy link
Contributor Author

Flagged this up in the 6.1 release channel to get help. This is an important, high impact feature to have in for 6.1 and I'm not sure where things went wrong with including the backports here.

@annezazu
Copy link
Contributor Author

Decision was made not to include this in 6.1 and it has been pushed to a future release. Moving this to bumped to 6.2 as a result.

With Gutenberg 14.3.0-rc.1 active, the expected patterns in Header and Footer appear. However, the Banner category is still not displayed.

Noting that in particular the former "heading" patterns are still available under the "Header" category and no banner category is in place for these prior patterns to live. Tied to this, I don't see a banner category in the Pattern directory. I'm going to leave this open even though this won't be going into 6.1.

@priethor
Copy link
Contributor

Backport the bundled patterns from #43157 to WP core, as per #43157 (comment)

To clarify the action item above, can Editor Tech Leads confirm the patterns contained in lib/compat have not been backported to WP core, as they are not available in wp-includes/block-patterns? 🙏

If so, as this has been punted to 6.2, let's move the patterns to the corresponding lib/compat/6.2 to avoid confusion and ease future merges.

cc @ockham @michalczaplinski @c4rl0sbr4v0

@beafialho
Copy link

Reclassify patterns to the Banner category? @beafialho can you help clarify this part?

I can see the bundled header and footer patterns but can confirm I see banner patterns in the Headers category. As mentioned in this comment, the following patterns should be in that category:

  • Large header with left-aligned text
  • Large header with text and a button
  • Media and text in a full height container
  • Media and text with image on the left
  • Media and text with image on the right
  • Event

The ones with the word "header" in them should also probably be renamed. Maybe replacing the word "header" with the word "banner".

@mcsf
Copy link
Contributor

mcsf commented Oct 14, 2022

the following patterns should be in that category:

  • Large header with left-aligned text
  • Large header with text and a button
  • Media and text in a full height container
  • Media and text with image on the left
  • Media and text with image on the right
  • Event

Just a reminder that these live in the pattern directory and so should be fixed there, not in the code-bundled patterns.

@ryelle
Copy link
Contributor

ryelle commented Oct 28, 2022

The original issue that forced Gutenberg to bundle the patterns instead of use the Pattern Directory was fixed, so you should be able to build these in the Pattern Directory and load them from there (either with a new API request with specific slugs, or by adding these to the featured category to auto-load them on all sites). If that's not the case and there are other issues trying to create these on w.org/patterns, please open an issue so we can get it fixed 🙂

@annezazu
Copy link
Contributor Author

annezazu commented Nov 23, 2022

Closing this out as I now see the bundled patterns for headers & footers in the latest version of Gutenberg with this work #45620. Thanks, folks!

Going to open a new issue around ensuring the Pattern Directory's API is used going forward now that an interim solution is in place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Pattern Affects the Patterns Block [Feature] Inserter The main way to insert blocks using the + button in the editing interface [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Type] Bug An existing feature does not function as intended
Projects
No open projects
Development

No branches or pull requests

6 participants