I know, I'm a "fundamentalist" about the minimal amount of chess knowledge required to visit a websiteJeremy Bernstein wrote:OK. I know you don't like the coordinates and side-to-move indicators, but I think you're just being elitist about it -- I predict that a user survey would indicate that 85% of pgn4web users would find them useful. Nevertheless, I'll do my part without the "patzer features" and drop a note when I'm ready.
In reality, the design goal is to be minimalistic: the center of the attention should be the chessboard, anything else should be there only if necessary and only optionally. So buttons are the bare minimum (and can be shaded or removed), the dropdown is optional (and reverts back to a plain label after selecting the game) and no row/column around the board. Those row/column would also add complexity to the general setup, because in the general case I'd need to make them optional, and allow configuring colors/fonts and so on. Much simpler to leave the board as it should be (without coordinates) and leave it to the developer of each specific web page to add them if they whish, it's not that hard to do
Back to the variation code, a couple of comments to clean up your code after an high level look:
1) please dont hard code css styles for variants. Just enclose variants into a <span class="variant"> ... </span> tag in pgn4web.js, then I'll take care to fix the html/css files so that a proper color/font is defined and configured
2) there is a considerable amount of code to define and use random UUIDs, I guess to tag variants. Is the UUID format really needed? Would not it be much simpler to have a nextVariantId number (a global var), set to 1 at startup, used and incremented each time a new variantId is needed? I'd really like to avoid unnecessary chunks of code in the main pgn4web.js
I'm sure I'll have more comments as we go along, my goal is to fully undertand what's being added in order to be able to maintain it if needed...