Jump to content

Module talk:Sports table/Chess

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Izno (talk | contribs) at 21:30, 28 April 2021 (Questions about implementation: new section). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

To do list

Some features that should be added, when I get around to it:

  1. in-line match format (matchrow_AAA=match_AAA_BBB,match_AAA_CCC,etc...) (completed 01:23, 15 April 2020 (UTC))
  2. bgcolrow (added 17:20, 15 April 2020 (UTC)) (completed 20:26, 16 April 2020 (UTC))
  3. tiebreak matches in two player special case (completed 19:19, 23 April 2020 (UTC))
  4. selectively display SB score only for certain players (added 17:20, 15 April 2020 (UTC)) (completed 17:53, 24 April 2020 (UTC))
  5. activate and check multirowlegs functionality (abandoned 19:29, 24 April 2020 (UTC) due to incompatibility with tiebreak matches)
  6. Points/score as a fraction (added 14:20, 16 May 2020 (UTC)) (completed 03:27, 17 May 2020 (UTC))
  7. testcases

NHammen (talk)

So, I forgot to sign that. But I completed item 1 rather quickly. NHammen (talk) 01:23, 15 April 2020 (UTC)[reply]

visualhide removal

This 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)[reply]

Questions about implementation

Some 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">&nbsp;</span><sup>1</sup>&frasl;<sub>2</sub>'
else
	hth_local = templatestyles .. '<span class="sr-only">&nbsp;</span><sup>1</sup>&frasl;<sub>2</sub>'
end
if math.floor(points) > 0 then
	points = math.floor(points) .. templatestyles .. '<span class="sr-only">&nbsp;</span><sup>1</sup>&frasl;<sub>2</sub>'
else
	points = templatestyles .. '<span class="sr-only">&nbsp;</span><sup>1</sup>&frasl;<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">&nbsp;</span><sup>1</sup>&frasl;<sub>2</sub>'
end

Please check me. Izno (talk) 21:30, 28 April 2021 (UTC)[reply]