Open madeleineostoja opened 7 years ago
@bede any thoughts on an uploading type prop for this? Could take advantage of new buffer state in SDK no?
@seaneking yeah so the buffer state currently won't suffice, agree a prop for it would be nice. Essentially it's just a way for the SDK to say: path X is currently being saved. Do you want to make an issue on the SDK for a way to check that saves are taking place? e.g. just buffer[this.path].saving === true
?
So you mean tacking on a saving
prop to the buffer path objects? That seems pretty messy. Maybe they should have a general meta object for all this stuff (saving, modified, etc.) Also it'd mean that the image would have to poll that anyway. Maybe have a separate saving state (either plain Boolean or array of paths saving, which you could check length for Boolean behaviour), and then images can just pulse if in the dirty buffer and saving is true. Seems a lot more general, and fills this use case well enough. Not sure though.
Re: where to put it, yeah not 100% sure on whether it should be in buffer or somewhere else, but buffer seems good enough.
As for polling - it would just be in the observer, so Simpla.observeState('buffer', (buffer) => this.saving = buffer[this.path].saving)
Oh derp yeah obviously haha.
Yeah not sure about putting it in buffer...
Img should have a (private?)
loading
oruploading
state, and apply a basic pulsing animation while it is true. Interface regression from v0 that needs to be reimplemented.