Skip to content

feat: allow lowercase san in the move popup#214

Merged
thomas-mauran merged 17 commits intothomas-mauran:mainfrom
xiangsgao:dev
Feb 9, 2026
Merged

feat: allow lowercase san in the move popup#214
thomas-mauran merged 17 commits intothomas-mauran:mainfrom
xiangsgao:dev

Conversation

@xiangsgao
Copy link
Contributor

@xiangsgao xiangsgao commented Feb 8, 2026

Convert lower case letters into uppercase so they become valid sans

Description

If an user enters all lower case sans, this is sometimes invalid because lower case denotes pawn pieces only. I did not know that but yeah... this update should fix it.

Fixes # (213)

How Has This Been Tested?

Try entering all the possible SANs in lower case. Someone with more chess knowledge than me testing this would be helpful.

  • 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 great pr works well on my side, I tested multiple cases and don't see any issue.
I know you are not familiar with chess itself, do you want to still try to add some rust test in the test folder for that normalize_lowercase_to_san method ?
Else don't worry I can do it in another pr !

Thanks again for the fast patch !

@thomas-mauran thomas-mauran changed the title Dev fix: allow lowercase san in the move popup Feb 8, 2026
@thomas-mauran thomas-mauran added the bug Something isn't working label Feb 8, 2026
@thomas-mauran thomas-mauran changed the title fix: allow lowercase san in the move popup feat: allow lowercase san in the move popup Feb 8, 2026
@thomas-mauran thomas-mauran added enhancement New feature or request and removed bug Something isn't working labels Feb 8, 2026
@xiangsgao
Copy link
Contributor Author

Hello @xiangsgao great pr works well on my side, I tested multiple cases and don't see any issue. I know you are not familiar with chess itself, do you want to still try to add some rust test in the test folder for that normalize_lowercase_to_san method ? Else don't worry I can do it in another pr !

Thanks again for the fast patch !

Absolutely, this is a good idea. I don't know if SANs in the test are valid, but I can totally check that the helper function spits out a valid output. Actual validation of the SANs will be done later by the shakmaty::san::San crate.

Updated.

@thomas-mauran
Copy link
Owner

Works like a charm perfect thanks for your contribution and reactivity @xiangsgao !

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants