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.

Jump to content

Template talk:Chess viewer

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
(Redirected from Module talk:Chess viewer/sandbox)
Latest comment: 1 hour ago by Volvox in topic i18n

Knight movement animation

[edit]

Currently, the knight is animated to move horizontally first, then vertically. I think we should make it a single straight motion, as done in other websites, eg. Chess.com and Lichess. – SD0001 (talk) 12:29, 1 January 2026 (UTC)Reply

I agree, the knight movement struck me as a little unnatural, when I first came across this otherwise fantastic template. --Volvox (talk) 14:25, 3 January 2026 (UTC)Reply
 Done Looks like consensus is to make them move direct. I'm not much of a chess player myself and was going of descriptions of knights "moving in an L". Ironically the L-shaped thing was a lot harder than just making them move normal. Bawolff (talk) 21:16, 3 January 2026 (UTC)Reply
It's how first-time players are taught how the piece moves. But once you're past being a beginner, it's very unusual to actually visualise it as an L-shaped movement. – SD0001 (talk) 17:13, 4 January 2026 (UTC)Reply

Board colors

[edit]

@Bawolff, see if you wanna use the type option from Special:Diff/1330904079/1330904753 to switch to some other color combinations, e. g. Special:Permalink/1330904683. I don't really like the default one, though I know it's used in some older templates. The new boards are from c:Category:Chessboard480 Ponor (talk) 07:27, 3 January 2026 (UTC)Reply

While I am happy with the change, I'm not sure if "type" is the best choice for the parameter name. I suppose "style" is already taken. Maybe color would be better? Bawolff (talk) 21:07, 3 January 2026 (UTC)Reply
 Done Using parameter name color Bawolff (talk) 21:13, 3 January 2026 (UTC)Reply
Yeah, 'style' was already taken for what's described as 'type'. Maybe the two can be switched. I was just playing with the idea, I leave it up to you! Thanks. Ponor (talk) 21:32, 3 January 2026 (UTC)Reply

Highlight last move

[edit]

It's common for chess widgets to indicate the move that was just played, by subtly changing the color of the previous and current squares of the piece that just moved. This would be cool to have here. (Eg. see the hrwiki gadget as seen on hr:Rétijeva_studija, although I think they have over-emphasized it.) In case of castling where two pieces have moved together, only the king's position needs to be highlighted. – SD0001 (talk) 12:04, 31 January 2026 (UTC)Reply

i18n

[edit]

Hi, I attempted to make the module work with localized notation on lbwiki. I created lb:Modul:Chess viewer/i18n to define the mapping between Luxembourgish and English piece notation and to define the formatting of the single move captions (e.g. "1. ... e5" instead of "1... e5"). Then, in lb:Modul:Chess viewer, I added a function to translate the PGN that is passed to the template to English notation, let the rest of the module work on the translated version, and let makeMoveCaption work with the original PGN and format it according to the i18n submodule.

I also added translations for all the alt and hover texts. Unfortunately, for grammatical reasons, I had to translate all the color and piece combinations separately.

My intent was to make it possible to use mw:Synchronizer to keep the main module up-to-date between wikis and manually manage the i18n submodule. Please let me know, if my approach needs to be refined. --Volvox (talk) 04:13, 28 July 2026 (UTC)Reply