adopted-ember-addons / ember-cli-flash

Simple, highly configurable flash messages for ember-cli
https://www.npmjs.com/package/ember-cli-flash
MIT License
355 stars 113 forks source link

remove requirement for providing a message #259

Closed st-h closed 6 years ago

st-h commented 6 years ago

We are happily using ember-cli-flash to display some custom notifications. Instead of just displaying a custom string, we sometimes have the need to render a component with additional functionality. This works pretty well, as we just need to pass the components name and then are able render it similar to what is shown in the docs.

this.get('flashMessages').add({
  component: 'group-undo-notification',
  model: group,
  message: '<none>',
  type: 'info'
});

However, this leads to situations where there simply is no message to display, as all the content is available through the component and additional objects that are passed in. This conflicts with the requirement to supply a message and we would like to propose to remove that requirement, as this just imposes unnecessary limitations to an otherwise very flexible addon.

sbatson5 commented 6 years ago

This is something we should be able to do pretty easily. PRs are more than welcome! I can try to set some time aside for this in the next couple of weeks

st-h commented 6 years ago

Thank you. I'll be happy to send over a PR, but wanted to check first if this would be a viable option to you at all.