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

Allow for undo burst functionality (#36) #13

Merged
merged 8 commits into from
Jun 25, 2019
Merged

Allow for undo burst functionality (#36) #13

merged 8 commits into from
Jun 25, 2019

Conversation

colebillys19
Copy link

Implemented 'undo burst' functionality (issue desmosinc#36).

Summary:

  • added functions to get and set calculator state to the calc-helpers file
  • mapped frame and frameIDs (from the images state slice) to the Burst component's props
  • changed the Burst component's local state to include prevFrames, prevFrameIDs, and prevCalcState to allow for undo
  • in handleRequestBurst, im grabbing these three values prior to burst capture
  • if the capture is successful, the data is saved in local state
  • if unsuccessful, data is not saved
  • also added isCapturing to local state to trigger UI change when burst is being captured... capture button changes to 'capturing...' and is unclickable
  • when a burst has been captured, an undo button appears in the UI
  • added undoBurst action creator, UNDO_BURST action type
  • added handleUndoBurst method, dispatches action and reverts calculator

@misscoded
Copy link

:shipit:

@misscoded misscoded merged commit 5e3c760 into rithmschool:master Jun 25, 2019
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.

2 participants