Skip to content

Confirmation box for swaps #3

@shaoster

Description

@shaoster

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions