Page MenuHomePhabricator

Add "copy to clipboard" button to WDQS result view
Closed, DeclinedPublic

Description

Add an option to put TSV-like representation of the data into the clipboard, for pasting later.

This library might be relevant: https://github.com/warpech/sheetclip

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Not sure I get this one - copy-paste the result in which form? What do you expect to see when you paste?

Also, Javascript/browser support for clipboard is kind of iffy, AFAIK.

@Smalyshev, if I see a table of text as the result of the query execution, I expect (in the simplest form) to be able to easily copy it into a text file or a spreadsheet. We already have the "download as TSV" - simply do it via clipboard too. Instead, I have been copy/pasting the entire text of the screen and removing the top portion - works ok, but not as well as TSV-style content copy. As for copying from JavaScript - we have that feature in github and gerrit - works good.

@Smalyshev, I think TSV is a bit too limiting - I added a link to one lib I found about this, but there may be more. Useful features: complex values that may include \n should all go into one cell, links might be good to remain as links. I personally would prefer raw text copy, but I always use "paste raw". Others may want to copy it with links.

@Yurik I'm not sure what's the difference between that library and TSV and it doesn't seem to be documented.

complex values that may include \n should all go into one cell

Such values are very rare as Wikidata values AFAIK

links might be good to remain as links

Not sure what you mean here.

@Smalyshev, there are several aspects of copying table data:

  • copy styling: some people like to copy cell styles from a web site to excel. This is not very relevant to WDQS because we don't use styles much, and other than copying the header row in bold, not much use.
  • copy as links: we show wikidata items and images as links, so some people might want to copy that information too. Pasting text with a link into Excel shows it as a link.
  • copy complex values: these include \t and \n symbols that might be lurking within wikidata data values. Perhaps this is not a problem.

The first and most useful feature would be to simply copy raw TSV text into clipboard. Eventually, we might want to look into supporting link copying and possibly others.

Lydia_Pintscher lowered the priority of this task from Medium to Low.Dec 16 2016, 9:55 AM