[wp-trac] [WordPress Trac] #57501: Backport the added query args to Pattern_Directory Controller

WordPress Trac noreply at wordpress.org
Thu Jan 19 20:18:20 UTC 2023


#57501: Backport the added query args to Pattern_Directory Controller
-------------------------------------------------+-------------------------
 Reporter:  ntsekouras                           |       Owner:  ntsekouras
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  6.2
Component:  Editor                               |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests gutenberg-  |     Focuses:
  merge has-testing-info needs-testing           |
-------------------------------------------------+-------------------------
Changes (by hellofromTonya):

 * keywords:  has-patch has-unit-tests gutenberg-merge =>
     has-patch has-unit-tests gutenberg-merge has-testing-info needs-
     testing


Comment:

 The code in [https://github.com/WordPress/wordpress-develop/pull/3861 PR
 3861] looks good. Updated a few areas for Core parity and a few tweaks for
 performance.

 Next step: Needs a manual test to make sure it works as intended.

 Copying testing instructions from the original
 [https://github.com/WordPress/gutenberg/pull/45293 Gutenberg PR]:

 {{{
 ## Testing Instructions

 1. Ensure the remote patterns are still loading in the editor — the
 Featured query, the core patterns, and any theme-added patterns.

 Test the API endpoint in a REST client.

 1. Try pagination, ex: `/wp-json/wp/v2/pattern-
 directory/patterns/?per_page=6&page=2` — It should show the middle 6
 patterns on [wordpress.org/patterns/](https://wordpress.org/patterns/).
 2. Try order: `/wp-json/wp/v2/pattern-
 directory/patterns/?category=37&per_page=3&orderby=date&order=asc` —
 should show the last 3 items on
 [wordpress.org/patterns/categories/footer/page/2/](https://wordpress.org/patterns/categories/footer/page/2/)
 3. Make sure search still works `/wp-json/wp/v2/pattern-
 directory/patterns/?search=plants` — should match
 [wordpress.org/patterns/search/plants/](https://wordpress.org/patterns/search/plants/)
 4. Make sure slug still works `/wp-json/wp/v2/pattern-
 directory/patterns/?slug=centered-text-title-with-two-columns` — should
 return a single pattern
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57501#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list