-
-
Notifications
You must be signed in to change notification settings - Fork 7k
feat(discord): implement templates for discord notifications #6032
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
base: master
Are you sure you want to change the base?
feat(discord): implement templates for discord notifications #6032
Conversation
CommanderStorm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add templating instead of minimalist mode as I requested.
Maintaining such outgrowths is not something that is feasible for us.
Please see the previous prs for telegram/webhooks/SMTP.
|
I had not understood that you wanted me to implement the templating feature, apologies for that. At the same time, the contribute guidelines state: Lines 444 to 446 in 4b5ff08
With the feature I am proposing here, it is one simple click to show the absolute minimum information somebody would need so that the person knows that it's time to take action. While I see the benefit of implementing the template solution, I think it would go against the contribute guideline to achieve the desired behavior. For experts, who want to have very bespoke messages, by all means, template is the way to go. But to have a minimalist message, I think that'd would not be the right approach, as it would require much more tinkering with the template to create a minimalist version compared to just switching a toggle. Can I convince you that this feature is good as it is? |
|
You can opt into configuring the notification provider with the existing templating subsystem. What said paragraph is refering to is needing to fill out 100 lines of yaml like you would need for some of the competition at the time the project was started. |
|
Had a look at the current templating code.
Therefore, a short notification that only consists of the icon + service name would not be possible; it would always be icon + the "up" or "down" word + service name. Would you be open that I expand the template to make the status message configurable, along these lines? I believe this would be a non-breaking enhancement, as the parameters are passed in optionally; for discord, it'd then make it configurable on the UI (ie., that you can change "β Up" to just "β " With that enhancement, a user would then be able to use the templating mechanism for a minimalist message as I had shown it above. Thanks for letting me know. |
|
You don't need to use |
|
I still feel the bare templating itself is too complicated for a non-expert user that simply wants to show a trivial "works" vs "doesn't work" status. Yes, it can be achieved, but if the user first has to learn a syntax to write that in a way so the template gets it right, it is too cumbersome. Maybe worthwhile for an expert to personalize what they want to see, but not for a simple user who wants something simple. I wonder if there's a middle ground.
On the backend, all 3 go through the templating engine, so there's no difference; Normal + Minimalist simply pass the desired format already "pre-cooked" to the backend, so that the simple user doesn't have to write the template syntax themselves. Wdyt |
π Overview
π οΈ Type of change
π Checklist
π· Screenshots or Visual Changes
https://ibb.co/8ndHSVRJ
UPDOWN