Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a21edb1fee4d1ec6

Jump to content

Template talk:Chess diagram

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia

Recent switch to mxn

[edit]

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)Reply

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)Reply
Thanks, I'll take a look and see why those didn't perform as expected. Primefac (talk) 11:44, 31 January 2026 (UTC)Reply
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)Reply
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)Reply
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)Reply
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)Reply
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)Reply

New piece images

[edit]

I have some new piece images I am interested in uploading, if that would be okay with everyone... Sammy2012 (talk) 07:36, 1 May 2026 (UTC)Reply

what pieces are you planning on uploading? PharaohCrab speak𓀁 works𓀨 11:23, 1 May 2026 (UTC)Reply
While pending a response to that question, if the images are already on Wikipedia (or Commons) feel free to create a sandbox version with the images you want to use so that we can see what you're planning. Primefac (talk) 10:49, 2 May 2026 (UTC)Reply
Sorry for the delayed reply. I'll post them soon. Sammy2012 (talk) 06:50, 8 May 2026 (UTC)Reply
BTW, would it be okay if I used letters with diacritics for the pieces? Such as Ñ for the nightrider? Sammy2012 (talk) 06:52, 8 May 2026 (UTC)Reply
Just thinking about ease of typing, probably not the best idea (most English-speaking keyboards will not have a quick way to type that) but if everything else that would make sense is taken it might need to be done. That being said I note that "N" is already used for the nightrider so if it's just changing the image a letter change won't be needed (though if the point is to offer up an alternate, consider maybe "k"). Primefac (talk) 10:42, 8 May 2026 (UTC)Reply
Okay, I uploaded the first batch of new fairy pieces onto my sandbox.
User:Sammy2012/sandbox Sammy2012 (talk) 15:44, 8 May 2026 (UTC)Reply
are these images really necessary? I feel upside down Pieces worked fine with for Nightrider, Ferz, Wazir, and Dabbaba in most incense. and a short rook is a piece exclusive on one variant. PharaohCrab speak𓀁 works𓀨 17:05, 8 May 2026 (UTC)Reply
Some reasons I'd like these images:
  • More diversity of piece images is always nice.
  • They would allow us to use two types of piece that traditionally use the same image in the same diagram. For example, the nightrider and camel both use the inverted knight image so trying to use them in the same diagram would cause problems - giving the nightrider this new image would fix that.
  • These images are more distinctive than upside-down orthodox pieces and are often sued on other chess variant websites for these pieces.
Sammy2012 (talk) 00:54, 9 May 2026 (UTC)Reply
I suppose you have a point PharaohCrab speak𓀁 works𓀨 00:58, 9 May 2026 (UTC)Reply
As an idle concern, I can only find the nightrider image used on a single website (and a hand-drawn version of it on Fandom). Granted, I don't really see any semblance of standardisation of the piece, but from a "Wikipedia is a big site and people trust it" perspective, I wouldn't want to give undue weight to a single person's idea of what the piece should look like. Primefac (talk) 11:23, 9 May 2026 (UTC)Reply
That is an understandable request. I also found this table of symbols made by the user NikNaks:
User:NikNaks/ChessTable
Maybe I could get their permission and add some of these? Sammy2012 (talk) 13:31, 9 May 2026 (UTC)Reply

Classes tleft and tright are going away

[edit]

From the latest Tech news:

The legacy CSS classes tleft and tright have been replaced with floatleft and floatright as the former do not work consistently across all MediaWiki platforms, notably mobile web and mobile apps. Projects relying on these classes are encouraged to review related usage and plan for migration. Please note that floatleft and floatright may also be deprecated in future, although there are currently no plans to do so. Read more.

It looks like this module uses these classes and may need to be updated. – Jonesey95 (talk) 23:38, 25 May 2026 (UTC)Reply

Template-protected edit request on 15 June 2026

[edit]

Diagrams do not display well in mobile view: they are shrunk, leaving a gap between the board's bottom edge and the files row. See Fool's mate (the page where I first noticed this); see also its listed parent moves: Barnes Opening, Bird Opening, Grob's Attack. When I set the size parameter to 32, the diagram then looks as good as in desktop view. Therefore, when Wikipedia is in mobile view, the default for that parameter should be 32 (or so), not 26. I tested also |size=28, and the gap became narrower, but was still visible. ~ bytekast [talk • cont • logs] 18:01, 15 June 2026 (UTC)Reply

Would you make your changes to the sandbox and provide some test cases?  Martin (MSGJ · talk) 18:16, 15 June 2026 (UTC)Reply
The diagrams appear to display fine in the mobile view, except when this template is used inside {{Infobox chess opening}}. I have added a test case, which shows that the sandbox displays fine inside the infobox. The sandbox uses a proposed merged module, Module:Chessboard mxn, and was last edited by Primefac in an attempt to complete this TFD. sapphaline or Frietjes may know more about the differences between the modules and why the recent merge attempt was reverted. There is also discussion above. – Jonesey95 (talk) 18:22, 15 June 2026 (UTC)Reply
@Jonesey95 Yes, thank you! I forgot to mention that. Outside that infobox, it does look fine, as seen many times over at Kasparov versus the World#The game. Your test case looks perfect by the way! The file-and-rank indicators around the board should account for dark mode, but no worries: they will once your core changes (concerning the layout) are merged. ~ bytekast [talk • cont • logs] 18:49, 15 June 2026 (UTC)Reply
please make local functions local (see talk page of sandbox).
peace - קיפודנחש (aka kipod) (talk) 02:44, 16 June 2026 (UTC)Reply
See #Recent_switch_to_mxn above for why the merge attempt was reverted. – SD0001 (talk) 05:01, 18 June 2026 (UTC)Reply
Yeah, there were some subpages of this template that I hadn't accounted for; I haven't really had the time or motivation to really figure out what mxn would need to incorporate those so the merge is open to anyone who wants to help out. Primefac (talk) 11:24, 20 June 2026 (UTC)Reply