docs: address review feedback on notifications docs

Use dynamic import pattern for SubPageBlueprint loader instead of
Promise.resolve, and fix missing comma in TypeScript example.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
This commit is contained in:
Patrik Oldsberg
2026-03-30 12:36:27 +02:00
parent 964e8f9779
commit 769fa96fe8
3 changed files with 20 additions and 11 deletions
+18 -9
View File
@@ -126,11 +126,24 @@ Once installed, the signals plugin is automatically available in your app throug
The notifications plugin provides a way for users to manage their notification settings. To enable this, you can create a frontend module that adds a settings tab to the user-settings plugin using the `SubPageBlueprint`:
```tsx title="packages/app/src/modules/NotificationSettingsPage.tsx"
import { Content } from '@backstage/core-components';
import { UserNotificationSettingsCard } from '@backstage/plugin-notifications';
export function NotificationSettingsPage() {
return (
<Content>
<UserNotificationSettingsCard
originNames={{ 'plugin:scaffolder': 'Scaffolder' }}
/>
</Content>
);
}
```
```tsx title="packages/app/src/modules/notificationSettings.tsx"
import { createFrontendModule } from '@backstage/frontend-plugin-api';
import { SubPageBlueprint } from '@backstage/frontend-plugin-api';
import { Content } from '@backstage/core-components';
import { UserNotificationSettingsCard } from '@backstage/plugin-notifications';
export const notificationSettingsModule = createFrontendModule({
pluginId: 'user-settings',
@@ -141,13 +154,9 @@ export const notificationSettingsModule = createFrontendModule({
path: 'notifications',
title: 'Notifications',
loader: () =>
Promise.resolve(
<Content>
<UserNotificationSettingsCard
originNames={{ 'plugin:scaffolder': 'Scaffolder' }}
/>
</Content>,
),
import('./NotificationSettingsPage').then(m => (
<m.NotificationSettingsPage />
)),
},
}),
],
+1 -1
View File
@@ -231,7 +231,7 @@ Below are metadata fields that will be commonly used between processors and have
# Example:
const payload = {
title: 'Entities Require Attention',
description: 'Entities: Service A, Service B'
description: 'Entities: Service A, Service B',
metadata: {
'backstage.io/body.markdown': `
# Entities
+1 -1
View File
@@ -232,7 +232,7 @@ Below are metadata fields that will be commonly used between processors and have
# Example:
const payload = {
title: 'Entities Require Attention',
description: 'Entities: Service A, Service B'
description: 'Entities: Service A, Service B',
metadata: {
'backstage.io/body.markdown': `
# Entities