[wp-trac] [WordPress Trac] #42495: Customizer: Widget-embedded playlist: Incomplete preview

WordPress Trac noreply at wordpress.org
Thu Nov 9 21:02:14 UTC 2017


#42495: Customizer: Widget-embedded playlist: Incomplete preview
--------------------------+--------------------
 Reporter:  bpayton       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.9.1
Component:  Customize     |     Version:  4.9
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+--------------------
Changes (by westonruter):

 * keywords:   => needs-patch
 * milestone:  Awaiting Review => 4.9.1


Comment:

 Good catch. We need to unconditionally enqueue the `wp-playlist` JS
 statically or lazy-load it when selective refresh happens when playlists
 are used.

 For the static route, we'd need to introduce the `enqueue_preview_scripts`
 logic from the media widgets:

 https://github.com/WordPress/wordpress-develop/blob/c994a2e/src/wp-
 includes/widgets/class-wp-widget-media.php#L109-L111
 https://github.com/WordPress/wordpress-develop/blob/c994a2e/src/wp-
 includes/widgets/class-wp-widget-media-video.php#L159-L176

 For the dynamic route, it would require more work. We'd need to sniff out
 whether a playlist is included in the rendered partial and then
 dynamically add the required JS and CSS. This is done in Jetpack for
 infinite scroll. I don't think we'd need to go the dynamic route, however.

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


More information about the wp-trac mailing list