Skip to content

Export the sprite and return an add function when deleting the sprite.#1438

Merged
kchadha merged 2 commits intoscratchfoundation:developfrom
kchadha:return-add-sprite-function-when-deleting
Aug 9, 2018
Merged

Export the sprite and return an add function when deleting the sprite.#1438
kchadha merged 2 commits intoscratchfoundation:developfrom
kchadha:return-add-sprite-function-when-deleting

Conversation

@kchadha
Copy link
Contributor

@kchadha kchadha commented Aug 8, 2018

Proposed Changes

Towards the 'Restore' functionality for restoring deleted sprites. Export a sprite before deleting it and return a function to add that sprite back.

Test Coverage

Manual testing.

Related PRs

scratchfoundation/scratch-gui#1438

@kchadha kchadha force-pushed the return-add-sprite-function-when-deleting branch from cf0bc9d to 5ef246a Compare August 8, 2018 22:30
@kchadha kchadha added this to the August 2018 milestone Aug 8, 2018
Copy link
Contributor

@rschamp rschamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is so clean!

@rschamp
Copy link
Contributor

rschamp commented Aug 9, 2018

It would be nice to have tests however

@kchadha
Copy link
Contributor Author

kchadha commented Aug 9, 2018

@rschamp, just added an integration test for restoring a deleted sprite. This also uncovered a subtle bug where the restoreFunction returned by the deleteSprite function was not returning the promise of adding the sprite back.

@rschamp
Copy link
Contributor

rschamp commented Aug 9, 2018

Thank you!

@kchadha kchadha merged commit ec41b4a into scratchfoundation:develop Aug 9, 2018
@kchadha kchadha deleted the return-add-sprite-function-when-deleting branch August 9, 2018 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments