Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@bclehmann
Copy link

On the board editor page, you used to only be able to add new pieces by dragging them onto the board. This always bugged me, and I imagine it must be horrible on tablets due to the large screen and large distance to drag. I also thought there was something wrong with the app when I tried to tap and it didn't work.

This adds a pieceInHand to Chessground.state, which holds both the piece, and whether it should overwrite the piece under it when placed. Clicking a piece in the bottom panel populates this property. Clicking anywhere on the board will place the piece and clear the pieceInHand property.

I'm unsure about the last part, it may be useful to not clear the pieceInHand, so the user can place all the pieces of a given type and colour at once. But this would also require a button to clear the field, and potentially some UI work to communicate that there is a piece in hand.

Lastly, my apologies if this is suboptimally implemented, I'm very new to the codebase and I've scarcely convinced it to build on my machine.

@bclehmann bclehmann force-pushed the feature/board-editor/tap-to-place branch from d492f5d to 423565a Compare June 11, 2022 03:25
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.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.