Page MenuHomePhabricator

[M] Media Search: Ability to copy the file name and Wikitext snippet in the quick view
Closed, ResolvedPublic

Description

Currently if you are on Commons and you want to quickly copy a filename or the corresponding Wikitext snippet to speed up your editing process on Wikipedia you would need to go to the file page.

Two parts to address this:

  1. Add a new line to the quick view that includes the Wikitext "snippet"
  2. Add a "Copy" action to both the new Wikitext line and the filename line that copies them to your clipboard

Screen Shot 2020-08-31 at 3.19.00 PM.png (1×1 px, 1 MB)

Event Timeline

CBogen renamed this task from Media Search: Ability to copy the file name and Wikitext snippet in the quick view to [M] Media Search: Ability to copy the file name and Wikitext snippet in the quick view.Sep 23 2020, 4:42 PM
mwilliams updated the task description. (Show Details)

@mwilliams I've been looking into this and wanted to run a couple of things by you:

  1. Do you want a different icon for the filename depending on the media type?
  2. We can do this now for the filename, but for the snippet it probably makes the most sense to wait and see if this RFC goes through and we can get search goodies like the snippet, word count, etc. for free.

@AnneT Good idea, having different icons depending on the media type sounds ideal.

We could do something like this:

icon.jpg (176×640 px, 30 KB)

But also, the more I thought about the current icon (and these new ones) the more I questioned if these really signify "File name"? We initially copied these icons from the media viewer but it seems like audio and video file types never show up in the media viewer.

Going to think on that a bit more but if switching to those new ones is easy, maybe we start there?

Thanks! That sounds good; they're easy to swap out so we can change them up down the road.

Change 630957 had a related patch set uploaded (by Anne Tomasevich; owner: Anne Tomasevich):
[mediawiki/extensions/WikibaseMediaInfo@master] Add copyable filename to QuickView and CopyTextLayout component

https://gerrit.wikimedia.org/r/630957

Change 630957 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Add copyable filename to QuickView and CopyTextLayout component

https://gerrit.wikimedia.org/r/630957

Ramsey-WMF added a subscriber: Ramsey-WMF.

This hit production before it went all the way through QA. It woks beautifully on Windows desktop, but fails on mobile (tested on iPhone Safari and Chrome). 😦

@Ramsey-WMF I tested on iPhone Safari (and Mac OS desktop) and it worked fine. Could it be a Safari version?

I tested further on other devices I have and it seems it depends on iOS version. If you're on v. 14 it works! Older iOS versions (11, 12, and some variants of 13) do not work.

Change 656511 had a related patch set uploaded (by Anne Tomasevich; owner: Anne Tomasevich):
[mediawiki/extensions/WikibaseMediaInfo@master] Get CopyTextLayout working in earlier iOS versions

https://gerrit.wikimedia.org/r/656511

Change 656511 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Get CopyTextLayout working in earlier iOS versions

https://gerrit.wikimedia.org/r/656511

Etonkovidova added a subscriber: Etonkovidova.

Checked in commons wmf.30 with additional testing on Safari 11 and iPhone. All seem to be as expected.