Module talk:Sports table/Chess
To do list
editSome features that should be added, when I get around to it:
in-line match format (matchrow_AAA=match_AAA_BBB,match_AAA_CCC,etc...)(completed 01:23, 15 April 2020 (UTC))bgcolrow (added 17:20, 15 April 2020 (UTC))(completed 20:26, 16 April 2020 (UTC))tiebreak matches in two player special case(completed 19:19, 23 April 2020 (UTC))selectively display SB score only for certain players (added 17:20, 15 April 2020 (UTC))(completed 17:53, 24 April 2020 (UTC))activate and check multirowlegs functionality(abandoned 19:29, 24 April 2020 (UTC) due to incompatibility with tiebreak matches)Points/score as a fraction (added 14:20, 16 May 2020 (UTC))(completed 03:27, 17 May 2020 (UTC))- testcases
- So, I forgot to sign that. But I completed item 1 rather quickly. NHammen (talk) 01:23, 15 April 2020 (UTC)
visualhide removal
editThis template/module uses the visualhide class. It has a TemplateStyles solution and will accordingly be removed from Common.css soon. Your feedback regarding the timeline is requested at MediaWiki talk:Common.css § visualhide removal. Izno (talk) 17:10, 2 December 2020 (UTC)
Questions about implementation
editSome comments for this module:
1. In the block of code starting from Module:Sports table/Chess#L-183, I think the sr-only span and its contents (and the current templatestyles) are not necessary for the else cases of these two blocks because they are not mixed fractions. Am I reading that correctly? Just looking for some context to make sure I don't intend to remove anything that would break this module.
if math.floor(hth_local) > 0 then
hth_local = math.floor(hth_local) .. templatestyles .. '<span class="sr-only"> </span><sup>1</sup>⁄<sub>2</sub>'
else
hth_local = templatestyles .. '<span class="sr-only"> </span><sup>1</sup>⁄<sub>2</sub>'
end
if math.floor(points) > 0 then
points = math.floor(points) .. templatestyles .. '<span class="sr-only"> </span><sup>1</sup>⁄<sub>2</sub>'
else
points = templatestyles .. '<span class="sr-only"> </span><sup>1</sup>⁄<sub>2</sub>'
end
2. There is a similar case at Module:Sports table/Chess#L-26 that looks the same.
if drawfractions then
gii = mw.getCurrentFrame():extensionTag{
name = 'templatestyles', args = { src = 'Screen reader-only/styles.css' }
} .. '<span class="sr-only"> </span><sup>1</sup>⁄<sub>2</sub>'
end
Please check me. Izno (talk) 21:30, 28 April 2021 (UTC)
"Rules for classification"?
editOver at the Candidates article I noticed something strange: The footnote to the standings table say "Rules for classification" to explain what criteria are used to rank the players. That wording feels very wonky and generic. So I got suspicious.
And sure enough, after mucho digging around, this phrase is a generic phrase for ALL SPORTS. Specifically, you'll find it in lines 570-573 of the Module:Sports table which our chess articles use through its chess-specific submodule:
table.insert(t_footer,'Rules for classification: '..class_rules)
Allow me to suggest we can do better, at least for chess, than the phrase "Rules for classification". Classification? That can mean everything and nothing! The table's sortable column is "rank", not "classification". How about:
"The table is ranked according to the following criteria:"
PS. I leave the implementation to module-proficient wikipedians, but I would think its better to override this behavior specifically for chess, instead of going into battle with people from every other sport in existence. Plus, I couldn't change it for everyone even if I wanted to, since the main module is write-protected.
Regards, CapnZapp (talk) 10:38, 18 June 2022 (UTC)
- Good observation. I removed it in the Candidates article, and added some custom text instead. Adpete (talk) 02:42, 20 June 2022 (UTC)
Standings tables without the results
editCan someone just put the team names, score and wins without adding in the results. Is that possible? Howard the Duck (talk) 17:36, 21 October 2023 (UTC)