Jump to content

Template talk:Chess diagram

From Calamity Wiki
(Redirected from Module talk:Chessboard)

Template:Talk header

Template:Permprot Template:Archives

Edit request 21 August 2024

Template:Edit template-protected Description of suggested change: There's an ugly empty row below the chess board if the caption is set to a single newline (see e.g. King's Gambit, Nimzowitsch-Larsen Attack, Petrov's Defence, Two Knights Defense, and Sicilian Defence). Instead of fixing all these articles, let's get rid of this once and for all so that our eyes may finally stop hurting.

Diff:

−
if (footer and footer ~= '') then div:tag('div') :addClass('thumbcaption') :wikitext(footer) end
+
if (footer and mw.text.trim(footer) ~= '') then div:tag('div') :addClass('thumbcaption') :wikitext(footer) end

Dexxor (talk) 10:45, 21 August 2024 (UTC)

This has been added to the sandbox. There is an error in the live version of this module (since May 2013 apparently) and seems to be an issue with the escape patterns in lines 243 and 244. I have made a possible fix in the sandbox. Can you comment on this @Frietjes? — Martin (MSGJ · talk) 16:23, 22 August 2024 (UTC)
MSGJ, seems fine to me. I was first learning LUA back then, so I may have made a mistake with the escape patterns. if it works fine with these changes, then go for it. Frietjes (talk) 16:33, 22 August 2024 (UTC)
 Done — Martin (MSGJ · talk) 08:32, 23 August 2024 (UTC)

Timeless

Just a heads up, this template doesn't render properly in the Timeless skin when using a narrow width (Like with a cell phone). Bawolff (talk) 08:28, 25 January 2025 (UTC)

It seems to have worsened with the TemplateStyles migration in Special:Diff/1270301621, in particular the td {text-align: center} rule. Although even before that, the notations are still off. – SD0001 (talk) 12:24, 25 January 2025 (UTC)
Fixed the regression in Special:Diff/1271734817. Something still needs to be done about the table wanting to occupy the full width, causing the top and bottom notations to be misaligned and the right-side notations to be far away from the board. – SD0001 (talk) 12:36, 25 January 2025 (UTC)
The styles Timeless adds to .thumbinner at low widths are causing the mess. – SD0001 (talk) 12:42, 25 January 2025 (UTC)
I'm pretty certain you know this, but i'll say it anyway: it is very much possible to add css rules which only affect a specific skin, by plugging .skin-<skin-name> as part of the rule's selector, so it should be possible to amend/override any skin-specific rule in a way that will not affect and will not harm the display in other skins.
Peace - קיפודנחש (aka kipod) (talk) 15:35, 25 January 2025 (UTC)

Template-protected edit request on 16 May 2025

Template:Edit template-protected Change use of 26x26 pixel images of amazons (File:Chess Adt26.svg and File:Chess Alt26.svg) to 45x45 pixel images to be consistent with other pieces (File:Chess Adt45 Amazon.svg, File:Chess Alt45 Amazon.svg, File:Chess Adl45.svg, File:Chess Add45.svg, File:Chess Ald45.svg, File:Chess All45.svg) PharaohCrab (talk) 17:09, 16 May 2025 (UTC)

 Not done: it's not clear what changes you want to be made. Please mention the specific changes in a "change X to Y" format and provide a reliable source if appropriate. – Jonesey95 (talk) 17:39, 17 May 2025 (UTC)

Just a heads up, I made a template based on this one that can show how a game unfolds at {{Chess viewer}}. I thought people involved in this template might be interested or have opinions. Bawolff (talk) 21:25, 3 January 2026 (UTC)

Recent switch to mxn

Sumanuil, you reverted my change to implement the TFD outcome in order to use the "mxn" module directly, claiming that it broke diagrams. I tested on a dozen different pages and found no issue, so where were you seeing those issues? It would help to determine what needs to be changed/added within the mxn module to make it work for this template. Thanks. Primefac (talk) 00:00, 31 January 2026 (UTC)

It broke some file links in the diagrams, mostly on articles using diagrams with non-Western pieces, such as Chu shogi and Makruk. Sumanuil. (talk to me) 03:54, 31 January 2026 (UTC)
Thanks, I'll take a look and see why those didn't perform as expected. Primefac (talk) 11:44, 31 January 2026 (UTC)
Primefac, if I'm reading the TFD correctly, the nomination and the outcome were to merge to Module:Chessboard. {{Chess diagram}} already uses it, so why does it need any changes? – SD0001 (talk) 07:41, 31 January 2026 (UTC)
Chessboard mxn handles all size of board, while Chessboard only handles an 8x8. The wording of the nomination suggests merge into Chessboard mxn and no one really said anything to the contrary, so unless pppery has a specific reason why the discussion was closed in that specific direction, I am taking some liberties to merge in a way that makes the most sense. It doesn't make much sense to merge all of the code from mxn into the base module; if the name is the issue we can do a swap, of course, after this is all sorted out. Primefac (talk) 11:45, 31 January 2026 (UTC)
Chessboard also supports all board sizes, not just 8x8. It also supports other chess styles like Chu shogi through style-specific config pages (the default style is at Module:Chessboard/Chess). There are also other improvements – such as use of TemplateStyles, support for PGN – which are not present in the mxn version. – SD0001 (talk) 12:13, 31 January 2026 (UTC)
I'll eat the blame for only reading the documentation and not parsing the module code closely enough; the doc doesn't even mention alternate styles, nor does it indicate that this template can handle multiple sizes (in fact, it does quite the opposite). Scratch everything I said above, I'll go back to the drawing board and make sure things are done better. Primefac (talk) 12:24, 31 January 2026 (UTC)
I don't have a specific reason; this was an instance of https://github.com/wikimedia-gadgets/xfdcloser/issues/129 where I had to specify a target despite one not actually being necessary to close. * Pppery * it has begun... 16:33, 31 January 2026 (UTC)