Skip to content
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

Confirmation box for swaps #3

Open
shaoster opened this issue Jun 15, 2020 · 0 comments
Open

Confirmation box for swaps #3

shaoster opened this issue Jun 15, 2020 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers UI

Comments

@shaoster
Copy link
Owner

Context
Uncovered! places great importance on accurate card swaps.
Given our customized (and somewhat glitchy) usage of react-beautiful-dnd, the drag-and-drop is not as reliable as we'd like it to be.

Proposed Fix
There's a number of ways to accomplish this, but the most straightforward seems to be:

  • a modal dialog box asking the player to confirm their swap.
  • a visual indicator highlighting the cards to be swapped.

Relevant Code
The existing code that handles the drag and drop card-swapping is fired when the player releases their mouse or stops their touchpad drag: https://github.com/shaoster/uncovered/blob/master/src/component/PlayerArea.jsx#L18

The existing code might be moved to another function called when the player clicks the "confirm" button on the modal dialog and the existing onDragEnd handler can instead open the dialog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers UI
Projects
None yet
Development

No branches or pull requests

1 participant