[wp-trac] [WordPress Trac] #57611: Support the `blockTypes` and `viewport_width` props for remote patterns fetched from Pattern Directory

WordPress Trac noreply at wordpress.org
Fri Feb 3 07:40:21 UTC 2023


#57611: Support the `blockTypes` and `viewport_width` props for remote patterns
fetched from Pattern Directory
-------------------------------------------------+-------------------------
 Reporter:  ntsekouras                           |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Editor                               |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  gutenberg-merge has-patch has-unit-  |     Focuses:
  tests reporter-feedback                        |
-------------------------------------------------+-------------------------

Comment (by ntsekouras):

 >The PR driving this Trac ticket, Gutenberg PR 47677, has has not yet gone
 through a Gutenberg release. It is targeted for GB 15.2. But GB 15.1.0 is
 currently in RC1 and has not yet been final released (targeted for next
 week).

 My understanding was that the specific PR will be part of `15.1` as an
 important one.

 Why?

 1. It's an existing big bug in GB because of the recent move of some
 patterns in PD(part of:
 https://github.com/WordPress/gutenberg/issues/46017). What happens there
 is the patterns are fetched, but not suggested in the respective block
 flows that use them. It's unfortunate that this was missed by everyone and
 only discovered yesterday as part of
 https://github.com/WordPress/gutenberg/issues/44140, where we need to add
 more core patterns.

 2. Because Pattern Directory API sends this field for a while and we were
 just ignoring it. I don't see any risks with that. This field is used to
 suggest patterns with this prop in certain flows, like the
 creation/replace flow of Query Loop or Template Part blocks.
 3. Currently many new patterns are fetched in GB/core from Pattern
 Directory for many reasons. For example:
  a. we don't need to bundle them and maintain them in core
  b. it's really easy to version them in PD with a minimum WP version
 without any changes needed in core files
  c. it's really easy to update them without any file changes



 > The PR it was extracted from has been open since May 21, 2021 (and is
 still open).

 I closed that PR, as it was fixed in mine:
 https://github.com/WordPress/gutenberg/pull/47677. The original PR just
 slipped through the cracks because the focus for a while was add new
 patterns to fetch in GB, which didn't use/needed this property.

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


More information about the wp-trac mailing list