[wp-trac] [WordPress Trac] #48463: Copy link button in media

WordPress Trac noreply at wordpress.org
Sat Jul 4 08:37:51 UTC 2020


#48463: Copy link button in media
-------------------------------------+-------------------------------------
 Reporter:  theolg                   |       Owner:  afercia
     Type:  defect (bug)             |      Status:  closed
 Priority:  normal                   |   Milestone:  5.5
Component:  Media                    |     Version:  5.2
 Severity:  normal                   |  Resolution:  fixed
 Keywords:  has-screenshots has-     |     Focuses:  ui, accessibility,
  patch commit                       |  javascript
-------------------------------------+-------------------------------------

Comment (by afercia):

 Thanks @azaozz. Most of the design / UX discussion happened on #41612,
 where it started around the ''name'' of the input field. Originally, the
 name was "URL" which was reported to be confusing for users:

 > When testing the image widget recently, I found that many of the folks I
 tested with confused the image URL field with a place to add a link to
 their image. It says "URL," so people expect they can select and paste a
 URL into it

 Then, we changed the name to "Copy Link" (see screenshot) and the input
 field was moved to the bottom. In a way, this made things even worse :)

 Finally, there was consensus to add a Button to copy the URL and use a
 clarer name for the field.

 > Before this patch the URL could be copied easily by Ctrl + A followed by
 Ctrl + C (Cmd + A, Cmd + C on Mac). For people that prefer to use a mouse,
 this is triple click + right-click and copy.

 Copying the URL on a mobile device isn't that easy, just to mention one
 case where the new button greatly helps. For mouse users, it is now just
 one click instead of a mix of various mouse/keyboard actions.

 > At the same time the File URL field is an anachronism left over from the
 old old media library popup from WP 2.1. It used to be somewhat useful at
 the time, but currently solicits "not best behavior" for images as using
 the full size is generally not recommended.

 Interesting point. In this regard, at some point on #41612 we did consider
 to remove the input field. See:
 > what about to entirely remove the input field and just use a "Copy link"
 button?

 Re: ths visual glitch:
 > There is also a small visual glitch: when translated the "Copy URL"
 string may get quite longer than the English version. Then the popup
 "Copied!" is pushed underneath but seems stuck to the border/outline.

 I did notice that and can be remediated if really necessary. It's an edge
 case and I did want to keep the patch as simple as possible.

 One more thing in my to-do list is to create a new ticket to propose a wp
 utility function that wraps ClipboardJS to:
 - Make its usage easier and consistent.
 - Work around
 [https://github.com/zenorocha/clipboard.js/issues/created_by/afercia two
 ClipboardJS bugs that I already reported upstream], for more details see
 #50322. In this regard: do we have any direct contact upstream? :)

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


More information about the wp-trac mailing list