Module talk:WikiProject banner/Archive 13: Difference between revisions

Content deleted Content added
m Archiving 1 discussion(s) from Template talk:WPBannerMeta) (bot
m Archiving 2 discussion(s) from Template talk:WPBannerMeta) (bot
Line 115:
{{unindent}} Seems only US Roads and Maths need a bit of tweaking now. {{tl|Maths rating}}/{{tl|maths banner}} can be merged and converted to a proper {{tl|WikiProject Mathematics}} with the current metabanner though ([[Wikipedia_talk:WikiProject_Mathematics#Proposed_change_to_Template:Maths_rating_from_2018|discussion]]). &#32;<span style="font-variant:small-caps; whitespace:nowrap;">[[User:Headbomb|Headbomb]] {[[User talk:Headbomb|t]] · [[Special:Contributions/Headbomb|c]] · [[WP:PHYS|p]] · [[WP:WBOOKS|b]]}</span> 14:31, 6 October 2020 (UTC)
:I have coded a version in [[Template:Maths rating/sandbox]] sandbox and commented over there &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 12:31, 8 October 2020 (UTC)
 
== WikiProject Portals ==
 
WikiProject Portals seems to be using [[Template:WikiProject Portals/WPBannerMeta|a forked copy]] of the meta template. Does anyone know why? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 17:53, 12 October 2020 (UTC)
:Probably a good idea to ping the forker, {{ping|Evad37}} &#32;<span style="font-variant:small-caps; whitespace:nowrap;">[[User:Headbomb|Headbomb]] {[[User talk:Headbomb|t]] · [[Special:Contributions/Headbomb|c]] · [[WP:PHYS|p]] · [[WP:WBOOKS|b]]}</span> 18:12, 12 October 2020 (UTC)
::If I recall correctly, it was forked mainly so that portals can be assessed for quality and importance according to the portal project's assessment scales, rather than automatically assuming Portal-class/NA-importance, and to map FA/FP ratings to FPo. There might have been some discussion in the archives of the portal project's talk pages - <u>'''[[User:Evad37|Evad]]''37'''''</u>&nbsp;<span style="font-size:95%;">&#91;[[d:w:User talk:Evad37|talk]]]</span> 22:10, 12 October 2020 (UTC)
::It might have also been to suppress the "does not require assessment" wording for pages (portals) which do actually require assessment. - <u>'''[[User:Evad37|Evad]]''37'''''</u>&nbsp;<span style="font-size:95%;">&#91;[[d:w:User talk:Evad37|talk]]]</span> 22:43, 12 October 2020 (UTC)
I'll see if I can work up a version which requires less "forking" &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 14:00, 22 October 2020 (UTC)
 
The main problem (as Evad mentioned above) is this code from /qualityscale:
<pre>{{#ifeq:{{pagetype|{{{class|}}}}}|article
|has {{#if:{{{class|}}}
|been rated as '''{{{class}}}-Class'''
|not yet received a rating
}}
|does not require a rating
}}</pre>
which will always assume that a non-article does not require a rating &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 15:13, 22 October 2020 (UTC)
 
Follow-up: I have converted the portals project banner back to use this meta-template, but I hooked customised versions of /qualityscale and /importancescale instead. It looks to be working correctly &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 13:51, 28 October 2020 (UTC)
 
== Alignment ==
 
When the image is narrower than the class rating, and notes are used, the columns do not align nicely.
{{WikiProject Portals|category=no|importance=low |class=complete}}
On my browser the indentation for the final row is much less than for the other rows in the table. Is there a good way to fix this? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 14:25, 26 October 2020 (UTC)
: It's because the /Note template, or one of its immediate parent templates, creates its own sub-table in a cell which is 3 cells wide. That means it does not inherit the same widths as the cells in the rest of the table. --[[User:Izno|Izno]] ([[User talk:Izno|talk]]) 15:35, 26 October 2020 (UTC)
:The pertinent code is
<pre><tr><td colspan="3" style="padding:0;">{{#ifexpr:{{#switch:{{{auto}}}|yes|stub={{#ifeq:{{{class|}}}|Stub|1|0}}|inherit|length={{#if:{{{class|}}}|1|0}}|0}}+
{{#ifeq:{{{attention}}}|yes|1|0}}+
{{#ifeq:{{{infobox}}}|yes|1|0}}+
{{#ifeq:{{{note 1}}}|yes|{{#if:{{{N_1_TEXT|}}}|1|0}}|0}}+
{{#ifeq:{{{note 2}}}|yes|{{#if:{{{N_2_TEXT|}}}|1|0}}|0}}+
{{#ifeq:{{{note 3}}}|yes|{{#if:{{{N_3_TEXT|}}}|1|0}}|0}}+
{{#ifeq:{{{note 4}}}|yes|{{#if:{{{N_4_TEXT|}}}|1|0}}|0}}+
{{#ifeq:{{{note 5}}}|yes|{{#if:{{{N_5_TEXT|}}}|1|0}}|0}}+
{{#ifeq:{{{note 6}}}|yes|{{#if:{{{N_6_TEXT|}}}|1|0}}|0}}+
{{#ifeq:{{{note 7}}}|yes|{{#if:{{{N_7_TEXT|}}}|1|0}}|0}}+
{{#ifeq:{{{note 8}}}|yes|{{#if:{{{N_8_TEXT|}}}|1|0}}|0}}+
{{#ifeq:{{{note 9}}}|yes|{{#if:{{{N_9_TEXT|}}}|1|0}}|0}}+
{{#ifeq:{{{note 10}}}|yes|{{#if:{{{N_10_TEXT|}}}|1|0}}|0}}+
{{{HOOK_COLLAPSED|0}}}>{{#iferror:{{#expr:0+{{{COLLAPSED|¬}}}*1}}|{{#ifeq:{{{small}}}|yes|0|2}}}}
|<table class="collapsible collapsed" style="width:100%; background:transparent;">
<tr><th colspan="3" style="text-align:left; padding:0.2em 2px 0.2em 0"> {{{COLLAPSED_HEAD}}}</th></tr>
|<table style="width:100%; background:transparent;">
}}</pre>
:In /core. A fix for that is not obvious to me (because this template still needs to come into the 21st century with its table layout and wikitext backend -> div or even flow/grid and Lua), though it may be possible in CSS rather than changing the structure. --[[User:Izno|Izno]] ([[User talk:Izno|talk]]) 15:46, 26 October 2020 (UTC)
::In many banners these notes are in a collapsed table, so a sub-table is clearly needed. But when they are not collapsed (like the example above) is there any reason why the sub-table is needed? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 17:30, 26 October 2020 (UTC)
:::I can't see a reason why. --[[User:Izno|Izno]] ([[User talk:Izno|talk]]) 17:35, 26 October 2020 (UTC)
::::I may have a play in the sandbox then &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 08:47, 27 October 2020 (UTC)
Testing sandbox code below. Uncollapsed version does not start a new table, so columns line up. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 22:23, 27 October 2020 (UTC)
{{WikiProject Portals/sandbox|category=no|importance=low |class=substantial|featured=yes}}
{{WikiProject Portals/sandbox|category=no|importance=low |class=substantial|featured=yes|historical=yes}}
{{ping|Izno}} would you double-check my code please ([https://en.wikipedia.org/w/index.php?title=Template:WPBannerMeta/core/sandbox&diff=prev&oldid=985778587 diff])? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 13:31, 28 October 2020 (UTC)
:{{ping|MSGJ}} Yes, looks fine. (Rough, but such is the nature of wikitext.) --[[User:Izno|Izno]] ([[User talk:Izno|talk]]) 14:09, 28 October 2020 (UTC)
::One day it will get converted to Lua! &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 14:13, 28 October 2020 (UTC)
:::I'm on a kick right now, so it might be me that starts it. (No promises.) --[[User:Izno|Izno]] ([[User talk:Izno|talk]]) 14:15, 28 October 2020 (UTC)
::::Sounds good! I'll do what I can to simplify the template in the meantime (like [[#Small]]) which should make it a bit easier for you &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 14:51, 28 October 2020 (UTC)
This is now {{done}} &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 14:51, 28 October 2020 (UTC)