-
-
Notifications
You must be signed in to change notification settings - Fork 960
[Refactor] Notification plugins #9735
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?
[Refactor] Notification plugins #9735
Conversation
- Notifications handled by plugins
✅ Deploy Preview for inventree-web-pui-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
- Ensure plugin slug is correctly attached - Consistent format - Logic fixes
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9735 +/- ##
==========================================
- Coverage 86.30% 85.25% -1.06%
==========================================
Files 1235 1238 +3
Lines 54258 54202 -56
Branches 2236 2236
==========================================
- Hits 46828 46209 -619
- Misses 6862 7425 +563
Partials 568 568
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
TBH there are so many lost / fundamentally changed mechanisms that I can not compare this to the current implementation as it just shares some entry points and names.
This means a new write of every even slightly complex notification method plugin and refactors for all plugins that trigger notifications.
@matmair fair comments - I'll see if I can adjust this to reduce the number of changes required |
…enTree into notification-plugins
- Actually *use* the notification system - Fix for email template
- Allows plugins to define per-user settings
Breaking Change
This PR represents a breaking change to any custom plugin which implements notification functionality. To continue to function, any such plugin must be reworked to follow the new approach:
NotificationMixin
classDetails
This PR is a refactor of how notification methods are defined and collected.
Currently, it is a separate collection mechanism to plugins, and loading the notification methods is complex and somewhat "brittle" (compared to the plugin registry which has been optimized),
The intent here is to just make each notification method a plugin, which is then in line with our general concept of plugins. It also ensures that notification methods cannot be "collected" from plugins which are installed but not active (which is unfortunately the case currently).
TODO
Related Issues