-
Notifications
You must be signed in to change notification settings - Fork 13
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
Wish List - Get rid of promises #16
Comments
I'm curious how ember-concurrency could help? Promises or co-routines the two would have the same issue. Aside from cancellation support which you could implement a simple case here if you assume you only want one modal open at a time. I'd like to hear more thoughts on how you feel e-c would help. And then discuss how you could accomplish the same thing with some fancy promise-chain footwork to avoid adding a dependency. |
@sukima this was a very long time ago (sorry, been away from developer-land for a few years...) so I could be misremembering: From what I recall, I was wanting to internally track state so that the user didn't need to worry about it. I wonder if there was a reason I didn't think promises were the right route? I don't see why we couldn't internally track state with promises.. You know, I think I tried and maybe ran into issues stacking promises. I think I could get an open-close succession to work, but not open-close-open, so I ended up just returning the promise and letting the user handle it. I'm sorry that I don't remember! If I get a chance, I can dive back into this, but I'm not sure. |
@sethbrasile You might be right. I cannot remember either. However I did do a lot of study into the remodal and ember-remodal code and developed a wrapper for it that I think handles the open-close-open for you. My ember add on ember-confirmed has a The basic idea is that the |
I would love it if it was possible to open/close modals in quick succession without using promises. I believe this may be possible with ember-concurrency, but I don't want to add another dependency to the consuming app since this is, in fact, just a modal addon. Please leave a suggestion if you have one!
The text was updated successfully, but these errors were encountered: