-
Notifications
You must be signed in to change notification settings - Fork 102
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
Implement Promise API #32
Comments
Hey @bradberger, I would like to give adding this feature a try. I have a question for you before I get started. It looks like prompt, confirm and alert all have a fluent interface and return "this". How would you like to determine when to keep the interface fluent and when to return a Promise. I want to avoid breaking backward compatibility as much as possible. One potential solution is call a method to enable promises similar to closeLogOnClick. var promise = alertify.enablePromises(true).prompt("This is a prompt dialog"); Please let me know what you think and thanks for resurrecting Alertify! |
@denheck Thanks for being willing to help out! I actually don't think it would be an issue to just not return That's just my thought, but I'm not 100% sure how other people are using it, so would also be interested to hear if anyone else has anything to add. |
@bradberger here is a link to my PR: #47 Let me know if you would like me to change anything. Thanks! |
Looks great, thanks! I'll double check everything tomorrow and merge it. The only thing is if it's possible to add tests for it, that would be great. So far the project is kind of behind the whole testing game and has very low coverage. but if we can implement it for new changes that would be great. |
@denheck Also sent you an invitation to join the contributors team, we're definitely looking to get more people on board to help out with the project and try to keep it alive 😄 |
@bradberger Thanks for the invite! I would be happy to add tests for it. I should be able to do that over the weekend. |
I am having a hard time getting Sauce Connect to start when I run Karma Debug Log:
Here is the output I get when running Sauce Connect manually:
|
Yeah, I think that has to be set up. I'll try to get you that when I get back in. I actually think the workflow for local development doesn't even require it, as the there are gulp commands for local testing, and that's more of a CI test, but either way let me see what I can do to get you those credentials when I get back in... Just sent you an invite for the CI system too, so you can re-run tests, etc, there as needed, too. |
Actually think I'm going to need to create a Alertify team on Sauce, so will try to get to that later on this evening, then you can set up your own credentials as a team member. |
Thanks @bradberger, that helped solve my problem! I forgot to commit the dist files and quickly realized it after running the ci tests on my local repo. I updated my PR and the tests are now passing. Let me know if you need me to make any other changes before merging. |
Awesome, thanks @denheck! It's been a crazy day and haven't had a chance to look at it yet, but I'm sure it's all good 😄 |
Just updated bower and npm, too, so everything's merged. The website should be too, though it might take a bit for the cache to show the changes. @denheck Thanks again! |
Per issue #15 add a new promise aware api. If a global Promise constructor is available, then it will return a promise, if not the api returns undefined. The old callback api should always be supported.
The text was updated successfully, but these errors were encountered: