Closed lindyhopchris closed 5 years ago
These changes all look good to me so far. I'm really excited to provide this through npm
and not bower.
Would be useful for this addon to provide test helpers.
I definitely think this would be really useful for users.
@lindyhopchris I really appreciate you taking lead on this upgrade and moving the addon forward. 🙇
@Tonkpils no problem. sorry it's taken me so long to get round to it - had to wait until it was something I actually needed to do as part of what I'm working on.
Will push some more commits with some of the extra stuff.
@lindyhopchris Apologies if this is too soon; been waiting on this one for a bit and in the same position as you. Tried to install this into a project, but it's failing on calling sweetAlert it seems on this line (0, _sweetalert.default)(props).then(resolve, reject);
.
Is this something we can work on clearing up? May just be that I'm not import properly.
VM3151:1 Uncaught TypeError: _sweetalert.default is not a function
at eval (eval at <anonymous> (vendor.js:132937), <anonymous>:1:20)
at vendor.js:132937
at initializePromise (vendor.js:66127)
at new Promise (vendor.js:66607)
at Class._displaySweetAlert (vendor.js:132936)
at Class.didInsertElement (vendor.js:132924)
at Class.superWrapper [as didInsertElement] (vendor.js:58716)
at Class.trigger (vendor.js:61003)
at Class.superWrapper [as trigger] (vendor.js:58716)
at CurlyComponentManager.didCreate (vendor.js:34678)
new Ember.RSVP.Promise(function (resolve, reject) {
(0, _sweetalert.default)(props).then(resolve, reject);
}).then(result => {
if (result.value) {
Ember.get(this, 'onConfirm')(result);
} else {
Ember.get(this, 'onCancel')(result);
}
Ember.set(this, 'show', false);
});
Hi @al3x-edge
I just installed the 1.0 branch in a fresh Ember app and the {{sweet-alert}}
component is working fine. So not sure what's going on in your app. In upgrading did you remove sweet alert from your bower.json
?
Might not have actually. I’ll give it a shot when I get a chance later
today. Is there a specific way to install to a new project besides ember
install
Hi @al3x-edge https://github.com/al3x-edge
I just installed the 1.0 branch in a fresh Ember app and the {{sweet-alert}} component is working fine. So not sure what's going on in your app. In upgrading did you remove sweet alert from your bower.json?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Tonkpils/ember-sweetalert/pull/13#issuecomment-405000392, or mute the thread https://github.com/notifications/unsubscribe-auth/AADys1M7tWBgE73gNF3zXbSw0wLwVEIrks5uGYLbgaJpZM4U7LGq .
@Tonkpils think this can probably be merged into develop
now? Also, maybe we should release a 1.0.0-alpha.1
? Would definitely be good to get feedback from people before actually releasing as 1.0.0
.
@Tonkpils I'm back on something at work that has Ember Sweet Alert in it, so this is my opportunity to try to get this all sorted. Should I proceed with merging and sorting out the remaining issues? Also did you want to give me access for doing NPM releases? You did offer at one stage and guessing from your silence that it might be a good idea if you don't have time to look at this project?
Hey! Sorry it took me long to get back to you. Yeah, I can definitely give you access! Let me get to a computer and I’ll do that right away :)
Also did you want to give me access for doing NPM releases?
@lindyhopchris I'll need your NPM username. You can send it to the email on my profile and I'll get you added right away! 😄
@Tonkpils just emailed you!
So this is a work in progress pull request for what 1.0 could potentially look like. Opening this for discussion!
Thing's I've added:
ember-sweetalert
keySome example usages:
Things to add:
onOpen
,onClose
) need to be bound to the run loop.Let me know comments and ideas!