Skip to content

Allow user to input moves using a pop up#205

Merged
thomas-mauran merged 10 commits intothomas-mauran:mainfrom
xiangsgao:dev
Jan 29, 2026
Merged

Allow user to input moves using a pop up#205
thomas-mauran merged 10 commits intothomas-mauran:mainfrom
xiangsgao:dev

Conversation

@xiangsgao
Copy link
Contributor

@xiangsgao xiangsgao commented Jan 25, 2026

Title

Allow the user to input moves using a pop-up

Description

Allow the user to input a new move using chess notation via a pop-up.
I have not done Rust programming for a long time, so do be critical and examine my changes thoroughly. Let me know if you would like to see any further changes.

Fixes #33

How Has This Been Tested?

Simply hit the escape key when it is your turn to see a pop-up in which you can then enter a chess notation for moves. I do not know how to play chess, so please help test a bit.

  • Test A
  • Test B

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@thomas-mauran
Copy link
Owner

Hello @xiangsgao very nice job it seems to work fine.
I have a few ideas on how to improve it a bit for the user experience we might want to work on !

  • Put the popup on the right side not in the center so we can still see the board
image - use another key than escape to open that popup, such as M (for move) for example which I think is not assigned yet - In the popup above the esc to close and under the input we could have some examples like Nf3, e4, Qe2, exd5, or maybe a link to https://en.wikipedia.org/wiki/Algebraic_notation_(chess) directly to help user write the correct notation !

@xiangsgao
Copy link
Contributor Author

xiangsgao commented Jan 27, 2026

Hello @xiangsgao very nice job it seems to work fine. I have a few ideas on how to improve it a bit for the user experience we might want to work on !

  • Put the popup on the right side not in the center so we can still see the board

image - use another key than escape to open that popup, such as M (for move) for example which I think is not assigned yet - In the popup above the esc to close and under the input we could have some examples like Nf3, e4, Qe2, exd5, or maybe a link to https://en.wikipedia.org/wiki/Algebraic_notation_(chess) directly to help user write the correct notation !

I see. This is a good suggestion. Done.

A couple of things to mention:
I used the guide from chess.com instead of Wikipedia.
I don't have pop up width fit exactly with the rest of the rectangles to the right. Hope this is not an issue.

@thomas-mauran
Copy link
Owner

A couple of things to mention: I used the guide from chess.com instead of Wikipedia. I don't have pop up width fit exactly with the rest of the rectangles to the right. Hope this is not an issue.

Works fine ! the popup is well placed no worries for the perfect fit, if you can just fix the linting issues so that the ci pass and I can merge that :)
CI here

@xiangsgao
Copy link
Contributor Author

A couple of things to mention: I used the guide from chess.com instead of Wikipedia. I don't have pop up width fit exactly with the rest of the rectangles to the right. Hope this is not an issue.

Works fine ! the popup is well placed no worries for the perfect fit, if you can just fix the linting issues so that the ci pass and I can merge that :) CI here

Sounds great. I just ran the formatter. All checks cleared.

@thomas-mauran
Copy link
Owner

Perfect LGTM thank you @xiangsgao for your contribution !

@thomas-mauran thomas-mauran merged commit 64e046c into thomas-mauran:main Jan 29, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keyboard shortcuts for moves

2 participants