Skip to content

Commit

Permalink
feat(notifications): turn notifications into a frontend dynamic plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
mareklibra committed Jan 23, 2024
1 parent d1d291b commit 81c650b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
14 changes: 14 additions & 0 deletions plugins/notifications/app-config.janus-idp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
dynamicPlugins:
frontend:
janus-idp.backstage-plugin-notifications:
appIcons:
- name: notificationsIcon
module: NotificationsPlugin
importName: NotificationsIcon
dynamicRoutes:
- path: /notifications
importName: NotificationsPage
module: NotificationsPlugin
menuItem:
icon: notificationsIcon
text: Notifications
12 changes: 11 additions & 1 deletion plugins/notifications/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"scripts": {
"start": "backstage-cli package start",
"build": "backstage-cli package build",
"export-dynamic": "janus-cli package export-dynamic-plugin",
"lint": "backstage-cli package lint",
"test": "backstage-cli package test --passWithNoTests --coverage",
"clean": "backstage-cli package clean",
Expand Down Expand Up @@ -45,15 +46,24 @@
"@backstage/core-app-api": "1.11.0",
"@backstage/dev-utils": "1.0.22",
"@backstage/test-utils": "^1.4.4",
"@janus-idp/cli": "1.4.7",
"@openapitools/openapi-generator-cli": "^2.7.0",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^12.1.5",
"@testing-library/user-event": "^14.5.1",
"@types/node": "*",
"msw": "1.3.2"
},
"scalprum": {
"name": "janus-idp.backstage-plugin-notifications",
"exposedModules": {
"NotificationsPlugin": "./src/index.ts"
}
},
"files": [
"dist"
"dist",
"dist-scalprum",
"app-config.janus-idp.yaml"
],
"repository": "github:janus-idp/backstage-plugins",
"keywords": [
Expand Down
2 changes: 2 additions & 0 deletions plugins/notifications/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ export { NOTIFICATIONS_ROUTE } from './constants';
// selected components for export
export { NotificationsSidebarItem } from './components/NotificationsSidebarItem';
export { usePollingEffect } from './components/usePollingEffect';

export { default as NotificationsIcon } from '@material-ui/icons/Notifications';

0 comments on commit 81c650b

Please sign in to comment.