Page MenuHomePhabricator

[Story] Make it possible to easily clone an existing reference from the same item
Closed, ResolvedPublic

Description

If a reference already exists in an item it should be easy to duplicate the same reference in another statement on the same item.

Event Timeline

Lydia_Pintscher raised the priority of this task from to Medium.
Lydia_Pintscher updated the task description. (Show Details)
Lydia_Pintscher changed Security from none to None.
Lydia_Pintscher added subscribers: Unknown Object (MLST), Lydia_Pintscher.
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).

@Snaterlicious: ideas for how to do the interaction? My first thinking: When adding a new reference have an option to reuse one of the existing ones on the same item. It'd open a list of the existing references to select the one you want to reuse. How do we incorporate re-using references from other items?

Copy and paste is hard-wired to Ctrl+C and Ctrl+V in my mind. Is there a way to make this possible? In addition to some kind of clone icon? Or what about a drag and drop operation?

Not sure if duplicating is the best solution. On Wikipedia we have one reference that we use multiple times. If an url changes, you just have to change it once. If the reference would be duplicated, you would have to do it multiple times (or you risk forgetting the update the others).

We talked about the concept of "subitems" in the past to cover this use case.

This is about lacking exposed identifiers on (RDF) statements and referencing those later on as (RDF) resources. I believe this has a lot broader implications than just the references, and should be carefully considered. For example; a (RDF) statement might in fact be part of a rdfs:Container.

I don't know if focusing on this situation in particular is the right way to go about making it easier to add references. Editors frequently use one source in statements across many items, requiring repeated complete duplication to different pages. Also, individual items often have a reference mostly duplicated in the item, but with a single small change (such as the quote, or page, or URL).

@Yair_rand: you're right. Do you have suggestions for how to cater to those situations?

This isn't an ideal solution, but adding duplicate or near-duplicate references could be made a lot easier by refining the autocomplete and suggestions systems. If I just added two sources (or maybe even just one) with "Stated in: X, page number: Y", and I click "add source", it's a reasonable assumption that the first property will be "stated in", and if that's selected, then the value is likely to be "X", etc. Using quick autocomplete (which includes having the next text box ready before the user is) would allow a quick couple of tab presses (or mouse clicks on the next field/button for the less technically-inclined users) to fill in identical or similar references to those just added.

A four-part reference would still take eight clicks (including the "add" and "save" buttons) each time, which is much slower than I'd like, but far far faster than typing stuff in, waiting, clicking on the suggestion, waiting for the next field to load, typing the value, waiting, etc, etc, four times.

Reference autocomplete and suggestions should also take into account references added to the same item by another user. If possible, it could also take into account similar references on other items, e.g. "stated in" : (book with "chapter" always used as the second source property), would suggest properties and values as appropriate.

This doesn't completely negate the need for straight-duplicating sources, which is a more complicated issue. One solution I can think of would be to make existing references lightly selectable (no special pointer, but a barely-noticeable outline or box-shadow after being clicked either in the header or anywhere outside a link, field, or button, with a system to blur as appropriate), and then listen for an oncopy and feed some JSON into clipboardData.setData. (Maybe give a little "Copied!" message here.) Listen for pasted JSON while references are being added and fill them in (without saving, in case some modifications need doing). Ctrl-C, Ctrl-V, as thiemowmde said. Many users probably won't discover the feature, and making accidentally selecting a source not annoying might be difficult. Not a great solution, but maybe better than nothing. I would recommend prioritizing better autocomplete over this, though.

One option which comes into my mind is to reuse exactly the same reference, and use an URI for it, so that each reference will become an entity itself. This however requires heavy refactoring of the current system, mainly the datamodel and the database structure (so almost everywhere...)

I like the idea of having a dropdown menu to add existing references. However, this should perhaps be a gadget on Wikidata instead of being in Wikibase core. Another option, which should be considered as well is improving the property suggester to also include suggestions on values. This will help to propose existing values (as @Yair_rand pointed out). The suggestions should put much value into the entity the references belong to so that the suggestions will likely propose references already added to the same item.

(For clarification, both features can and should exist at the same time.)

I created DuplicateReferences.js which allows to copy a reference and insert it at other places on the item's page. However, when adding a new reference or editing an existing one, the page has to be reloaded as I haven't yet found a way to insert the links in a nice way yet. Any suggestions or comments are welcome on the talk page of the script. I will make it a gadget as soon as it is useful for most users and usecases.

Jonas renamed this task from make it possible to easily clone an existing reference from the same item to [Story] Make it possible to easily clone an existing reference from the same item.Aug 13 2015, 4:34 PM