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

WordPress Trac noreply at wordpress.org
Mon Feb 27 07:50:05 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 gonom9):

 Replying to [comment:125 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.
 I don't think `video { max-width: 100% }` is enough to make the video
 element responsive because it changes into a complex composite element
 with `mediaelement.js` library. Instead, `.wp-video { max-width: 100% }`
 or something is required for responsive video but there is no default
 theme which has that style. We need to add it. For images, however,
 you're right. I'll remove the styles for images.

 > 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.
 I totally agree with you here. I will update my patch with these
 improvements.

 > 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.
 Could you give me more details about the error?

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


More information about the wp-trac mailing list