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

Reimplement img upload 'pulsing' animation #55

Open
madeleineostoja opened this issue Apr 12, 2017 · 5 comments
Open

Reimplement img upload 'pulsing' animation #55

madeleineostoja opened this issue Apr 12, 2017 · 5 comments
Assignees

Comments

@madeleineostoja
Copy link

Img should have a (private?) loading or uploading state, and apply a basic pulsing animation while it is true. Interface regression from v0 that needs to be reimplemented.

@madeleineostoja
Copy link
Author

@bede any thoughts on an uploading type prop for this? Could take advantage of new buffer state in SDK no?

@bedeoverend
Copy link
Contributor

@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?

@madeleineostoja
Copy link
Author

madeleineostoja commented May 22, 2017

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.

@bedeoverend
Copy link
Contributor

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)

@madeleineostoja
Copy link
Author

Oh derp yeah obviously haha.

Yeah not sure about putting it in buffer...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants