-
Notifications
You must be signed in to change notification settings - Fork 0
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
Drag and Drop functionality for Stacks #303
Conversation
…tack capturing the card
[Features] * Enter key on filename field in NewCardDialog trigger metafile generation and card loading
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Picking up a stack and dropping it back down in the same location causes the stack to disappear and triggers several warnings stating that it has "encountered two children with the same key." Once you add in a check to see if the pickup and drop locations are the same (similar to what you did with the card components), this PR can be approved.
@jettseale Commit feba14f should address that "encountered two children with the same key" issue. Also, commit e22e52a includes a fix for when a card is dragged between two stacks, which was previously allowing the dragged card to become duplicated onto both stacks. This was caused by not including a clean-up step when both the |
Description:
Stack
interactions were not re-implemented during the React refactoring process, so the only possible interactions were the creation of a newStack
that contained the top two cards in the Redux store when clicking on a button on the canvas. This PR reintroduces the ability to create newStack
instances by dragging and dropping cards on top of each other (as well as dropping cards onto existing stacks, and dropping stacks onto existing stacks). Cards can also be removed from aStack
instance by dragging them off of the stack.This PR signifies the following version changes:
Changes:
This PR makes the following changes:
CanvasComponent
handles updatingCard
andStack
positions when dragged, and removingCard
instances from aStack
when dragged away from the stack.CardComponent
handles creating aStack
when a card is dropped onto a card, and appending a card to aStack
when a card is dropped onto a stack.StackComponent
handles moving a card into theStack
when a previously captured card is dropped onto a new stack, and merging captured cards into a singleStack
when a stack is dropped onto a stack.Card.captured
property typing updated to represent the UUID of the capturingStack
instead of a boolean flag indicating whether the card is currently captured.use
overloader
(adhering to standards described in Webpack 5 release notes).handlers
split intocards
andstacks
for consistent Redux Action Creator testing and usage.cards
andstacks
, as well as updates for validatingStackComponent
drag-and-drop interactions.Checklist:
Before submitting this PR, I have verified that my code:
fix/
orfeat/
branch that was initially branched off fromdevelopment
.yarn lint
) and unit testing (yarn test
).yarn package
).Additionally, I have verified that: