Last modified: 2014-09-24 13:25:25 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 7908 - Footnotes content should appear in a tooltip (add ReferenceTooltips to Cite as default/option)
Footnotes content should appear in a tooltip (add ReferenceTooltips to Cite a...
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
Cite (Other open bugs)
unspecified
All All
: Normal enhancement with 15 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-reviewed
: 11515 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-13 10:40 UTC by Rémi Kaupp
Modified: 2014-09-24 13:25 UTC (History)
11 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Reference in tooltip (2.63 KB, patch)
2007-01-06 15:55 UTC, Dirk Beetstra
Details
new patch (3.20 KB, patch)
2007-01-06 22:02 UTC, Dirk Beetstra
Details
reference in tooltip (3.34 KB, patch)
2007-01-06 22:47 UTC, Dirk Beetstra
Details
new patch (3.40 KB, patch)
2007-01-07 19:50 UTC, Dirk Beetstra
Details
tooltip patch (3.61 KB, patch)
2007-01-08 11:31 UTC, Dirk Beetstra
Details
refs in tooltip (8.19 KB, patch)
2007-01-14 19:07 UTC, Dirk Beetstra
Details
refs in tooltip updated (7.82 KB, patch)
2007-07-16 10:02 UTC, mike
Details

Description Rémi Kaupp 2006-11-13 10:40:56 UTC
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.
Comment 1 Dirk Beetstra 2006-11-13 11:46:17 UTC
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)!
Comment 2 Rob Church 2006-11-13 11:47:40 UTC
When assigning bugs, please *do it right*. Thanks.
Comment 3 Dirk Beetstra 2007-01-06 15:55:41 UTC
Created attachment 3013 [details]
Reference in tooltip

Added a bit of javascript which adds a title to the id of the reference.
Comment 4 Dirk Beetstra 2007-01-06 22:02:51 UTC
Created attachment 3018 [details]
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.
Comment 5 Dirk Beetstra 2007-01-06 22:47:41 UTC
Created attachment 3019 [details]
reference in tooltip

cleaner references, for comments see previous patch
Comment 6 Dirk Beetstra 2007-01-07 19:50:28 UTC
Created attachment 3028 [details]
new patch

updated patch, remove an error
Comment 7 Dirk Beetstra 2007-01-08 11:31:08 UTC
Created attachment 3032 [details]
tooltip patch

(previous patch was broken)
Comment 8 Antoine "hashar" Musso (WMF) 2007-01-13 14:25:16 UTC
Commited as r19202
Comment 9 Brion Vibber 2007-01-13 22:12:59 UTC
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.
Comment 10 Dirk Beetstra 2007-01-13 22:21:14 UTC
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.
Comment 11 Dirk Beetstra 2007-01-14 19:07:33 UTC
Created attachment 3071 [details]
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.
Comment 12 mike 2007-07-16 10:02:32 UTC
Created attachment 3918 [details]
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).
Comment 13 Brion Vibber 2007-07-16 15:48:33 UTC
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.
Comment 14 Tisza Gergő 2007-10-16 19:53:35 UTC
*** Bug 11515 has been marked as a duplicate of this bug. ***
Comment 15 folengo 2007-11-19 12:36:16 UTC
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".
Comment 16 Rémi Kaupp 2008-08-12 11:05:58 UTC
There is a possibility in JavaScript on http://fr.wikipedia.org/wiki/Utilisateur:Deep_silence/ReferencesPopup.js
Comment 17 Nicholas Wilson 2008-12-31 22:41:55 UTC
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.
Comment 18 p858snake 2011-04-30 00:09:48 UTC
*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*
Comment 19 Sumana Harihareswara 2011-11-14 16:50:49 UTC
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!
Comment 21 Timeshifter 2012-08-21 13:56:05 UTC
There is discussion here:
*http://en.wikipedia.org/wiki/User_talk:Yair_rand/ReferenceTooltips
Comment 22 Nemo 2013-03-06 15:30:50 UTC
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?
Comment 23 Waldir 2013-03-06 18:04:42 UTC
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)
Comment 24 Gadget850 2014-09-24 13:25:25 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links