(Go: >> BACK << -|- >> HOME <<)

Page MenuHomePhabricator

ReferencePreviews: Implement Citation Previews
Closed, ResolvedPublic

Assigned To
None
Authored By
Prtksxna
May 10 2014, 6:16 AM
Referenced Files
F28127421: Bildschirmfoto 2019-02-05 um 16.48.19.png
Feb 5 2019, 3:51 PM
F20197129: image.png
Jun 9 2018, 9:00 PM
F17073322: gmnTY4C.png
Apr 18 2018, 11:20 AM
F8461349: citation-previews.png
Jun 15 2017, 1:16 AM
F13693: reference-tooltips-May6-04.png
Nov 22 2014, 3:14 AM
F13694: references-4-types-23.png
Nov 22 2014, 3:14 AM
Tokens
"Love" token, awarded by Fito."Mountain of Wealth" token, awarded by connorshea."Love" token, awarded by Prtksxna."Like" token, awarded by Ricordisamoa."Like" token, awarded by CennoxX.

Description

Problem:

Jumping down to the references section makes you lose the reading position, and it is sometimes hard to get back up and find the position where you came from. An idea to solve this problem is to have previews for references.

Design of Solution:

Bildschirmfoto 2019-02-05 um 16.48.19.png (486×748 px, 73 KB)

Development Plan:

ReferencePreviews is being implemented as part of the popups extension, by WMDE's Technical Wishes team in collaboration with WMF's Web-Team-Backlog team. It is planned to be released as a beta feature first. For details around the deployment see T214845: Deploying ReferencePreviews

Tickets around this project can also be found through Reference Previews

Update sites on-wiki:


On-wiki implementations (not exhaustive)

(44 wikis enable it as default gadget as of 09-2015: https://meta.wikimedia.org/wiki/Gadgets/wikipedia/default )

Attempts to implement


Original Ticket description

Problem

There is an inconsistency between popovers for references and blue links (Page Previews)

Proposal

There is no reason not to use same UI for Citation Previews as Page Previews. We should use the same library and same look n feel to preview Citations.

Design

citation-previews.png (1×2 px, 917 KB)

We can use bold title "Citation" to make sure people know the difference between Page Previews and Citation Previews

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Any updates on this? We'd like to use this on the PCGamingWiki if possible.

Ricordisamoa changed the task status from Open to Stalled.Apr 3 2015, 11:09 PM

Any updates on this? We'd like to use this on the PCGamingWiki if possible.

As I wrote at https://gerrit.wikimedia.org/r/189167, this task is probably blocked by T88882 (to avoid duplicating code).
Since I've repeatedly failed at tackling the latter, I think we're waiting for @Prtksxna :-\

Any updates on this? We'd like to use this on the PCGamingWiki if possible.

As @Ricordisamoa mentioned, this task is stalled till the time we're done with T88882: Move Hovercards to OOjs and OOjs UI and T88164: Make hovercards default for Catalan and Greek Wikipedias for 2 months starting 2015-04-15. In the meantime you can try applying — https://gerrit.wikimedia.org/r/#/c/189167/ or https://gerrit.wikimedia.org/r/139827 and see if you get required results.

@Prtksxna how's the progress on https://gerrit.wikimedia.org/r/232235 and https://gerrit.wikimedia.org/r/232236?
If they're sufficiently flexible, I can update the patch to use OOjs UI for the dialog only.

@Ricordisamoa I think they are flexible enough. You mean use OOjs UI for the Popup only?

@Ricordisamoa I think they are flexible enough. You mean use OOjs UI for the Popup only?

No, stick with the existing popup and use OOjs UI for the configuration dialog.

@Prtksxna, do you think you have the time and energy to mentor a student in getting Hovercards to its desired shape? Integration with NavPopups etc.

No, stick with the existing popup and use OOjs UI for the configuration dialog.

Ah! Sorry, I misunderstood. Yes, that would make sense. Just one thing to keep in mind, we load Hovercards on every page, and we don't want to load OOjs UI on every page just yet for performance reasons. So, you'll have to load OOjs UI after the settings icon has been clicked, wait for it to load (maybe spin the cog wheel to suggest something is happening) and then open the settings dialog.

In T67114#1730549, @NiharikaKohli wrote:

@Prtksxna, do you think you have the time and energy to mentor a student in getting Hovercards to its desired shape? Integration with NavPopups etc.

That sounds like a good idea, let's talk about it on IRC!

Change 139827 had a related patch set uploaded (by Paladox):
Create render.reference

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

What's the status of this?

Status: Stalled

What's the status of this?

Status: Stalled

Ah sorry, mostly that's the last message in a task then and because there was an open patch I thought there was something else.

Change 139827 abandoned by Jdlrobson:
Create render.reference

Reason:
per prateek

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

Support of parenthetical referencing (also known as Harvard referencing) would be good to have.
A nice way to do it would be to show the full citation below the partial citation.

Change 189167 abandoned by Jdlrobson:
ReferenceTooltips rewritten as a Beta Feature

Reason:
Feel free to reopen/rebase if this is something you think we should do but best to check on T67114 first.

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

Nirzar renamed this task from Hovercards: Show cards for references to Implement Citation Previews.Jun 15 2017, 1:16 AM
Nirzar changed the task status from Stalled to Open.
Nirzar lowered the priority of this task from Medium to Low.
Nirzar updated the task description. (Show Details)

A small note: Russian Wikipedia already uses somewhat unified look to the current Popups extension. It is not as fancy as some of the mockups here are but, in my opinion, these mockups seem too big for this kind of feature. Page Previews seem not as prominent as future Citation Previews in comparison.

Screenshot: https://i.imgur.com/gmnTY4C.png

Upload of @stjn's file, to make sure it doesn't get lost somehow.

gmnTY4C.png (366×668 px, 38 KB)

Another note, i have applied the same stylistic change to English Wikipedia this week and response seems to have been positive so far.

We largely updated Reference Tooltips gadget in ruwiki, and welcome other wikis to update to it. Other suggestion is to create a global gadget based on it.

image.png (236×424 px, 51 KB)

  • Tooltip style & animations are updated to be consistent with Page Previews' style & animations.
  • Many bugs are fixed (see the list here).
  • Harvard-style citations are now supported.
  • Tooltips inside tooltips are now working properly (they did work before, but there were bugs associated with this behaviour). See the animation.
  • An option is added that allows to convert native browser tooltips for titled <abbr> tags and such into gadget tooltips. It is default on touch devices, allowing users of the desktop version on such devices to see them.
  • The settings dialog is rewritten using OOUI (its modules are loaded on demand) and looks similar to the Page Previews settings dialog.
  • Saving the settings doesn't require page reload anymore.
  • The code is refactored. Tooltips & elements having them are objects now. The script used jQuery and pure JavaScript inconsistently – now it uses the first everywhere where appropriate (performance losses are negligable).
  • Old IE support is removed (JavaScript isn't loaded to them anyway).
  • The coding conventions are applied.

See more details at the gadget's mediawiki.org talk page.

@TheDJ

Can't we use this new implementation of Reference Tooltips to fix this bug and make it available to all wikis?
The old implementation is already used by default for everyone on the English Wikipedia, so it should have been tested enough by now.
If necessary, it could be made available as a beta feature in the beginning to make sure the new implementation works everywhere.

However, there are currently two potential issues with Reference Tooltips:

  • The behavior is not consistent: if a reference (the text at the bottom of the page) is visible to the user (i.e. if the citation link's (like [1]) target is visible in the screen), hovering the mouse on the citation link won't show a pop-up with the reference. Instead, the reference at the bottom will just be highlighted. You can see an example here (the citation link is at the right of the screen below the image): try hovering the citation link when the Sources section is visible on the screen or not. Note that this is an intended behavior which can be easily changed in the code and is common to both implementations.
  • The new implementation can show Harvard-style citations in a pop-up. However, it requires that the Harvard-style references links all begin by a common string, by default "#CITEREF". This is the case on the English and Russian wikis, but not yet on the French one for example. Here's an example of an Harvard-style citation (ref number 4 - Henny 1973, pp. 23-29).

See also WMDE Technical Wishes/ReferencePreviews which Reference Tooltips could fulfill.

  • The behavior is not consistent: if a reference (the text at the bottom of the page) is visible to the user (i.e. if the citation link's (like [1]) target is visible in the screen), hovering the mouse on the citation link won't show a pop-up with the reference. Instead, the reference at the bottom will just be highlighted. You can see an example here (the citation link is at the right of the screen below the image): try hovering the citation link when the Sources section is visible on the screen or not. Note that this is an intended behavior which can be easily changed in the code and is common to both implementations.

If this is seen as a disadvantage, this could easily be removed, of course. But the point of this is to hint a user that he can look at the bottom of the window, not hover over reference links, since the References section is near.

@Jack_who_built_the_house thank you for the update in ruwiki.
Would you like to submit it as a patch to gerrit?

Would you like to submit it as a patch to gerrit?

ReferenceTooltips is a gadget. It should not be made part of an extension, where the communities would not have control over it. The change should be implemented by local admins if and when they so choose, not forced on them via the extension.

I'd recommend posting messages on the relevant gadget talk pages to inform the local communities of the available improvements.

Would you like to submit it as a patch to gerrit?

ReferenceTooltips is a gadget. It should not be made part of an extension, where the communities would not have control over it. The change should be implemented by local admins if and when they so choose, not forced on them via the extension.

I'd recommend posting messages on the relevant gadget talk pages to inform the local communities of the available improvements.

I recommend to move code that is widely used in many wikis to extension. This doesn't mean to force it, as we can have an option for opt-out (either as site wide configuration or user preference)

Hi all, I just want to let you know that WMDE's TechnicalWishes team in collaboration with the WMF will implement an extension for reference previews. We are coming to a close with the preparations (see here for details of the current status), and feedback is appreciated here.

Lea_WMDE renamed this task from Implement Citation Previews to ReferencePreviews: Implement Citation Previews.Feb 5 2019, 3:51 PM
Lea_WMDE removed Ricordisamoa as the assignee of this task.
Lea_WMDE raised the priority of this task from Low to Medium.
Lea_WMDE updated the task description. (Show Details)

I have described a slight variant on T224741, or rather an extended functionality.