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

WordPress Trac noreply at wordpress.org
Mon Feb 27 20:31:03 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 ux-       |     Focuses:  ui,
  feedback                                       |  administration
-------------------------------------------------+-------------------------
Changes (by westonruter):

 * keywords:  needs-unit-tests has-patch needs-refresh => needs-unit-tests
     has-patch ux-feedback


Comment:

 Replying to [comment:131 rabmalin]:
 > I was just trying the plugin. I tried to add image and add custom link
 for the image. But when widget is saved, that link settings is not applied
 to the front end. I am talking about `Link To` in attachment modal.

 We just had a [https://wordpress.slack.com/archives/core-
 customize/p1488218944411248 conversation] about this topic in #core-
 customize, about what to do with the “Attachment Display Settings” that
 appear in the media modal, for example the settings that appear for an
 image and a video respectively are:

 [[Image(media-modal-image-attachment-display-settings.png, width=300px)]]
 [[Image(media-modal-video-attachment-display-settings.png, width=300px)]]

 Two main questions arose from the discussion:

 == Are all of the display settings relevant for the media widget? ==

 Are all of the display settings relevant for the media widget?
 For images, should is alignment relevant? (Personally, I do not think so.)
 For audio/video should there be the option to display a media link instead
 of embed the player? (IMHO, no.)
 Does the premise of the media widget include linking to media in addition
 to just displaying media?

 Note that per below, these attachment display settings shown in the media
 selection modal is actually a ''subset'' of all of the fields that a user
 can specify when editing the modal.

 == Where should the attachment display settings appear? ==

 As it stands currently, the media widget seeks to re-use the fields for
 the attachment display settings from the media browser modal (above). This
 is in line with what core does for specifying the display settings when
 selecting media to ''add''. When seeking to ''edit'' the display settings
 for a previously-selected media item, should the display settings fields
 be re-populated with what the user had previously chosen, to then make
 changes, and then hit the Add to Widget button again?

 Something to note here is that in the context of the post editor when
 selecting previously-inserted media to ''edit'' there are actually
 different modal UI for doing editing attachment display settings:

 [[Image(modal-modal-edit-image-attachment-display-settings.png,
 width=350px)]] [[Image(modal-modal-edit-video-attachment-display-
 settings.png, width=350px)]]

 '''☞ Note: There are potentially a ''lot'' of relevant attachment settings
 for video/audio that are not currently being accounted for in the media
 widget. The attachment display settings shown in the media selection modal
 is actually a subset of all of the fields that a user can specify when
 editing the modal.'''

 Another option for where to display the attachment display setting fields
 would be to hide them from the media modal entirely (as is done for media
 modal for selecting the Custom Logo) and then to instead display the
 relevant fields with the selected media in the widget form itself:

 [[Image(proposed-media-widget-inline-form-attachment-display-settings.png,
 width=300px)]]

 This would have a potential additional benefit of the fields being more
 accessible and easier for users to make changes and then see those changes
 in the preview without the media modal being overlaid. That being said,
 adding display fields to the widget can make it cluttered, especially
 considering the many possible settings that need to be considered for the
 video/audio embeds. With that in mind, what if the widget re-used the
 modals for editing display properties for media which is invoked via a
 secondary “Edit Media” (or some other label) button:

 [[Image(proposed-media-widget-edit-media-button.png, width=300px)]]

 When the media is an image, this could then open [attachment:modal-modal-
 edit-image-attachment-display-settings.png] whereas if a video it could
 open [attachment:modal-modal-edit-video-attachment-display-settings.png],
 and similarly for audio.

 So, we have some questions to wrestle through.

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


More information about the wp-trac mailing list