Add queueLimit property to ToastContainer
Hi, I was working on the feature mentioned in "Limit the waiting queue to 2 toasts" #640 and here are my effects 😀 I hope you will like my implementation of this property.
My implementation seems to me to meet all the needs written in this discussion, as we can limit the queue length if we have a limit set, and disable the queue if we set the property to 0. By default, the property is undefied, so as it was, nothing will change for current react-toastify users.
For this feature I also wrote corresponding tests, but I am not a specialist in this topic and I will be happy to improve or add tests, because you certainly have a much greater authority on this topic.
I also edited the playground to be able to specify queueLimit in it, unfortunately I also had to delicately modify the css to fit the new property 😀
In the course of work, I also figured out that it might be a good idea to add a toast property "includeInQueue", for toasts that aren't important. Please let me know what you think about this idea, if I get approval, I will be happy to work on it as well.
Coverage increased (+0.07%) to 90.729% when pulling c0a8e52fc9119987c4b7d540624529a289772a07 on xSyki:queue-limit-property into 75525b15723bd1adf081cc4fa54edac46842f36e on fkhadra:main.
Hi @fkhadra , What do you think about this pull request? Could you please take a look at it?
Hey @xSyki thanks for the contribution. I'll do my best to review it this week
any news?
@fkhadra hey, any updates on this pull request?
@fkhadra Any news about this pr? Can you close it or merge it?
@fkhadra Any updates about this PR? Or any other type of queueLimit feature for the library? It would be great to have a single place from where we can control such functionality, instead of passing a toastId to every place where a toast notification is being called.
Looking for this option atm
This really required feature, waiting for it
waiting for it too