Footnotes content should appear in a tooltip (add ReferenceTooltips to Cite as default/option)
OpenPublic

Assigned To
None
Priority
Normal
Author
bzimport
Subscribers
Meno25, Gadget850, Nemo_bis and 4 others
Projects
Tokens
"Love" token, awarded by He7d3r.
Reference
bz7908
Description

Author: le.korrigan

Description:
The content of a footnote (or the beginning of it, until XX characters) could
appear in a tooltip when the mouse pointer is over the reference link : this
way, short notes are visible while reading, which is better for the reader.


Version: unspecified
Severity: enhancement

bzimport added a project: Cite.Via ConduitNov 21 2014, 9:29 PM
bzimport added a subscriber: Unknown Object (MLST).
bzimport set Reference to bz7908.
bzimport created this task.Via LegacyNov 13 2006, 10:40 AM
bzimport added a comment.Via ConduitNov 13 2006, 11:46 AM

Beetstra.wiki wrote:

I might have a look at this one, I'm busy revamping cite.php anyway (see
http://bugzilla.wikimedia.org/show_bug.cgi?id=423)!

bzimport added a comment.Via ConduitNov 13 2006, 11:47 AM

robchur wrote:

When assigning bugs, please *do it right*. Thanks.

bzimport added a comment.Via ConduitJan 6 2007, 3:55 PM

Beetstra.wiki wrote:

Reference in tooltip

Added a bit of javascript which adds a title to the id of the reference.

attachment cite tooltip.patch ignored as obsolete

bzimport added a comment.Via ConduitJan 6 2007, 10:02 PM

Beetstra.wiki wrote:

new patch

This patch puts the text of the reference into the title-field of the tooltip.
In this way people will be able to see the text of the reference by hovering
over the reference, and they do not need to scroll all the way down (which is
distracting when reading the document).

A demo is running on chemistry.poolspares.com, though it is there combined with
the patch on bug 423.

attachment cite tooltip.patch ignored as obsolete

bzimport added a comment.Via ConduitJan 6 2007, 10:47 PM

Beetstra.wiki wrote:

reference in tooltip

cleaner references, for comments see previous patch

attachment cite tooltip.patch ignored as obsolete

bzimport added a comment.Via ConduitJan 7 2007, 7:50 PM

Beetstra.wiki wrote:

new patch

updated patch, remove an error

attachment cite tooltip.patch ignored as obsolete

bzimport added a comment.Via ConduitJan 8 2007, 11:31 AM

Beetstra.wiki wrote:

tooltip patch

(previous patch was broken)

attachment cite tooltip.patch ignored as obsolete

hashar added a comment.Via ConduitJan 13 2007, 2:25 PM

Commited as r19202

brion added a comment.Via ConduitJan 13 2007, 10:12 PM

Reverted; this needs work. A few notes:

  • Raw HTML code in messages seems rather... icky. Fragile and likely to fail due

to mistakes or customization gone awry. :)

  • When generating JavaScript literal strings, you should probably use

Xml::escapeJsString rather than trying to roll your own escape function; this
keeps things consistent and is probably safer (eg newlines and escapes are
already handled in a common place)

  • Don't forget to run the parser tests, and update them if necessary. This patch

breaks 10 test cases.

  • The use of JavaScript seems pretty weird here to begin with. Why use JS at

all? It harms compatibility and is probably more fragile than simply putting the
title attribute where it belongs in the first place.

bzimport added a comment.Via ConduitJan 13 2007, 10:21 PM

Beetstra.wiki wrote:

I'll quick-reply to this.

  • Understood, they have to move to the main code. Don't need customisation, anyway.
  • I'll look into the documentation for that.
  • Ke, asked for testing, but will try to run them myself as well.
  • Nope, doesn't work, references are not by definition known at the moment the HTML of the inline

reference mark is generated, so have to be supplied later anyway. Another problem there is that it
is wikitext, which does not have the possibility to add a custom title.

bzimport added a comment.Via ConduitJan 14 2007, 7:07 PM

Beetstra.wiki wrote:

refs in tooltip

Added tooltips and adapted citeparsertests.txt

Re previous comments:

  • Changed rendering of javatext title parameter
  • Parsertests.php does not give more errors than before.
  • internationalisation removed (these parameters do not require

customisation/internationalisation)

  • Added comment in code on why Java and why there

Please test and check, this is my first Javascript addition. Hope this is all
correct.

attachment cite tooltip.patch ignored as obsolete

bzimport added a comment.Via ConduitJul 16 2007, 10:02 AM

mike wrote:

refs in tooltip updated

I updated the patch to make it working on the latest revision.

There's a big problem with this implementation : tooltip content is displayed in raw HTML. If there's a link, bold or anything in the ref tag, HTML tags are included in the tooltip.

I see two ways to avoid that :

  • Remove HTML tags and only display content (probably error prone).
  • Replace the tooltip with real HTML rendered by the browser (probably complex javascript code).

Attached: cite_tooltip_updated.patch

brion added a comment.Via ConduitJul 16 2007, 3:48 PM

Hmmmm, it might be cleaner to do a ful display in client-side JS. Since the reference's contents get rendered later on the page, they can be fairly straightforwardly retrieved at display time by JS and copied into a floating box which is shown on mouseover.

Using a trimmed and HTML-stripped text for a 'title' attribute might also be a little extra helper suitable for browsers with JS disabled or unavailable.

Tgr added a comment.Via ConduitOct 16 2007, 7:53 PM
  • Bug 11515 has been marked as a duplicate of this bug. ***
bzimport added a comment.Via ConduitNov 19 2007, 12:36 PM

folengo wrote:

I am not quite sure "tooltip" is the right wording. I would rather call it a "pop up". They have it on an internet site I know, for example on that page : http://www.nonfiction.fr/article-171-hobsbawm_et_le_bicentenaire_de_la_revolution.htm

I find it convenient and, well... "cool".

bzimport added a comment.Via ConduitAug 12 2008, 11:05 AM

le.korrigan wrote:

There is a possibility in JavaScript on http://fr.wikipedia.org/wiki/Utilisateur:Deep_silence/ReferencesPopup.js

bzimport added a comment.Via ConduitDec 31 2008, 10:41 PM

ncw33 wrote:

The Cite extension is not really the place to implement this. As user javascript, it is stable and well implemented (see [[Wikipedia:Tools/Navigation popups]]). If you have no intention of fixing the code, this could be closed on the basis of being already fixed there.

Peachey88 added a comment.Via ConduitApr 30 2011, 12:09 AM

*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*

bzimport added a comment.Via ConduitNov 14 2011, 4:50 PM

sumanah wrote:

Mike, thanks for the patch.

(In reply to comment #13)

Hmmmm, it might be cleaner to do a ful display in client-side JS. Since the
reference's contents get rendered later on the page, they can be fairly
straightforwardly retrieved at display time by JS and copied into a floating
box which is shown on mouseover.

Using a trimmed and HTML-stripped text for a 'title' attribute might also be a
little extra helper suitable for browsers with JS disabled or unavailable.

Per this review by Brion, I'm marking this patch as reviewed. Do you have time and/or interest in revising your patch? Thanks again!

He7d3r added a comment.Via ConduitAug 10 2012, 1:07 AM

For the record, this was implemented as a default gadget on English Wikipedia.
See:

bzimport added a comment.Via ConduitAug 21 2012, 1:56 PM

zedlightman wrote:

There is discussion here:
*http://en.wikipedia.org/wiki/User_talk:Yair_rand/ReferenceTooltips

Nemo_bis added a comment.Via ConduitMar 6 2013, 3:30 PM

Updating summary.
Should this become the new default or just an option?
Would making it the default save parsing time?
If default, does having the notes render in HTML in the same point where they are in wikitext save parsing time? From hearsay: the parser doesn't enjoy fetching the last chunk of the HTML from all over the wikitext of the page, right?

waldyrious added a comment.Via ConduitMar 6 2013, 6:04 PM

I like the idea of having the ReferenceTooltips as default. Maybe it should be integrated with Extension:Cite.

However, I'd like the title attribute of the <sup>'d reference links to be generated in HTML, for maximum compatibility and accessibility. These could then be removed by JS as it dynamically adds the rich tooltip (the progressive enhancement pattern). Interestingly, pure-html toolstips can even be slighly formatted with control characters such as line breaks and tabs (see http://stackoverflow.com/a/12486358/266309)

Gadget850 added a comment.Via ConduitSep 24 2014, 1:25 PM

It looks like some experimental tooltip code was added to cite.php but recently removed.

We now have the experimental HoverCards which works pretty well for reference tooltips.

He7d3r awarded a token.Via WebNov 24 2014, 12:27 PM

Add Comment