[wp-trac] [WordPress Trac] #32417: Add new core media widget

WordPress Trac noreply at wordpress.org
Sat Feb 25 20:22:10 UTC 2017


#32417: Add new core media widget
-------------------------------------------------+-------------------------
 Reporter:  melchoyce                            |       Owner:  melchoyce
     Type:  feature request                      |      Status:  assigned
 Priority:  normal                               |   Milestone:  4.8
Component:  Widgets                              |     Version:  4.3
 Severity:  normal                               |  Resolution:
 Keywords:  needs-unit-tests has-patch needs-    |     Focuses:  ui,
  refresh                                        |  administration
-------------------------------------------------+-------------------------

Comment (by celloexpressions):

 `get_responsive_style()` is setting a `widgth: 100%` on everything, which
 is causing stretching. Most themes should already have `img, video { max-
 width: 100%; }`, and we could also add styles for that scoped with widget
 instances from the core side, so this function should be removed entirely
 as I suggested on GitHub.

 The UI controls here should be consistent with WP_Customize_Media_Control
 to provide a consistent user experience. That means:
 - There should be a visual placeholder when no media is selected.
 - The images shouldn't be clickable (this is what I was referring to
 @aferica).
 - The media should be playable within the widget controls.
 - The text within the widget controls needs to be removed.
 - I don't think we should bring the remove button over since you can
 delete the widget, so that part would be different.

 There's no need to reinvent the wheel and introduce something different
 here. It would be nice to make improvements here, such as clickable
 placeholders, but if we do that we should update the other media UI
 controls to match in the process.

 Themes are encouraged to style MediaElement players. Usually this is done
 by customizing the colors and/or icons. There's no reason that that
 shouldn't also apply to widget by default, just like your global theme
 link colors will also apply to widgets unless you set a different link
 color in widgets with your CSS. Themes could always customize widgets
 further, but by default they should match media in content. At a minimum
 we should make this fix in bundled themes and give theme authors ample
 notice that they may need to update to account for this. Otherwise, sites
 will have oddly-inconsistent results.

 The latest version of the patch has several JS errors that I can quickly
 tack down so I can't test and iterate further right now. Once that's fixed
 I can look at improving the fallback media type behavior.

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


More information about the wp-trac mailing list