#27320 closed task (blessed) (fixed)
Unify media controls
Reported by: | melchoyce | Owned by: | helen |
---|---|---|---|
Milestone: | 3.9 | Priority: | normal |
Severity: | normal | Version: | 3.9 |
Component: | Editor | Keywords: | ui-feedback |
Focuses: | ui, administration | Cc: |
Description
3.9 is bringing us tons of media improvements! This is super exciting. Let's make sure our new media elements have a unified UI. The attached image shows what an image, gallery, audio playlist, video playlist, and audio file currently look like in a post.
To quickly summarize where we currently stand:
- Images have a full-width, transparent black overlay with the "image" icon on the left and "x" on the right
- Galleries have an opaque black overlay with the "gallery" icon and "x" icon clustered together on the left
- Audio and playlists don't have an overlay; editing is brought up by double-clicking the block
How can we make all three of these a consistent experience? Should the "edit" media button be that specific media type's icon (image, gallery, audio, audio playlist, video playlist) or should we use a generic "edit" icon for all of these blocks?
Attachments (14)
Change History (47)
This ticket was mentioned in IRC in #wordpress-ui by melchoyce. View the logs.
11 years ago
This ticket was mentioned in IRC in #wordpress-dev by melchoyce. View the logs.
11 years ago
#4
@
11 years ago
- Component changed from Administration to Editor
- Focuses administration added
- Type changed from enhancement to task (blessed)
I agree with anything that makes things feel consistent, usable, and simple. :-)
I'm not sure if there's a reason why they can't become actual rendered controls, or if we just haven't gotten to it yet, or if gcorne or wonderboymusic are looking into it. Either way: At the very least it'd probably be helpful for audio and video files to have something more than they have now. Even if it's a filename or something.
This ticket was mentioned in IRC in #wordpress-ui by gcorne. View the logs.
11 years ago
This ticket was mentioned in IRC in #wordpress-dev by azaozz. View the logs.
10 years ago
#7
@
10 years ago
- Keywords needs-patch added; ui-feedback removed
Thinking: unified edit icon, using the look the gallery view controls have, definitely adding something to the audio/video placeholders (filename? maybe sneaking something else in if everything else goes smoothly?), keep/add double-click-view/placeholder-to-edit.
#8
@
10 years ago
- Keywords ui-feedback added; needs-patch removed
It is probably worth also considering the audio / video players when deciding how the toolbar and selected states of wpviews might work since @wonderboymusic is trying to get them working. See #27389
#9
@
10 years ago
After discussing various ideas with @melchoyce, I put together an initial patch focused on tightening up the controls for the single image and gallery.
The patch incorporates the work done on #27376 and #27354, as well as trying to address the following:
- Fix issue where the hidden clipboard div was wider than the gallery when the gallery contained a large number of media items.
- Switch to using the pencil
.dashicons-edit
dashicon for both the image and the gallery - Use the gallery style toolbar for both the image and the gallery
- Switch to a pale blue for the gallery selected state. This is the same blue as is used in 3.8 for the placeholders
- Add an outline to the gallery selected state to match the single image selected state a bit better.
#12
@
10 years ago
For the record: moved toolbar to the right for captions and gallery preview as discussed in #wordpress-dev.
#13
@
10 years ago
Idea, as pictured above: in addition to swapping out the "audio" icon in the control overlay to the edit icon, let's use the extra space generated to display the title of the audio file.
#15
@
10 years ago
27320.diff will make the title of the track show up in the MCE view when the shortcode is inserted. I need to spend some more time on this later.
This ticket was mentioned in IRC in #wordpress-ui by melchoyce. View the logs.
10 years ago
This ticket was mentioned in IRC in #wordpress-ui by helen. View the logs.
10 years ago
#20
@
10 years ago
From [27640]:
Unifying media controls and supporting playlists in the editor:
- Support a caption attribute for audio and video shortcodes
- In
wp.media.audio|video
, rename update to shortcode to allow these models to share the same mixins aswp.media.collection
subclasses - When sending an audio or video shortcode to the editor, create a default caption if the user hasn't entered one. This currently only displays in the editor, not on the front end. Captions aren't tied to a specific attachment here because external sources are supported.
- In the
wp.mce.media mixin
, in the edit method, readattr
instead ofdata
when attempting to parse the encoded shortcode. data does not automatically update when the attribute changes. This was a blessing to debug. - Add
wp.mce.media.PlaylistView
to support playlist views in TinyMCE - Expose
WPPlaylistView
to global scope and suppress auto-parsing of playlist nodes when in the admin. AllowWPPlaylistView
to be passed metadata on creation instead of requiring a JSON blob to be parsed. - Remove all of the playlist logic from the
wpgallery
TinyMCE plugin. - In
wp_prepare_attachment_for_js()
return more data for audio/video so that playlists can have parity in the admin/front end.
#23
@
10 years ago
The UX for selecting and deselecting the audio/video views is a bit different that the image selection and gallery selection UX. Personally, I prefer only showing the tools when the view is selected because the focus stays a bit more on the content, and the behavior matches the normal TinyMCE experience when editing images where the controls are shown on click.
#24
follow-up:
↓ 27
@
10 years ago
let's say you click the player because you want to edit the video, what's supposed to happen?
- Does the video play and reveal edit buttons?
- Does the video not play and reveal the edit buttons?
- Does the video play and then get immediately paused, then the modal opens?
When the buttons are already there, it's way more obvious what does what. Open to suggestions...
#25
@
10 years ago
In attachment:27320.mov, highlighting the utility of the "Cancel gallery/playlist" button across different contexts.
The "Cancel [Gallery/Video Playlist/Audio Playlist]" makes sense when the user is creating it initially. In the edit gallery/playlist context, it has no meaning or functionality. We should remove it there.
#26
@
10 years ago
In attachment:27320.5.diff, within the menu initializer methods galleryMenu, playlistMenu, and videoPlaylistMenu, check if we're coming from another state. If not, we can assume the user entered by clicking "Edit" on an existing playlist/gallery.
#27
in reply to:
↑ 24
@
10 years ago
Replying to wonderboymusic:
let's say you click the player because you want to edit the video, what's supposed to happen?
- Does the video play and reveal edit buttons?
- Does the video not play and reveal the edit buttons?
- Does the video play and then get immediately paused, then the modal opens?
When the buttons are already there, it's way more obvious what does what. Open to suggestions...
Definitely a tricky UX problem, so I am curious to hear what others think.
FWIW, another reason for the selected state to be communicated somehow is that when a wpview is selected, you can copy/cut the view or hit the delete key to remove the view. Copying or cutting actually copies from a hidden element containing the text representation of the view.
#29
@
10 years ago
Meant to drop a comment after my last couple of commits noting that audio/video views still need some love. I almost wonder if it would be better if you had to click once to select, then again if you want to play/interact with it.
#30
@
10 years ago
Thought about this and talked to gcorne about it some more - I think having to select a view before interacting with it is the way to go, and then float the controls above the view instead of having dead space or issues with sizing. I'm also going to move the controls back to the left - they get lost if the item is wider than the editor, and muscle memory has been tripping quite a few people up.
I think we should add a control overlay to audio and playlists, personally. Until we have in-post previewing of audio and playlists, however, using each media type's icon will be repetitive, since the block uses an icon to identify what kind of media block it is. If we go with one edit icon for all of the media types, not only will we not have that issue, but we will also have a more consistent experience.
Related: #26797