Make WordPress Core

Opened 12 years ago

Closed 4 years ago

#22726 closed enhancement (wontfix)

Move 'Insert from URL' tab into the 'Insert Media' tab

Reported by: johnbillion's profile johnbillion Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.5
Component: Media Keywords: has-patch needs-testing
Focuses: ui, javascript Cc:

Description

Should the 'From URL' tab on the left hand side of the new media modal should be moved into the same tab group as 'Upload Files' and 'Media Library' across the top?

It makes no sense in the context of the other tabs on the left, 'Insert Media', 'Create Gallery' and 'Featured Image'.

Attachments (4)

22726.diff (932 bytes) - added by ericlewis 11 years ago.
work in progress
22726.2.patch (1.2 KB) - added by Fab1en 10 years ago.
Make the new tab work but Insert button stay inactive
22726.3.diff (4.0 KB) - added by kucrut 9 years ago.
JS Sources
22726.3.media-views.browserified.diff (3.3 KB) - added by kucrut 9 years ago.
Browserified media-views.js

Download all attachments as: .zip

Change History (16)

#1 @helenyhou
12 years ago

  • Component changed from UI to Media

I would agree. Seems like it only needs to be in the source tab group for "Insert Media", really, since you can't add to a gallery or set a featured image using a URL.

#2 @chrisvanpatten
12 years ago

  • Cc chris@… added

I agree with this. It makes more sense to have those similar options all grouped together.

#3 @ericlewis
11 years ago

  • Focuses ui added
  • Keywords needs-patch added

#4 follow-up: @ericlewis
11 years ago

  • Keywords needs-patch removed

A bit off-topic but related: are users linking to external images very often? Why aren't they taking ownership of the media, downloading and uploading it to their site? Copyright issues, etc.? Should we consider removing this option all-together?

#5 in reply to: ↑ 4 ; follow-up: @helen
11 years ago

  • Milestone changed from Awaiting Review to 4.0

Replying to ericlewis:

Should we consider removing this option all-together?

No. See the work being done on #15490 - when we did post formats user testing, users often went to add media when wanting to insert, say, a YouTube video. It's media, and makes perfect sense to me.

Moving to 4.0 for final decision on either doing this move or wontfix-ing.

#6 in reply to: ↑ 5 @ericlewis
11 years ago

  • Focuses javascript added
  • Keywords needs-patch added

Replying to helen:

when we did post formats user testing, users often went to add media when wanting to insert, say, a YouTube video. It's media, and makes perfect sense to me.

Didn't even realize that. This sounds totally rad and I agree with @johnbillion's suggestion here.

#7 @ericlewis
11 years ago

  • Summary changed from New Media: 'From URL' tab should move to Move 'Insert from URL' tab into the 'Insert Media' tab

@ericlewis
11 years ago

work in progress

#8 @Fab1en
10 years ago

@ericlewis : another use case is when your files are hosted on a CDN : you have ownership of the media but don't want to use your Wordpress server to host it.

#9 @helen
10 years ago

  • Milestone changed from 4.0 to Future Release

No patch, punting.

#10 @Fab1en
10 years ago

I played a bit with this, and faced an issue : the "Insert into Post" action button is not available as long as no attachment is selected in the Library. That seams logical : when the other tab "Upload File" is used, the result is to add a new attachment in the Library and select it.

So here is what I propose : after having inserted an URL in this "From URL" tab, why not creating a new attachment linking to that new URL without referencing an actual file in the uploads directory ? That would allow to represent a YouTube Video with a Video type attachment, and save it for future use. Thanks to MediaElementJS YouTube support, the video could also be played via the Media menu. That would require some tweaks here and there to bypass automatic attachment URL generation (like in wp_get_attachment_url) and display things correctly everywhere.

@Fab1en
10 years ago

Make the new tab work but Insert button stay inactive

@kucrut
9 years ago

JS Sources

@kucrut
9 years ago

Browserified media-views.js

#11 @kucrut
9 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

It took more than what I expected, but I was finally able to make it work. What 22726.3.diff does:

  • Removes the "Insert from URL" menu
  • Adds a new browser router item: "From URL"
  • Manipulate frame's state in wp.media.view.MediaFrame.Post::_fixState() when changing from/to the embed state

The last part feels a bit hacky, but it works :)

I'm not sure about the workflow so I attached two patches. Please apply both patches if you don't want to run grunt browserify.

See also PR for attached patch: https://github.com/xwp/wordpress-develop/pull/120

Version 0, edited 9 years ago by kucrut (next)

#12 @johnbillion
4 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

Closing due to lack of interest, and the fact this view is less frequently seen with the new media workflow in the block editor.

Note: See TracTickets for help on using tickets.