Animation Tab: Upload PNGs#7959
Conversation
Use Uuid key for cloned animations
| } | ||
| } | ||
|
|
||
| function onComplete(state, action) { |
There was a problem hiding this comment.
TODO: Don't put functions in the store.
|
Brent, PTAL. I believe I've addressed everything from your initial scan of the original PR, and generally done a lot of cleanup. |
| type: HANDLE_UPLOAD_ERROR, | ||
| status: status | ||
| }; | ||
| }; |
There was a problem hiding this comment.
I like how this turned out as a duck module.
In terms of what we export, we should probably try to be consistent (and document somewhere what expectations are). It looks like you've exported a reducer, and an object of actions. https://github.com/erikras/ducks-modular-redux recommends exporting a reducer as default, and then exporting actions as top level functions (this is largely inspired by ES6 syntax where I can then do import reducer from './duckModule and import * as actions from './duckModule.
I'm not sure I have strong opinions on what is best. Your way seems fine if we want to make this the standard.
|
lgtm :) |
…edux-thunk in our tests.
Add the ability to upload a PNG image to the animation tab, and rename, clone or delete that image. Uses the new
v3/animationsAPI added in #7911. This is the last extracted part of #7905.This is just the first step along the road to an actual functioning Animation Tab. The next step will be using the basic metadata we have to build a createSprite(animationLabel, x, y) command, so the curriculum team can start to build around assets imported through the animation tab. Then we'll turn our attention to integrating Piskel, which will make the animation tab functionality much more robust.
Possible Improvments
I'd appreciate some help working out what's important to do now, and what I can save for later. Again, we want to get a simple version of this to the Ed team ASAP.