feat: add user specific notification settings
The settings can be customized for each origin and each processor individually. The default Web indicates notifications shown in the Backstage UI. By default, if there are no settings saved in the database, all notifications are enabled for all processors. The origins will populate by time for each user as they receive the first notification from that origin. Processors are shown as their own columns. Later, if it makes sense, allow users to also disable/enable notifications based on notification topic. Signed-off-by: Heikki Hellgren <heikki.hellgren@op.fi>
This commit is contained in:
@@ -350,6 +350,31 @@ export const myPlugin = createBackendPlugin({
|
||||
});
|
||||
```
|
||||
|
||||
### User-specific notification settings
|
||||
|
||||
The notifications plugin provides a way for users to manage their notification settings. To enable this, you must
|
||||
add the `UserNotificationSettingsCard` to your frontend.
|
||||
|
||||
```tsx
|
||||
// App.tsx example
|
||||
<Route path="/settings" element={<UserSettingsPage />}>
|
||||
<SettingsLayout.Route path="/advanced" title="Advanced">
|
||||
<AdvancedSettings />
|
||||
</SettingsLayout.Route>
|
||||
<SettingsLayout.Route path="/notifications" title="Notifications">
|
||||
<UserNotificationSettingsCard
|
||||
originNames={{ 'plugin:scaffolder': 'Scaffolder' }}
|
||||
/>
|
||||
</SettingsLayout.Route>
|
||||
</Route>
|
||||
```
|
||||
|
||||

|
||||
|
||||
You can customize the origin names shown in the UI by passing an object where the keys are the origins and the values are the names you want to show in the UI.
|
||||
|
||||
Each notification processor will receive its own column in the settings page, where the user can enable or disable notifications from that processor.
|
||||
|
||||
### External Services
|
||||
|
||||
When the emitter of a notification is a Backstage backend plugin, it is mandatory to use the integration via `@backstage/plugin-notifications-node` as described above.
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 62 KiB |
Reference in New Issue
Block a user