Closed dexonsmith closed 11 years ago
FYI, I added another couple of commits (d4ee090 and f4d46d5) which add a view of the chat to the history page, which I think will really help with game reviews (both writing them and reading them). Chat links to specific moves use javascript to talk directly to the history controller (rather than using the new service).
Hi @duncanexonsmith -- I clearly need to pay more attention to my GitHub notifications. This looks really great and I will take a look at it (and hopefully merge it) this weekend!
Rock and roll and jazz!
Wow. So cool. Thanks so much @duncanexonsmith
Glad it works, @davepeck! Thanks for reviewing.
I've added linking from the chat to specific moves in the history.
HistoryMoveHandler
, that shares most of its code withHistoryHandler
. It takes an extra 'move' argument in the URL:/history/([-\w]+)/(0|[1-9]\d*)/
. The only difference is that the history is initialized to the specified move instead of the latest one. If the move doesn't exist, it just goes to the latest one./service/get-historical-state/
now reports the max move number. As a result, the history page will notice if a new move has been made, and update the(out of {{max}})
text.\B#(0|[1-9]\d*)\b
to a link to that move in the history. For example,#5
will go to the fifth move. However, the#4
inabc#4
will not match, which should protect funny URLs that get pasted into the chat.