Code Monkey home page Code Monkey logo

Comments (16)

schickm avatar schickm commented on July 24, 2024 2

I don't know if this will just be further noise, or helpful to someone - but I went the route of allowing a component option to be specified when adding a notification. This doesn't let you do whole-hog customization of the notification, but does allow you to take advantage of templating logic when rendering your message. Here's a diff of my branch vs. master to give you an idea:

https://github.com/stonecircle/ember-cli-notifications/compare/master...schickm:custom-notification-component?expand=1

from ember-cli-notifications.

mansona avatar mansona commented on July 24, 2024

No this hasn't been discussed as of yet, did you have something in particular in mind?

from ember-cli-notifications.

 avatar commented on July 24, 2024

I already use your addon in my app and it works quite well. The only request is that sometimes I want to provide more context to the notification, which requires custom HTML.

Either custom HTML, or:

  • the ability to replace the icon with a custom image
  • give the notification a custom class
  • provide hooks on 'willAppear' and 'willDestroy'.

I haven't looked at the internals of the plugin or the best way moving forward yet.

from ember-cli-notifications.

mansona avatar mansona commented on July 24, 2024

Hmm... yea I think there are some customisations available but I don't think we have everything you need, and I don't know if we can actually provide everything you need directly.

It might be a good idea to experiment with extending the actual plugin exactly like this: https://github.com/Blooie/ember-cli-notifications/blob/master/app/components/notification-message.js

If you wanted I could put together a quick example if you haven't done something like this before?

from ember-cli-notifications.

 avatar commented on July 24, 2024

That would be great if you could put something together.

from ember-cli-notifications.

nightsh avatar nightsh commented on July 24, 2024

Is there any chance that by implementing this we would be able to insert custom HTML links in the messages? I tried with the latest release and HTML snippets are ignored for now (i.e. markup is displayed as it is).

from ember-cli-notifications.

mansona avatar mansona commented on July 24, 2024

I am planning to look into this over the weekend and I will keep this in mind @nightsh and let you know where my investigations bring me 👍

from ember-cli-notifications.

 avatar commented on July 24, 2024

@mansona Did you happen to look at this last weekend at all? My goal is to have it customizable to look something like Pinterests notifications:

screenshot 2015-06-20 14 03 52

Which at a minimum would mean:

  • ability to replace icon with a custom image
  • ability to add a custom css class on the individual notification containers
  • ability to add html into the notification (bold, links, new lines)

from ember-cli-notifications.

nightsh avatar nightsh commented on July 24, 2024

@mansona any progress on this? Anything you need help with? I am willing to give it a try, but I'm also not a big fan of duplicating effort.
Kudos for your work so far! 🍻

from ember-cli-notifications.

mansona avatar mansona commented on July 24, 2024

Hey @nightsh I didn't get a chance to look at it over the weekend, and probably won't for the next couple of weeks if I'm honest.

Have a crack at it yourself and we'll collaborate, maybe @ynnoj might get involved 😂

from ember-cli-notifications.

spinlock99 avatar spinlock99 commented on July 24, 2024

Is anyone working on this issue? I'm just starting to integrate ember-cli-notifications into my application and I will be taking on this task (and a few others).

from ember-cli-notifications.

ynnoj avatar ynnoj commented on July 24, 2024

@spinlock99 That that I'm aware of. Would be great to see a PR for this! @mansona

from ember-cli-notifications.

spinlock99 avatar spinlock99 commented on July 24, 2024

@ynnoj cool. I should have something in a few weeks (our schedule is crazy right now but this is on the list of things the eventually get done).

One other piece of the API I'd like to change is how the Notifications Service is configured. It feels weird to configure it in the ApplicationRoute. I'd like to export the service from app/services in the addon so that people can extend it in the consuming app and override defaultClearDuration and defaultAutoClear. We also have a policy of not auto-clearing warnings and errors so I'll probably wind up creating defaults for each notification type.

Thoughts? Let me know if I'm heading in the right direction.

Thanks!

from ember-cli-notifications.

rinoldsimon avatar rinoldsimon commented on July 24, 2024

Anyone working on this issue ? I need to replace the icon with a custom image

from ember-cli-notifications.

ynnoj avatar ynnoj commented on July 24, 2024

@rinoldsimon Not as far as I'm aware ¯_(ツ)_/¯

from ember-cli-notifications.

rinoldsimon avatar rinoldsimon commented on July 24, 2024

is there any workaround for this?

from ember-cli-notifications.

Related Issues (20)

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.