franciscoBSalgueiro / en-croissant

The Ultimate Chess Toolkit
https://encroissant.org
GNU General Public License v3.0
457 stars 53 forks source link

Color-coding for variations and comments #282

Open Cankyre opened 2 months ago

Cankyre commented 2 months ago

Describe the feature

I recently read a chessbook that had a pretty great coding for variations:

The idea, however unusual, is very pleasant to read ; therefore I'd recommend some sort of system that would emulate that inside en-croissant. Comments would also be able to be colored (highlight color obviously, not the text). Example:

image

Here, highlights have random colors, but it could work with a curated set of colors ; s.a. :

Thundercraft5 commented 2 months ago

Support; definitely a useful enhancement!

Cankyre commented 2 months ago

The way this would be added to the pgn is via a special comment, ex:

1. e4 {[%ec-com-type alt] blabla} 
     (1. d4 {[%ec-branch-type alt]})
     (1. f3 {[%ec-branch-type worse]} is stupid)
1... e5 {[%ec-com-type worse] something}
     (1. d5 {[%ec-branch-type better]})

In the editor this would be via buttons at the bottom of the annotation panel (for the comments) image

And as a right-click action (for the branches), menu would be set variation color, submenu with the options image

Although this small feature is kind of a big addition to the code, I feel like this would be a great deal, could improve game analysis and repertoires, and maybe be used at some point in our game report feature