Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[alert] rename NgbDismissibleAlert, make it non-dismissible #660

Closed
jnizet opened this issue Sep 2, 2016 · 1 comment
Closed

[alert] rename NgbDismissibleAlert, make it non-dismissible #660

jnizet opened this issue Sep 2, 2016 · 1 comment

Comments

@jnizet
Copy link
Member

jnizet commented Sep 2, 2016

NgbDismissibleAlert has a strange name: it implies that regular alerts, i.e. NgbAlerts, are not dismissible, although they are. And bizarrely, NgbDismissibleAlert is always dismissible with a close button, even though the whole point of the directive is to have an alert that self-closes itself after a while, rendering the close button redundant.

We're still in alpha version, so renaming a component is not a big deal.

What I propose:

  • rename NgbDismissibleAlert to NgbSelfClosingAlert
  • add a boolean dismissible input to NgbSelfClosingAlert, aligning it with NgbAlert
  • set its default value to false

The last point is more debatable than the others. I typically use such alerts for sort-lived success messages where the close button is redundant. Maybe others use it for long-lived messages where having the close button by default is better. But anyway, since the default values will soon be customizable globally, that's not a big deal.

@pkozlowski-opensource
Copy link
Member

I agree that we need to clean-up our alerts offering.

jnizet added a commit to jnizet/ng-bootstrap that referenced this issue Sep 4, 2016
- refactor NgbDismissibleAlert to NgbSelfClosingAlert
- make it possible to hide the close button on self-closing alerts
- make the self-closing alert tests a bit less convoluted

fix ng-bootstrap#660
jnizet added a commit to jnizet/ng-bootstrap that referenced this issue Sep 5, 2016
- refactor NgbDismissibleAlert to NgbSelfClosingAlert
- make it possible to hide the close button on self-closing alerts
- make the self-closing alert tests a bit less convoluted

fix ng-bootstrap#660
@icfantv icfantv closed this as completed in 720c409 Sep 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants