Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 16 months ago

#54623 closed defect (bug) (fixed)

Block Patterns: "Featured" category & patterns missing from inserter

Reported by: ryelle Owned by: hellofromTonya
Priority: normal Milestone: 5.9
Component: Editor Version:
Severity: normal Keywords: has-patch has-test-info commit
Cc: Focuses:

Description

In Gutenberg 11.8, the block patterns were updated to also show a "Featured" category, which loads the featured patterns from the Pattern Directory. See the original gutenberg PR here.

It seems like this was not ported back to core, so the behavior in Gutenberg & core is different.

Attachments (3)

54623.diff (2.6 KB ) - added by ryelle 5 years ago.
Screen Shot 2021-12-14 at 11.19.27 AM.png (788.9 KB ) - added by ryelle 5 years ago.
test-before-after-patch-applied.gif (7.6 MB ) - added by hellofromTonya 5 years ago.
Test Report: Can reproduce ("Before"). Applying the patch ("After"), featured patterns now appear at the end. Works ✅

Change History (9)

@ryelle
5 years ago

This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.


5 years ago

@hellofromTonya
5 years ago

Test Report: Can reproduce ("Before"). Applying the patch ("After"), featured patterns now appear at the end. Works ✅

#2 @hellofromTonya
5 years ago

  • Keywords has-testing-info added
  • Owner set to hellofromTonya
  • Status newreviewing

Test Report

Env:

  • OS: macOS Big Sur
  • Plugins: none activated
  • Theme: TT2
  • WordPress: trunk
  • Localhost: wp-env
  • Browser: Chrome and Edge

Steps

  1. Navigate to Pages
  2. Add a new page
  3. Click on the + icon to toggle the block inserter open
  4. Click on the "Patterns" tab
  5. Either scroll the featured in the left sidebar or click on the "Explore" button to open the Patterns modal.

Expected behavior: Featured patterns should be included.

Results

  • Able to reproduce reported issue
  • Applying the 54623.diff patch resolves the issue ✅

#3 @hellofromTonya
5 years ago

  • Keywords commit added

Marking for commit. Self-assigned to prepare commit.

Note: The hardcoded 26 is the featured category ID from the remote pattern directory, not a cat in Core. Took me a minute to realize why this hardcoded number is used.

#4 @ryelle
5 years ago

Note: The hardcoded 26 is the featured category ID from the remote pattern directory, not a cat in Core. Took me a minute to realize why this hardcoded number is used.

Yeah, that mirrors the behavior in the _load_remote_block_patterns where a similar hardcoded value is set (the core keyword). Hopefully in 6.0 we'll be able to phase that out in favor of loading all the patterns from w.org/patterns :)

Thanks for taking care of the commit!

#5 @hellofromTonya
5 years ago

  • Resolutionfixed
  • Status reviewingclosed

In 52377:

Editor: Add "Featured" patterns from pattern directory to Patterns in block inserter.

This commit backports the remote "Featured" category request and loads it into the Featured Patterns in the block inserter.

Props ryelle.
Fixes #54623.

#6 @wordpressdotorg
16 months ago

  • Keywords has-test-info added; has-testing-info removed
Note: See TracTickets for help on using tickets.