Jump to content

Help:Reference Previews: Difference between revisions

From mediawiki.org
Content deleted Content added
Marked this version for translation
 
(2 intermediate revisions by 2 users not shown)
Line 8: Line 8:
</translate>
</translate>
<translate><!--T:44--> The Reference Previews feature aims to fulfill a wish from the German-speaking community's Technical Wishlist and is developed by WMDE's Tech team, with support from the WMF’s Web team. The design for this feature has been developed by the WMF.</translate>
<translate><!--T:44--> The Reference Previews feature aims to fulfill a wish from the German-speaking community's Technical Wishlist and is developed by WMDE's Tech team, with support from the WMF’s Web team. The design for this feature has been developed by the WMF.</translate>
<translate><!--T:42--> More information can be found on the [[<tvar name=RefPreviews>m:WMDE Technical Wishes/ReferencePreviews</tvar>|main project page on Meta]].</translate>
<translate><!--T:42--> More information can be found on the [[<tvar name=RefPreviews>m:WMDE Technical Wishes/Reference Previews</tvar>|main project page on Meta]].</translate>


<translate>
<translate>
Line 60: Line 60:
<translate>
<translate>
=== How to assign a reference type to your reference === <!--T:94-->
=== How to assign a reference type to your reference === <!--T:94-->
</translate>
<translate><!--T:95--> Each reference type is defined by CSS classes, e.g., <tvar name=1><syntaxhighlight lang=html inline><cite class="journal"></syntaxhighlight></tvar> for journal references.</translate>
<translate><!--T:105--> These classes are set in the <tvar name=2>{{tag|cite|open}}</tvar> element in a reference's content.</translate>
<translate><!--T:106--> References without cite tags and classes (e.g., plain <tvar name=3>{{tag|ref|open}}</tvar> tags) are displayed as "Reference".</translate>


<translate>
<!--T:95-->
Each reference type is defined by CSS classes, e.g., <tvar name=1><syntaxhighlight lang=html inline><cite class="journal"></syntaxhighlight></tvar> for journal references. These classes are set in the <tvar name=2>{{tag|cite|open}}</tvar> element in a reference's content. References without cite tags and classes (e.g., plain <tvar name=3>{{tag|ref|open}}</tvar> tags) are displayed as "Reference".

<!--T:96-->
<!--T:96-->
To assign a reference type:
To assign a reference type:
Line 97: Line 99:


* [[phab:tag/reference_previews/|<translate><!--T:62--> project board on Phabricator</translate>]]
* [[phab:tag/reference_previews/|<translate><!--T:62--> project board on Phabricator</translate>]]
* [[m:WMDE Technical Wishes/ReferencePreviews|<translate><!--T:63--> main project page on Meta</translate>]]
* [[m:WMDE Technical Wishes/Reference Previews|<translate><!--T:63--> main project page on Meta</translate>]]
* [[Help talk:Reference Previews|<translate><!--T:64--> central feedback page on MediaWiki.org</translate>]]
* [[Help talk:Reference Previews|<translate><!--T:64--> central feedback page on MediaWiki.org</translate>]]



Latest revision as of 13:24, 8 March 2026

The Reference Previews feature shows a preview of a footnote when you hover over its footnote marker. This feature is part of the MediaWiki extension Popups , which is used for Page Previews .

Background

[edit | edit source]

The Reference Previews feature aims to fulfill a wish from the German-speaking community's Technical Wishlist and is developed by WMDE's Tech team, with support from the WMF’s Web team. The design for this feature has been developed by the WMF. More information can be found on the main project page on Meta.

Overview

[edit | edit source]

Reference Previews display a preview of the footnote as it appears at the bottom of the page. Within the preview, any and all footnote content (text, images, tables, …) can be displayed. At the top of the pop-up, the reference type is displayed. Reference Previews were designed to create an experience consistent with Page Previews , so that all pop-ups have the same design, regardless of whether you are hovering over a page link or a footnote marker.

Reference Previews and Page Previews next to each other.

Interactions

  • Hover over a footnote marker to open the pop-up.
  • Click on a footnote marker to jump to the References section (as you would do if there weren't any pop-ups).
  • For shorter references, the pop-up window adjusts to a smaller size.
  • If the reference size exceeds the maximum pop-up, you can scroll within the preview window.
  • External links inside a reference open in a new tab.

The preview functionality relies on JavaScript. If you don't have JavaScript activated, there is no hover effect, and footnote markers remain simple jump marks.

Opt-out feature

[edit | edit source]

Reference Previews will be activated by default for everyone (logged-in users, logged-out/anonymous users, readers of a wiki).

  • You can toggle them off under the Appearance tab in your preferences.
  • You can also open this preference tab directly by clicking on the cog wheel in the pop-up.
  • Anonymous users/logged-out users/readers can turn the previews off by clicking the cog wheel and toggling the setting. This saves the preference via a cookie. They can be turned back on using the “Edit preview settings” link in the website footer.

Please note: If you use the Reference Tooltips or Navigation Popups gadget – either because it’s a default gadget on your wiki or because you enabled it individually – you won’t see Reference Previews. If you disable the gadget, you can see Reference Previews.

Exposed reference types

[edit | edit source]

At the top of each pop-up, Reference Previews prominently indicate what kind of source is being referenced. We currently define seven reference types:

  • Reference (generic)
  • Web reference
  • Journal reference
  • Book reference
  • News reference
  • Map reference
  • Note

How to assign a reference type to your reference

[edit | edit source]

Each reference type is defined by CSS classes, e.g., <cite class="journal"> for journal references. These classes are set in the ‎<cite> element in a reference's content. References without cite tags and classes (e.g., plain ‎<ref> tags) are displayed as "Reference".

To assign a reference type:

  • The easiest way is to use a citation template that includes the cite class. The English cite templates, for example this one, specify the cite class already, and derivations of these templates are used in many wikis. Other templates can also be updated to do so.
  • If you're not using templates to add references, another option is to add a ‎<cite> class directly into a ‎<cite> tag, like so: <ref><cite class="book">reference content</cite></ref>.


Deployment roadmap

[edit | edit source]
  • Yes test.wikipedia.org (testwiki):
  • beta feature on:
    • Yes German Wikipedia:
    • Yes Arabic Wikipedia:
    • all wikis that use the Popups extension (all Wikipedias & en, he and zh Wikivoyages):
  • default feature:
    • Yes German Wikipedia, Romanian Wikipedia, Estonian Wikipedia, Basque Wikipedia, Arabic Wikipedia, Hebrew Wikipedia, Gujarati Wikipedia, Finnish Wikipedia:
    • Yes Marathi Wikipedia:
    • Yes German Wikivoyage:
    • Yes all other wikis which use the Popups extension (all Wikipedias & en, he and zh Wikivoyages):
[edit | edit source]

Reference Previews

Page Previews

Help with translation

[edit | edit source]

The software messages for this feature can be translated on translatewiki.net. Any help is much appreciated!