-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
make conditional premoves clickable #12788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
this fixes the issue where in clicking a premove after updating it still shows the old premove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, thanks for the PR!
Couple points
Currently the jump does not work when the nodes are not already present in the analysis board. This is an issue because conditional moves lines are saved across moves and devices. Probably just create the nodes then.
Nice to have, instead of jumping to the end of line allow the user to choose which move to jump. Could be done in a separate/follow up PR if needed. I think it should be made by editing renderNodesHtml to allow an optional event-listener.
If you have any questions feel free to ask here or on discord
before, the event listener was only being rebound when a new premove was added - but it wasn't being rebound when a premove was edited. This caused it to use the old value of the premove, which was incorrect. This fixes that.
I'm not sure I follow. Could you explain in terms of an example? |
|
I've also used the click event listener instead of the hook now - this is because This handles that on its own(as far as I can tell anyway) |
But if you clear the moves manually (or in the practice the user will be using another device) Then click again on the line this time it does not jump. It should instead create the node in the analysis board |
0696283 to
4736545
Compare
|
Thanks for explaining that! I believe I have a fix for this. I'm not sure about hardcoding children to |
4736545 to
e8f9b2e
Compare
since the click event listener is remade when the node is re-rendered, this hack is no longer needed
|
@kraktus Hi - been a while. Just pinging to see if this can be merged now |
|
Hey, ornicar has the final call and has been very busy these last weeks, he will review when he can 👍 |
|
Sure. Just wanted to see if there was an update. Thanks! |
* master: (752 commits) fix default translation - closes lichess-org#13034 fix puzzle board menu on mobile - closes lichess-org#13028 remove coach review translations log oauth prompts make the mobile oauth authorization page less scary fix oauth with signed token more controller code golf controller code golf delete json export no credentialless on Plan.index live setting for credentialless UA matcher try disabling credentialless New Crowdin updates (lichess-org#13022) +Artsakh Republic flag lichess-org#11631 ~Fix daily puzzle ui jumping when toggling lichess-org#12960 given Conversion[scalatags.Text.Frag, Fu[Result]] export reviews as json refactor LilaController support show moves as a voice command log unsigned oauth bearers ...
|
nice work! |
|
Thanks @ornicar! I'm not sure why when I used the Would you have any ideas? Either ways, thanks again! |
|
uh, I don't quite understand, sorry. From my tests it seems to work as intended? |
|
please get the latest master as I just pushed some forecast refactoring |
|
I was actually talking about 5fcb74b which is when I moved from I don't remember it working when I used |
This PR Attempts to fix #12707
Looks like this
out-39-21.mp4
I'm not really sure about the styling but everything else seems to work fine.