Template:Sticky header/testcases
| This is the template test cases page for the sandbox of Template:Sticky header. to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki; see the HTML comment "NewPP limit report" in the rendered page. You can also use Special:ExpandTemplates to examine the results of template uses. You can test how this page looks in the different skins and parsers with these links: |
Lua error in Module:TNT at line 159: Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Uses TemplateStyles.tab.
Uses {{sticky header/sandbox}}. Note that it's not possible to compare the live and sandbox versions of styles.css on the same page since they would compete with each other.
Test sticky-header (no caption)
[edit source]Sticky first row.
Wikitable:
| Header | Header 2 | Header 3 | Header 4 |
|---|---|---|---|
| 3 | data | data | b |
| 1 | data | data | c |
| 2 | data | data | a |
Wikitable wikitext:
{{Sticky header/sandbox}}
{| class="wikitable sticky-header"
|-
! Header !! Header 2 !! Header 3 !! Header 4
⫶
|}
Plain table:
| Header | Header 2 | Header 3 | Header 4 |
|---|---|---|---|
| 3 | data | data | b |
| 1 | data | data | c |
| 2 | data | data | a |
Plain table wikitext:
{{Sticky header/sandbox}}
{| class="sticky-header"
|-
! Header !! Header 2 !! Header 3 !! Header 4
⫶
|}
Test sticky-header (caption)
[edit source]Sticky first row.
Wikitable:
| Header | Header 2 | Header 3 | Header 4 |
|---|---|---|---|
| 3 | data | data | b |
| 1 | data | data | c |
| 2 | data | data | a |
Wikitable wikitext:
{{Sticky header/sandbox}}
{| class="wikitable sticky-header"
|+ Caption
|-
! Header !! Header 2 !! Header 3 !! Header 4
⫶
|}
Plain table:
| Header | Header 2 | Header 3 | Header 4 |
|---|---|---|---|
| 3 | data | data | b |
| 1 | data | data | c |
| 2 | data | data | a |
Plain table wikitext:
{{Sticky header/sandbox}}
{| class="sticky-header"
|+ Caption
|-
! Header !! Header 2 !! Header 3 !! Header 4
⫶
|}
Test sticky-header (sortable)
[edit source]Sticky first row.
Wikitable:
| Header | Header 2 | Header 3 | Header 4 |
|---|---|---|---|
| top | top | top | top |
| 3 | data | data | b |
| 1 | data | data | c |
| 2 | data | data | a |
| bottom | bottom | bottom | bottom |
Wikitable wikitext:
{{Sticky header/sandbox}}
{| class="wikitable sortable sticky-header"
|+ Caption
|-
! Header !! Header 2 !! Header 3
! class="unsortable" | Header 4
|- class="sorttop"
| top || top || top || top
⫶
|- class="sortbottom"
| bottom || bottom || bottom || bottom
|}
Plain table:
| Header | Header 2 | Header 3 | Header 4 |
|---|---|---|---|
| top | top | top | top |
| 3 | data | data | b |
| 1 | data | data | c |
| 2 | data | data | a |
| bottom | bottom | bottom | bottom |
Plain table wikitext:
{{Sticky header/sandbox}}
{| class="sortable sticky-header"
|+ Caption
|-
! Header !! Header 2 !! Header 3
! class="unsortable" | Header 4
|- class="sorttop"
| top || top || top || top
⫶
|- class="sortbottom"
| bottom || bottom || bottom || bottom
|}
Test sticky-header-multi
[edit source]Sticky <thead> element.
Issues:
- Nothing sticky if JavaScript disabled, which is used by sortable, currently the only way to move headers to the
<thead>element. - Sticky
sorttoprows, which sortable moves to the<thead>element after sorting.
Wikitable:
| Header | Header group | ||||||
|---|---|---|---|---|---|---|---|
| Header 2 | Header 3 | Header 4 | |||||
| top | top | top | top | ||||
| 3 | data | data | b | ||||
| 1 | data | data | c | ||||
| 2 | data | data | a | ||||
| bottom | bottom | bottom | bottom | ||||
Wikitable wikitext:
{{Sticky header/sandbox}}
{| class="wikitable sortable sticky-header-multi"
|+ Caption
|-
! rowspan="2" | Header
! colspan="7" | Header group
|-
! Header 2 !! Header 3
! class="unsortable" | Header 4
|- class="sorttop"
| top || top || top || top
⫶
|- class="sortbottom"
| bottom || bottom || bottom || bottom
|}
Plain table:
| Header | Header group | ||||||
|---|---|---|---|---|---|---|---|
| Header 2 | Header 3 | Header 4 | |||||
| top | top | top | top | ||||
| 3 | data | data | b | ||||
| 1 | data | data | c | ||||
| 2 | data | data | a | ||||
| bottom | bottom | bottom | bottom | ||||
Plain table wikitext:
{{Sticky header/sandbox}}
{| class="sortable sticky-header-multi"
|+ Caption
|-
! rowspan="2" | Header
! colspan="7" | Header group
|-
! Header 2 !! Header 3
! class="unsortable" | Header 4
|- class="sorttop"
| top || top || top || top
⫶
|- class="sortbottom"
| bottom || bottom || bottom || bottom
|}
Test narrow (single row)
[edit source]Not sticky:
| Header | Header 2 | Header 3 |
|---|---|---|
| 3 | data | b |
| 1 | data | c |
| 2 | data | a |
Sticky:
| Header | Header 2 | Header 3 |
|---|---|---|
| 3 | data | b |
| 1 | data | c |
| 2 | data | a |
Test narrow (multi row)
[edit source]Not sticky:
| Header | Header group | ||||||
|---|---|---|---|---|---|---|---|
| Header 2 | Header 3 | Header 4 | |||||
| top | top | top | top | ||||
| 3 | data | data | b | ||||
| 1 | data | data | c | ||||
| 2 | data | data | a | ||||
| bottom | bottom | bottom | bottom | ||||
Sticky:
| Header | Header group | ||||||
|---|---|---|---|---|---|---|---|
| Header 2 | Header 3 | Header 4 | |||||
| top | top | top | top | ||||
| 3 | data | data | b | ||||
| 1 | data | data | c | ||||
| 2 | data | data | a | ||||
| bottom | bottom | bottom | bottom | ||||
Test wide (single row, not sticky)
[edit source]Not sticky:
| Header | Header 2 | Header 3 | Header 4 | Header | Header | Header | Header | Header | Header | Header | Header | Header | Header | Header | Header |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 3 | data | data | b | data | data | data | data | data | data | data | data | data | data | data | data |
| 1 | data | data | c | data | data | data | data | data | data | data | data | data | data | data | data |
| 2 | data | data | a | data | data | data | data | data | data | data | data | data | data | data | data |
Test wide (single row, sticky)
[edit source]Sticky:
| Header | Header 2 | Header 3 | Header 4 | Header | Header | Header | Header | Header | Header | Header | Header | Header | Header | Header | Header |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 3 | data | data | b | data | data | data | data | data | data | data | data | data | data | data | data |
| 1 | data | data | c | data | data | data | data | data | data | data | data | data | data | data | data |
| 2 | data | data | a | data | data | data | data | data | data | data | data | data | data | data | data |
Test template static row numbers (sticky-header, no caption)
[edit source]Uses {{static row numbers}} with adjusted wikitable borders.
No label:
| Header |
|---|
| rank 1 |
| rank 2 |
| norank 1 |
| norank 2 |
| rank 3 |
| rank 4 |
Label:
| Header |
|---|
| rank 1 |
| rank 2 |
| norank 1 |
| norank 2 |
| rank 3 |
| rank 4 |
Test template static row numbers (sticky-header, caption)
[edit source]Uses {{static row numbers}} with adjusted wikitable borders.
No label:
| Header |
|---|
| rank 1 |
| rank 2 |
| norank 1 |
| norank 2 |
| rank 3 |
| rank 4 |
Label:
| Header |
|---|
| rank 1 |
| rank 2 |
| norank 1 |
| norank 2 |
| rank 3 |
| rank 4 |
Test template static row numbers (sticky-header, sortable)
[edit source]Uses {{static row numbers}} with adjusted wikitable borders.
No label:
| Header |
|---|
| top |
| top |
| rank 1 |
| rank 2 |
| norank 1 |
| norank 2 |
| rank 3 |
| rank 4 |
| bottom |
| bottom |
Label:
| Header |
|---|
| top |
| top |
| rank 1 |
| rank 2 |
| norank 1 |
| norank 2 |
| rank 3 |
| rank 4 |
| bottom |
| bottom |
Test template static row numbers (sticky-header-multi)
[edit source]Uses {{static row numbers}} with adjusted wikitable borders.
No label:
| Header group | |
|---|---|
| Header | Header |
| top | top |
| top | top |
| rank 1 | data |
| rank 2 | data |
| norank 1 | data |
| norank 2 | data |
| rank 3 | data |
| rank 4 | data |
| bottom | bottom |
| bottom | bottom |
Label:
| Header group | |
|---|---|
| Header | Header |
| top | top |
| top | top |
| rank 1 | data |
| rank 2 | data |
| norank 1 | data |
| norank 2 | data |
| rank 3 | data |
| rank 4 | data |
| bottom | bottom |
| bottom | bottom |
Test template row hover highlight (sticky-header)
[edit source]Uses {{row hover highlight}}.
mw-datatable:
Wikitable:
| Header |
|---|
| 3 |
| 1 |
| 2 |
| 5 |
| 4 |
| 6 |
Plain table:
| Header |
|---|
| 3 |
| 1 |
| 2 |
| 5 |
| 4 |
| 6 |
hover-highlight:
Wikitable:
| Header |
|---|
| 3 |
| 1 |
| 2 |
| 5 |
| 4 |
| 6 |
Plain table:
| Header |
|---|
| 3 |
| 1 |
| 2 |
| 5 |
| 4 |
| 6 |
Test template row hover highlight (sticky-header, sortable)
[edit source]Uses {{row hover highlight}}.
mw-datatable:
Wikitable:
| Header |
|---|
| top |
| 3 |
| 1 |
| 2 |
| 5 |
| 4 |
| 6 |
| bottom |
Plain table:
| Header |
|---|
| top |
| 3 |
| 1 |
| 2 |
| 5 |
| 4 |
| 6 |
| bottom |
hover-highlight:
Wikitable:
| Header |
|---|
| top |
| 3 |
| 1 |
| 2 |
| 5 |
| 4 |
| 6 |
| bottom |
Plain table:
| Header |
|---|
| top |
| 3 |
| 1 |
| 2 |
| 5 |
| 4 |
| 6 |
| bottom |
Test template row hover highlight (sticky-header-multi)
[edit source]Uses {{row hover highlight}}.
mw-datatable:
Wikitable:
| Header group | |
|---|---|
| Header | Header |
| top | top |
| top | top |
| 3 | data |
| 1 | data |
| 2 | data |
| 5 | data |
| 4 | data |
| 6 | data |
| bottom | bottom |
| bottom | bottom |
Plain table:
| Header group | |
|---|---|
| Header | Header |
| top | top |
| top | top |
| 3 | data |
| 1 | data |
| 2 | data |
| 5 | data |
| 4 | data |
| 6 | data |
| bottom | bottom |
| bottom | bottom |
hover-highlight:
Wikitable:
| Header group | |
|---|---|
| Header | Header |
| top | top |
| top | top |
| 3 | data |
| 1 | data |
| 2 | data |
| 5 | data |
| 4 | data |
| 6 | data |
| bottom | bottom |
| bottom | bottom |
Plain table:
| Header group | |
|---|---|
| Header | Header |
| top | top |
| top | top |
| 3 | data |
| 1 | data |
| 2 | data |
| 5 | data |
| 4 | data |
| 6 | data |
| bottom | bottom |
| bottom | bottom |
Test perennial sources
[edit source]Table partially copied from Wikipedia:Reliable sources/Perennial sources#Sources, which uses Wikipedia:Reliable sources/Perennial sources/styles.css to set background-color. Discussions related to its styles are here.
Note: Row background colors should not be gray.
Note: Anchor links place the target at the top of the page behind the top-sticky elements.
Invalid title for TemplateStyles' src attribute.
| Source | Status (legend) |
Discussions | Use | ||
|---|---|---|---|---|---|
| List | Last | Summary | |||
| 112 Ukraine | Template:WP:RSPSTATUS | Template:WP:RSPLAST | 112 Ukraine was deprecated following a 2019 RfC, which showed overwhelming consensus for the deprecation of a slew of sources associated with Russian disinformation in Ukraine. It was pointed out later in a 2020 RfC that 112 Ukraine had not been explicitly discussed in that first discussion prior to its blacklisting request. Further discussion established a rough consensus that the source is generally unreliable, but did not form a consensus for deprecation or blacklisting. The prior blacklisting was reversed as out of process. 112 Ukraine closed in 2021. | Template:WP:RSPUSES | |
| ABC News (United States) | Template:WP:RSPSTATUS | 1 2 | Template:WP:RSPLAST | There is consensus that ABC News, the news division of the American Broadcasting Company, is generally reliable. It is not to be confused with other publications of the same name. | Template:WP:RSPUSES |
| Academic repositories Template:WP:RSPSHORTCUTTemplate:WP:RSPSHORTCUTTemplate:WP:RSPSHORTCUTTemplate:WP:RSPSHORTCUT | Template:WP:RSPSTATUS | 16 | Template:WP:RSPLAST | General repositories like Academia.edu, HAL Open Archives, ResearchGate, Semantic Scholar, and Zenodo host academic papers, conference proceedings, book chapters, preprints, technical reports, etc. No filters exist for quality, and will host several unreviewed preprints, retracted papers not marked as such, unreviewed manuscripts, and even papers from predatory journals. Determine the original source of what is being cited to establish reliability. When possible, cite the original source in preference to the repository. | Template:WP:RSPUSES |
| Ad Fontes Media Template:WP:RSPSHORTCUT | Template:WP:RSPSTATUS | 1 2 3 4 5 | Template:WP:RSPLAST | There is consensus that Ad Fontes Media and their Media Bias Chart should not be used in article space in reference to sources' political leaning or reliability. Editors consider it a self-published source and have questioned its methodology. | Template:WP:RSPUSES |
| Advameg (City-Data) | Template:WP:RSPSTATUS | +14 |
Template:WP:RSPLAST | Advameg operates content farms, including City-Data, that use scraped or improperly licensed content. These sites frequently republish content from Gale's encyclopedias; many editors can obtain access to Gale through The Wikipedia Library free of charge. Advameg's sites are on the Wikipedia spam blacklist, and links must be whitelisted before they can be used. WP:COPYLINK prohibits linking to copyright violations. | Template:WP:RSPUSES +43 |
Padding
[edit source]Padding for testing purposes.