Giter VIP home page Giter VIP logo

meteor-notifications's People

Contributors

andylash avatar dandv avatar hiddentao avatar kuksik avatar marcodejongh avatar rcsandell avatar rickvdp avatar sojourneer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

meteor-notifications's Issues

Set the position of messages to be fixed by default

Users cannot see the messages if they have scrolled down.

What happened is my submit button is down the bottom, when the user clicked on it and he cannot see the message that the form has been submitted.

Meteor v0.9.0 incompatiblity?

Meteor's new package system shows this package as incompatible with Meteor v0.9.0 and later. I'm wondering if the package is actually broken, or can it still be installed and will work?

notifications do not stay visible when scrolling

the notifications are visible when they first show up, on the top left. then when I scroll down, I don't see them anymore.
here is a picture:
image

similarly, when the page is scrolled down and a notification appear, it is not displayed unless the page is scrolled back up. is there an option to control that? css maybe?

Last changes break project on Meteor 0.8.3

After a 'mrt update', app won't start up anymore giving the following error:

=> Errors prevented startup:

While building package `notifications`:
package.js:12:6: Object #<Object> has no method 'addFiles'
  at configurePackage (package.js:12:6)
  at Object.use (package.js:30:2)
  at /home/chdallago/.meteor/tools/cef2bcd356/tools/packages.js:1630:29
  at Array.forEach (native)
  at Function._.each._.forEach (/home/chdallago/.meteor/tools/cef2bcd356/lib/node_modules/underscore/underscore.js:79:11)
  at _.extend.initFromPackageDir (/home/chdallago/.meteor/tools/cef2bcd356/tools/packages.js:1434:7)
  at /home/chdallago/.meteor/tools/cef2bcd356/tools/library.js:254:15
  at Object.enterJob (/home/chdallago/.meteor/tools/cef2bcd356/tools/buildmessage.js:235:15)
  at _.extend.get (/home/chdallago/.meteor/tools/cef2bcd356/tools/library.js:241:22)
  at /home/chdallago/.meteor/tools/cef2bcd356/tools/packages.js:259:36
  at Array.forEach (native)
  at Function._.each._.forEach (/home/chdallago/.meteor/tools/cef2bcd356/lib/node_modules/underscore/underscore.js:79:11)
  at /home/chdallago/.meteor/tools/cef2bcd356/tools/packages.js:258:9
  at Array.forEach (native)
  at Function._.each._.forEach (/home/chdallago/.meteor/tools/cef2bcd356/lib/node_modules/underscore/underscore.js:79:11)
  at _.extend.build (/home/chdallago/.meteor/tools/cef2bcd356/tools/packages.js:256:7)
  at /home/chdallago/.meteor/tools/cef2bcd356/tools/packages.js:1140:13
  at Array.forEach (native)
  at Function._.each._.forEach (/home/chdallago/.meteor/tools/cef2bcd356/lib/node_modules/underscore/underscore.js:79:11)
  at _.extend.build (/home/chdallago/.meteor/tools/cef2bcd356/tools/packages.js:1139:7)
  at _.extend.getForApp (/home/chdallago/.meteor/tools/cef2bcd356/tools/library.js:285:9)
  at /home/chdallago/.meteor/tools/cef2bcd356/tools/bundler.js:1732:25
  at Object.capture (/home/chdallago/.meteor/tools/cef2bcd356/tools/buildmessage.js:191:5)
  at Object.exports.bundle (/home/chdallago/.meteor/tools/cef2bcd356/tools/bundler.js:1667:31)
  at _.extend._runOnce (/home/chdallago/.meteor/tools/cef2bcd356/tools/run-app.js:406:32)
  at _.extend._fiber (/home/chdallago/.meteor/tools/cef2bcd356/tools/run-app.js:540:28)
  at /home/chdallago/.meteor/tools/cef2bcd356/tools/run-app.js:348:12

error: no such package: '[email protected]'
error: no such package: '[email protected]'
error: no such package: '[email protected]'

Smart.json:

{
  "packages": {
    "iron-router": {},
    "notifications": {},
    "paginated-subscription": {},
    "animation-helper-velocity": {},
    "autocomplete": {},
    "npm": {},
    "collectionFS": {}
  }
}

Can't set timers inside simul

Hi,

I'm using notifications with a timer configured like this:

Meteor.startup ->
  _.extend Notifications.defaultOptions,
    timeout: 10000

I created this meteor method inside lib/transactions

updateTransaction: (id, values, action) ->
  Transactions.update id,
    $set: values
  , (e, r) ->
    if Meteor.isClient
      console.log "Client!"
      if e
        Notifications.error e
      else
        Notifications.success 'Transaction updated!'

When I call this method, it generate this error in my chrome console:

Exception in delivering result of invoking '/transactions/update': Error: Can't set timers inside simulations
at withoutInvocation (http://localhost:3000/packages/meteor.js?7a66be7a03504cd2c18dd47b699e6233b60675ed:381:13)
at bindAndCatch (http://localhost:3000/packages/meteor.js?7a66be7a03504cd2c18dd47b699e6233b60675ed:389:33)
at Object._.extend.setTimeout (http://localhost:3000/packages/meteor.js?7a66be7a03504cd2c18dd47b699e6233b60675ed:398:23)
at Notifications._createTimeout (http://localhost:3000/packages/notifications.js?ae3bcb9e08ac3cbcaad716c65543173466bd4f05:279:48)
at Notifications._add (http://localhost:3000/packages/notifications.js?ae3bcb9e08ac3cbcaad716c65543173466bd4f05:251:22)
at Notifications.addNotification (http://localhost:3000/packages/notifications.js?ae3bcb9e08ac3cbcaad716c65543173466bd4f05:155:14)
at Notifications.success (http://localhost:3000/packages/notifications.js?ae3bcb9e08ac3cbcaad716c65543173466bd4f05:219:21)
at http://localhost:3000/models/transaction.coffee.js?c6a52873124126ab015781c5814c6bea2a6c7cf7:113:32
at CollectionHooks.defineAdvice.args.(anonymous function) (http://localhost:3000/packages/collection-hooks.js?3e5232f2e138e67956e336885073b86debc4374f:427:23)
at wrappedCallbackForParsingServerErrors (http://localhost:3000/packages/collection2.js?a02b3414237e62788542198aa82a2d2d9f41ead9:562:15)

I don't understand because this error message should be generated server side only but I added a if Meteor.isClient to avoid invocation on the server.

The stranger is that it runs correctly. My notifications are displayed with timer. Can you help?

Thanks and congratulations for the great work!

Time out on notifications

Hi there,

I was wondering if there was a way to time out notifications automatically after a few seconds built into this package?

Thanks!

Using notifications inside an autorun

I'm not sure that there is a solution here, but I wanted to make an issue to get comments and then to help future people. I find I'm often creating a notification on error inside an autorun. Something like this might appear in a template's rendered function:

this.autorun(function() {
  var status = doOperation();
  if (!status) {
    Notifications.error("Status failed");
  }
});

The problem is that this is that the notification insert forces this method to rerun, which isn't desired. So instead I do this:

this.autorun(function() {
  var status = doOperation();
  if (!status) {
    Tracker.nonreactive(function() {
      Notifications.error("Status failed");
    });
  }
});

I'm not sure if the library could handle this case, but it would be nice for callers if it could. Maybe it's just a doc change?

Prevent duplicate notification

Add option to prevent duplicate notification by testing if a notification with same message title or message reference is already shown.

Changing Animation

Could you nudge me in the right direction,
or tell me where to edit to change the animations?

My notifications flicker before showing for some reason..

"quick" notification by default? (and/or custom types?)

I'd like to have a "quick success" notification, but I don't want to add the options every time and or override the default options, so I did:

Meteor.startup(function() {
...
  Notifications.quick = function(message, options){
      options = options || {timeout:2000, userCloseable:false};
      options.type = this.TYPES.SUCCESS;
      return this.addNotification('', message, options);
  };
});

Now I can use Notifications.quick('item inserted') are there better ways to customize Notifications without forking?

Notifications is undefined

When trying to set default settings the server gets an error: "Notifications is not defined". As in your example I put the code into the Meteor.startup(); Method but here it seems that Notification is not defined for server.

Example:

/server/env.js

Meteor.startup({
_.extend(Notifications.defaultOptions, {
timeout: 2500
});
});

Handle links in notifications?

I use info notifications for server communication. I sometimes put links in there. To make this work I need to change notification.html to have {{{message}}} instead of {{message}}. Also click anywhere to close is too easy to get wrong, so I just allow click on the X to close instead. I'm curious if others have used this library in this way and have thoughts around the best way to change it to support this case (or if it even should).

Missing event on notification expiry

It wasn't clear to me from the documentation that the options.closed callback is invoked only when the notification is manually closed.

My usecase is to show a notification (e.g. 'saved successfully', and then when the notification expires to take a navigation action. So I would like to be able to get a callback both on a manual close of the notification and on its expiry and automatic close.

As a temporary kludge, I added a options.onExpires callback which gets called where the notifications are removed from the collection. I put the actual callback invocations on a Meteor.timeout because that seemed like the right timing. I'm sure there is a better way...

Notifications.info showing TypeError: Cannot set property 'type' of undefined

Calling Notifications.warn('title','message') as shown in the example does not work because options argument is required.

Need to fix it by adding options = options || {} to each type of the notification function like this:

Notifications.prototype.info = function (title, message, options) {
options = options || {};
options.type = this.TYPES.INFO;
return this.addNotification(title, message, options);
};

Animation

hi , Can i get other animation ? i want know ๐Ÿ˜ƒ

Notifications with a timeout does not get closed anymore

As reported by @rgoomar

I just tried it again on Chrome on Mac OSX
Went to: http://notifications-example.meteor.com/ and put a timer of 10 and it did not disappear

When debug info is enabled i get the following error:

Exception in queued task: TypeError: Cannot read property 'hideAnimationProperties' of null
    at Object.firstNode._uihooks.removeElement (http://localhost:3333/packages/notifications.js?9cda08b249239032320c7017e3b474270e9162ac:371:33)
    at Function.DOMRange._removeNodeWithHooks (http://localhost:3333/packages/blaze.js?309c2a3b573dca998c07c493ba4953d451b2c963:336:27)
    at Function.DOMRange._remove (http://localhost:3333/packages/blaze.js?309c2a3b573dca998c07c493ba4953d451b2c963:327:14)
    at DOMRange.detach (http://localhost:3333/packages/blaze.js?309c2a3b573dca998c07c493ba4953d451b2c963:473:16)
    at Function.DOMRange._remove (http://localhost:3333/packages/blaze.js?309c2a3b573dca998c07c493ba4953d451b2c963:325:7)
    at DOMRange.detach (http://localhost:3333/packages/blaze.js?309c2a3b573dca998c07c493ba4953d451b2c963:473:16)
    at Function.DOMRange._remove (http://localhost:3333/packages/blaze.js?309c2a3b573dca998c07c493ba4953d451b2c963:325:7)
    at DOMRange.detach (http://localhost:3333/packages/blaze.js?309c2a3b573dca998c07c493ba4953d451b2c963:473:16)
    at DOMRange.setMembers (http://localhost:3333/packages/blaze.js?309c2a3b573dca998c07c493ba4953d451b2c963:436:12)
    at DOMRange.removeMember (http://localhost:3333/packages/blaze.js?309c2a3b573dca998c07c493ba4953d451b2c963:530:12) debug.js:41

This seems to be caused by a change in meteor 0.8.3 that changed how UI.getElementData works

Error: Version string must look like semver (eg '1.2.3'), not 'v1.0.2'.

This error happens after upgrade Meteor to 0.9.2.1

skozz@skozz (develop) $ meteor add gfk:notifications
Figuring out the best package versions to use. This may take a moment.

/Users/skozz/.meteor/packages/meteor-tool/.1.0.30.qj6qeo++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/future.js:173
                        throw(ex);
                              ^
Error: Version string must look like semver (eg '1.2.3'), not 'v1.0.2'.
    at throwVersionParserError (packages/package-version-parser/package-version-parser.js:144)
    at Object.PV.getValidSemverVersion (packages/package-version-parser/package-version-parser.js:68)
    at Object.PV.parseVersionConstraint (packages/package-version-parser/package-version-parser.js:49)
    at new ConstraintSolver.Constraint (packages/constraint-solver/resolver.js:358)
    at ConstraintSolver.Resolver.getConstraint (packages/constraint-solver/resolver.js:88)
    at packages/constraint-solver/constraint-solver.js:122
    at Function._.each._.forEach (packages/underscore/underscore.js:113)
    at packages/constraint-solver/constraint-solver.js:115
    at Function._.each._.forEach (packages/underscore/underscore.js:113)
    at packages/constraint-solver/constraint-solver.js:114
    at Array.forEach (native)
    at Function._.each._.forEach (packages/underscore/underscore.js:105)
    at ConstraintSolver.PackagesResolver._loadPackageInfo (packages/constraint-solver/constraint-solver.js:71)
    at ConstraintSolver.PackagesResolver._ensurePackageInfoLoaded (packages/constraint-solver/constraint-solver.js:52)
    at packages/constraint-solver/constraint-solver.js:179
    at Array.forEach (native)
    at Function._.each._.forEach (packages/underscore/underscore.js:105)
    at ConstraintSolver.PackagesResolver.resolve (packages/constraint-solver/constraint-solver.js:178)
    at _.extend.resolveConstraints (/Users/skozz/.meteor/packages/meteor-tool/.1.0.30.qj6qeo++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/catalog.js:548:30)
    at /Users/skozz/.meteor/packages/meteor-tool/.1.0.30.qj6qeo++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/commands-packages.js:1849:38
    at /Users/skozz/.meteor/packages/meteor-tool/.1.0.30.qj6qeo++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:186:11
    at _.extend.withValue (/Users/skozz/.meteor/packages/meteor-tool/.1.0.30.qj6qeo++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at /Users/skozz/.meteor/packages/meteor-tool/.1.0.30.qj6qeo++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:183:27
    at _.extend.withValue (/Users/skozz/.meteor/packages/meteor-tool/.1.0.30.qj6qeo++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at /Users/skozz/.meteor/packages/meteor-tool/.1.0.30.qj6qeo++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:181:16
    at _.extend.withValue (/Users/skozz/.meteor/packages/meteor-tool/.1.0.30.qj6qeo++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at Object.capture (/Users/skozz/.meteor/packages/meteor-tool/.1.0.30.qj6qeo++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:172:21)
    at main.registerCommand.name [as func] (/Users/skozz/.meteor/packages/meteor-tool/.1.0.30.qj6qeo++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/commands-packages.js:1842:33)
    at /Users/skozz/.meteor/packages/meteor-tool/.1.0.30.qj6qeo++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/main.js:1225:23

License?

Nice project, could you specify the license?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.