Let's discuss adding the ability to add action buttons #533
Replies: 1 comment
-
Hey Marc. I'm definitely open to PRs on this, as well as any other feature you can think of (such as adding methods to maybe change the location of the toasts). The issue is that, as you correctly guessed, life pushed me completely off the coding realm and for the second year, I'm not having time to delve back into it seeing that in my limited spare time, it's better to devote it to my family. It would be a shame to let go of this so I'm keeping it open for updates from you guys, and I need to find new maintainers for this that have the time to develop this project. Keeping it simple, this lib so far will always work, but adding your feature is something that "may" make it more complex to update when major changes happen to the framework. If we have enough testers and maintainers for this lib, we can then discuss how to add such more complex functionalities and test them. (Maybe open an issue with this topic and see who's going to step up?) |
Beta Was this translation helpful? Give feedback.
-
Hey John & All...
I completely understand that you're a very busy man, living my dream as a A320 pilot (sooo jealous btw), but I'd really like to discuss adding the ability to be able to be able to add custom elements or at least actions buttons (for now) to Tall Toasts. I've been using Tall Toasts for a really long time, and I'm not big on jumping off the band wagon, so I really would love to see Tall Toasts grow into a full fledge notifications manager at some point in the future, but for now, let's discuss action buttons.
Now, since you're pretty busy, I am completely willing to do the hard work on this upgrade, implement the changes and submit a pull request, but I'm not really sure the best way to go about doing this, which is why I'm creating this discussion. I'm not the best javascript developer, but I know Laravel / Livewire pretty well so I'm sure I can figure it out. I just need your help in pointing me in the right direction. So hopefully in your spare time, you could throw some tips my way, so I can continue to grow your project into a huge notifications manager. But if not, I completely understand, but I'll figure it out one way or another. :P Anyways, I guess I'm going to use this thread as a notepad, maybe it will help us all come up with something...
Examples
Method
So, to start what would the method's be? Since we're keeping it simple with buttons, I thought we could just append to the style(?) method (excuse my terrible terminology), something like this?
Now, how can we add button text? What about button style? There's a bit of info we might want to send for this, so turn it into an array?
Well, to be honest, that seems goofy to me. Why not create a whole method for it? Something like...
Calling Methods?
So again, I'm more of a try it to see if it works kind of guy, so I'm not 100% sure if this would work with Tall Toasts, but is there a way to call Livewire Methods from a toast, instead of a link, you know since it would be quite useful? Example:
Or to be honest, this would look so much better...
Now of course some kind of identification would need to be sent as well... such as a friend request id, comment id (if you wanted to undo a deleted comment), etc. I'm not really sure the best way to do that.. I don't know the backend magic of Laravel Routes, but maybe something similar:
Here's the first think that came to mind:
To Be Continued...
Anyways, there's my two cents. I'll sleep on it, see what else I can think up of.. Speaking of sleep, it's getting late and I need to crash. I'll come back to this post from time to time to see what I can think up of. I'll fork this repo and tinker with it. It would be amazing if you could create a new branch so me and anyone else who would like to help could push to that branch instead of the master branch.
I would love your input as well! Any advice, such as, "dude, this definitely wont work" would be greatly appreciated!
Hope to speak to you soon!
Beta Was this translation helpful? Give feedback.
All reactions