Comments (16)
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:
from ember-cli-notifications.
No this hasn't been discussed as of yet, did you have something in particular in mind?
from ember-cli-notifications.
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.
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.
That would be great if you could put something together.
from ember-cli-notifications.
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.
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.
@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:
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.
@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.
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.
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.
@spinlock99 That that I'm aware of. Would be great to see a PR for this! @mansona
from ember-cli-notifications.
@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.
Anyone working on this issue ? I need to replace the icon with a custom image
from ember-cli-notifications.
@rinoldsimon Not as far as I'm aware ¯_(ツ)_/¯
from ember-cli-notifications.
is there any workaround for this?
from ember-cli-notifications.
Related Issues (20)
- Installation broken with Ember Octane Blueprint HOT 8
- production build fails if css minification is enabled HOT 2
- Not working on IE since 5.0.0-0 at least HOT 26
- Octane Support? HOT 2
- Can we have config for notification count / limit for number of visible notifications? HOT 1
- "on" modifier not working in ember-cli v3.6 HOT 7
- links in notifications doesn't redirect to links' target HOT 3
- Details/Summary won't expand/collapse in notifications
- `content` array is leaking between tests
- Compile Error on is not a modifier: Helpers may not be used in the element form. HOT 2
- Mistake in interactive documentation page HOT 1
- DEPRECATION: getWithDefault HOT 1
- Issue with using [email protected] in a node alpine docker container HOT 1
- Make animation duration configurable HOT 1
- Assertion Failed: Attempting to inject an unknown injection: 'service:notification-messages' HOT 3
- Fallback behaviours has been deprecated, using `this` HOT 3
- Add aria-hidden and role attribute to svg icons
- Typo in CSS variable name (--ecn-container-max-with)
- Outdated postcss-preset-env HOT 2
- ember-on-modifier deprecation warnings
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-cli-notifications.