Announcing TiddlyChess

I made a new release with the css modified to somehow fix the original problem with showMoves=auto, moves were not showing at the bottom in small screens as intended.

Now they show down, although with fixed size at the moment, but I think is usable. Please give it a try.

1 Like

It is indeed usable now. I’d prefer slightly smaller prev/next move buttons to save a bit of additional space for move area maybe, but this is rather a voiced caprice than an UI improvement suggestion.

Can’t wait until it’ll be at least able to display FEN strings (maybe by narrowing down the buttons a bit you could squeeze just enough screen space between the board and the buttons to display the FEN string of the current position).

Happy new year! (In the context of this thread).

I’m having troubles trying to use the plugin functionality.

I am experimenting directly on TiddlyChess — A plugin for displaying chess boards from PGN games so all the code is genuine.

I created a tiddler with a FEN title:

rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1

This is the initial position. I edited the tiddler and added an annotation to its text field, saved the tiddler. The annotation shows up fine, since the default view template is applied, so far the tiddler is not TiddlyChess aware.

I edited the tiddler again and added a FEN tag as the plugin docs say (I’ve also tried changing the content type to application/x-chess-fen, and also both options together, the result is the same). After saving the tiddler, the chess board shows up in view mode, but the annotation text is gone.

I have tried to dig into the plugin source, found the tiddler $:/plugins/anacletus/tiddlychess/ViewTemplate/fen but when it loads into the story river in view mode, I see an error:

TiddlyChess widget error: Error: ERR_BOARD.Error: ERR_BOARD at parseBoardFen ($:/plugins/anacletus/tiddlychess/pgn-widget.js:1233:24) at parseFen ($:/plugins/anacletus/tiddlychess/pgn-widget.js:1314:15) at startingPosition ($:/plugins/anacletus/tiddlychess/pgn-widget.js:2561:12) at makeGame ($:/plugins/anacletus/tiddlychess/pgn-widget.js:2809:18) at new PgnViewer ($:/plugins/anacletus/tiddlychess/pgn-widget.js:2980:17) at start4 ($:/plugins/anacletus/tiddlychess/pgn-widget.js:5879:16) at MyWidget.render ($:/plugins/anacletus/tiddlychess/pgn-widget.js:5976:19) at Widget.renderChildren ($:/core/modules/widgets/widget.js:616:15) at TranscludeWidget.render ($:/core/modules/widgets/transclude.js:34:8) at Widget.renderChildren ($:/core/modules/widgets/widget.js:616:15)

I have also tried to modify the tiddler from:

<$pgn  pgn={{!!text}} fen={{!!title}}}/>

to

<$pgn  pgn={{!!text}} fen={{!!title}}}/>

{{!!text}}

and my annotation still does not show up.

Hi, and happy new year also!

Do you enclose the annotation between curly brackets as the doc mentions? When I do that, it shows in the board, at the right side.

Another option is to do it in a regular tiddler, if you want to see the annotation outside the board:

<$pgn fen=“rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1” initialPly=last mode=min orientation =“black”/>

Annotation

Thanks, I completely forgot about that and overlooked it when skimming through the doc to refresh.

Is it possible to have the board widget honor complex multi-line/paragraph comments?

A simple example to test is

{
foo

foo
}

I see it as foo foo (a single line) in the widget.

This is the reason I initially treated the whole FEN tiddler text field without curly braces as annotation - I hoped I can make full use of wikitext there, like link to other FEN/PGN tiddlers in the annotation and have TiddlyWiki render them as valid clickable links in view mode.

I have created a regular tiddler with the text copypasted from the quote above:

<$pgn fen=“rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1” initialPly=last mode=min orientation =“black”/>

Annotation

With no tag/content type, I see just the wikitext code which is expectable.

If I add a PGN tag or set the content type, the board gets rendered, but the annotation is not displayed under it.

If I tag the tiddler FEN (which does not make much sense?) I get the error:

TiddlyChess widget error: Error: ERR_TURN.Error: ERR_TURN at parseFen ($:/plugins/anacletus/tiddlychess/pgn-widget.js:1327:18) at startingPosition ($:/plugins/anacletus/tiddlychess/pgn-widget.js:2561:12) at makeGame ($:/plugins/anacletus/tiddlychess/pgn-widget.js:2809:18) at new PgnViewer ($:/plugins/anacletus/tiddlychess/pgn-widget.js:2980:17) at start4 ($:/plugins/anacletus/tiddlychess/pgn-widget.js:5879:16) at MyWidget.render ($:/plugins/anacletus/tiddlychess/pgn-widget.js:5976:19) at Widget.renderChildren ($:/core/modules/widgets/widget.js:616:15) at TranscludeWidget.render ($:/core/modules/widgets/transclude.js:34:8) at Widget.renderChildren ($:/core/modules/widgets/widget.js:616:15) at RevealWidget.render ($:/core/modules/widgets/reveal.js:46:7)

PS: this and the post above are done in Vivaldi for Android, if it matters.

Hi.

Sorry, It seems to be a problem with the double quotes in the example, try to replace them with regular double quotes.

For a line break, you can put to consecutive pgn comments, like:
{C1}
{C2}

I have just found that

{C1}
{C2}

in a FEN tagged tiddler with FEN string in the title works, while

{C1}

{C2}

only displays the first one.

I created a Github pull request for documenting the annotation gotchas discussed here.

That’s great, thank you.
I have merged it and created a new release.