themeteorchef / bert

A client side, multi-style alerts system for Meteor.
185 stars 27 forks source link

Notification not showing after onSuccess Hook #44

Closed jamesmundia closed 7 years ago

jamesmundia commented 7 years ago

I'm testing the Bert Alert as part of an onSuccess Hook for an autoform submission:

AutoForm.addHooks('submitPlayer', { onSuccess: function () { console.log("Player Added, Showing Success Notification"); Bert.alert('Player Successfully Added!', 'success'); } });

I imported Bert on my main.js:

import { Bert } from 'meteor/themeteorchef:bert' and those are the only Bert related code entries in the app.

The console.log runs after the submission, but no Bert.

I am using Twitter Bootstrap 3 for styling, and no custom CSS outside of that. Can this work with Bootstrap?

themeteorchef commented 7 years ago

Hi, @jamesmundia, thank you. Yes, Bert was designed for use with Base which relies solely on Bootstrap for styling.

Curious, if you open the console in your browser, do you see any errors from Bert? Also, can you let me know what browser (and version) you're trying to run this in?

jamesmundia commented 7 years ago

@themeteorchef thanks for the info. I don't see any Console messages from Bert when the alert is meant to be triggered. However, when testing the app for something different yesterday night, I noticed in the Meteor Toys session window that a Bert message appeared on the submit action, and it appeared as "null" in Meteor Toys. Not very descriptive, but it at least tells me that an alert is "trying" to happen in the session. When I'm on that laptop again tonight I'll debug it further

jamesmundia commented 7 years ago

Here's what I grabbed tonight from Meteor Toys:

bertalertmeteortoys

themeteorchef commented 7 years ago

@jamesmundia well it's definitely setting which is good. Curious, if you clone a copy of our kit Base and try to call the same alert from within that code, does it work? Noticing now that you're on Ubuntu so there may be a CSS issue with Chrome on there.

jamesmundia commented 7 years ago

@themeteorchef Thank you for the suggestion - I'll try that out to see how it affects the notifications. I'll close for now and if I get to it over the weekend i'll update with my results.

Thanks!