-
Notifications
You must be signed in to change notification settings - Fork 197
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
Idea for 3.0 API #22
Comments
Love to hear what you think! @caroso1222 @honzabilek4 |
Just thought of another thing! We might want to consider changing the way icons work, seeing that this method is pretty specific to font awesome. If you want to use material design icons for example, it wouldn’t work.. Just thinking aloud here, maybe something like: Icon:
could work, where if type of icon is string it defaults to class |
Hey @rijkvanzanten , I was also thinking about allowing to override the configuration per function call, but now I doubt if it's really necessary. Maybe having the notifications consistent throughout the entire app is more desirable in general. |
Hey @rijkvanzanten, this is simply awesome, thanks a lot! I really appreciate all the love given to Notyf. It's impressive that this single issue is taking care of a lot of issues, I love it. I like the API, let's roll it in 3.0.0. I'll also take into consideration the input from @honzabilek4 as having default configs is critical for the success of the project. Thanks both for this, made my day. I'll work on this right away and keep you posted here. |
Hey everyone. I finally released v3.0.0 and this issue was the cornerstone of this major release. Thanks everyone for the great ideas and suggestions on this thread. I've mentioned you all guys in the credits for 3.0.0. There are still some things in the roadmap like the ability to programmatically close the toasts, but I'll release that in 3.1.0 for sure. Thanks again, you're the best. |
Hey @caroso1222! Thanks for the project ❤️
I have been thinking about the API and a way to extend the API so it's easier to add more notification types than just
success
anderror
.Seeing that the code that makes the two "types" is nearly identical, it should be pretty "easy" to turn it into a loop:
Instead of using
I propose moving to:
By nesting the
types
in thetypes
key, we keep the "root" level open for global options, for exampleposition
:bottom left|bottom right
orclassPrefix
:noty__
.By using an object instead of a string for the individual
This API change should take care of #6, #7, (half) #13, #17, and #20. Oh, and #21 of course 😉
The text was updated successfully, but these errors were encountered: