Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
4cf7115
chore(homepage): create backend plugin
christoph-jerolimov Apr 21, 2026
2e2f558
chore(homepage): remove upstream patch
christoph-jerolimov Apr 21, 2026
b9b7851
chore(homepage): update theme, use RHDH icon and include RBAC plugin
christoph-jerolimov Apr 21, 2026
ba37ee0
feat(homepage): add permission-aware default cards backend with front…
christoph-jerolimov Apr 21, 2026
c37fee7
chore(homepage): update package.json
christoph-jerolimov Apr 21, 2026
f99fbb1
chore(homepage): update report apis
christoph-jerolimov Apr 21, 2026
7681335
feat(homepage): add titleKey/descriptionKey and rename visibility to if
christoph-jerolimov Apr 22, 2026
914ff46
feat(homepage): add resource-based permission for default cards
christoph-jerolimov Apr 23, 2026
e917ba1
chore(homepage): add dist-dynamic to .prettierignore
christoph-jerolimov Apr 23, 2026
681e7f0
chore(homepage): add *.local.json to .gitignore
christoph-jerolimov Apr 23, 2026
2957b08
refactor(homepage): rename defaultCards to defaultWidgets and simplif…
christoph-jerolimov Apr 23, 2026
8e15801
refactor(homepage): make ref required and rename Card types to Defaul…
christoph-jerolimov Apr 24, 2026
96a010b
chore(homepage): fix unit tests
christoph-jerolimov Apr 25, 2026
8e0ac76
refactor(homepage): remove customizable flag and rename layouts to la…
christoph-jerolimov Apr 26, 2026
3ee2980
feat(homepage): load default widgets from backend API
christoph-jerolimov Apr 26, 2026
3f8304a
refactor(homepage): rename card to widget in permission resources
christoph-jerolimov Apr 27, 2026
1e6f777
chore(homepage): remove homepage customizable
christoph-jerolimov Apr 27, 2026
3c7a9c2
chore(homepage): update knip-reports
christoph-jerolimov Apr 27, 2026
25ef841
fix customizable card rendering and e2e tests
karthikjeeyar Apr 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions workspaces/homepage/.changeset/green-singers-rush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@red-hat-developer-hub/backstage-plugin-dynamic-home-page': patch
---

Updated dependency `@red-hat-developer-hub/backstage-plugin-theme` to `^0.14.1`.
1 change: 1 addition & 0 deletions workspaces/homepage/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ dist-types
site

# Local configuration files
*.local.json
*.local.yaml

# Sensitive credentials
Expand Down
1 change: 1 addition & 0 deletions workspaces/homepage/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
dist
dist-dynamic
dist-types
coverage
.vscode
Expand Down

This file was deleted.

18 changes: 3 additions & 15 deletions workspaces/homepage/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
# [Backstage](https://backstage.io)
## The RHDH homepage plugin is a wrapper around the upstream [Home plugin](https://github.com/backstage/backstage/tree/master/plugins/home) from [Backstage](https://backstage.io)

This is your newly scaffolded Backstage App, Good Luck!

To start the app, run:

```sh
yarn install
yarn start
```

To generate knip reports for this app, run:

```sh
yarn backstage-repo-tools knip-reports
```
Initially written to add Dynamic Plugin (mount point) support does it adds now
some custom widgets and a backend to configure the default layout in the `app-config.yaml`.
55 changes: 0 additions & 55 deletions workspaces/homepage/app-config.production.yaml

This file was deleted.

71 changes: 71 additions & 0 deletions workspaces/homepage/app-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,66 @@ app:
w: 12
h: 14

homepage:
# The widget id is required if a user changes the default layout.
# The widget ref is used to determine which widget is rendered.
# For 1.x this references a mount point (`config.id`).
# For 2.x this references a homepage widget extension (name).
defaultWidgets:
- id: onboarding
ref: 'rhdh-onboarding-section'
layout:
xl: { w: 12, h: 6 }
lg: { w: 12, h: 6 }
md: { w: 12, h: 7 }
sm: { w: 12, h: 8 }
xs: { w: 12, h: 9 }
xxs: { w: 12, h: 14 }
- id: entity-list
ref: 'rhdh-entity-section'
layout:
xl: { w: 12, h: 7 }
lg: { w: 12, h: 7 }
md: { w: 12, h: 8 }
sm: { w: 12, h: 9 }
xs: { w: 12, h: 11 }
xxs: { w: 12, h: 15 }
- id: template-list
ref: 'rhdh-template-section'
layout:
xl: { w: 12, h: 5 }
lg: { w: 12, h: 5 }
md: { w: 12, h: 5 }
sm: { w: 12, h: 5 }
xs: { w: 12, h: 7.5 }
xxs: { w: 12, h: 13.5 }
- id: quickaccess-card
ref: quickaccess-card
layout:
xl: { w: 6, h: 8, x: 6 }
lg: { w: 6, h: 8, x: 6 }
md: { w: 6, h: 8, x: 6 }
sm: { w: 12, h: 8, x: 6 }
xs: { w: 12, h: 8, x: 6 }
xxs: { w: 12, h: 8, x: 6 }
- id: visit-card
ref: VisitCard
layout:
xl: { w: 12, h: 5 }
lg: { w: 12, h: 5 }
md: { w: 12, h: 6 }
sm: { w: 12, h: 7 }
xs: { w: 12, h: 9 }
xxs: { w: 12, h: 14 }
- if:
groups: [group:default/admins]
children:
- id: rbac
ref: RBAC
layout:
xl: { w: 12, h: 6 }
lg: { w: 12, h: 6 }

organization:
name: My Company

Expand Down Expand Up @@ -184,3 +244,14 @@ kubernetes:
permission:
# setting this to `false` will disable permissions
enabled: true
rbac:
pluginsWithPermission:
- catalog
- scaffolder
- permission
- homepage
admin:
users:
- name: user:development/guest
superUsers:
- name: user:development/guest
4 changes: 2 additions & 2 deletions workspaces/homepage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
},
"devDependencies": {
"@backstage/cli": "^0.36.0",
"@backstage/cli-defaults": "0.1.0",
"@backstage/e2e-test-utils": "^0.1.2",
"@backstage/repo-tools": "^0.17.0",
"@changesets/cli": "^2.27.1",
Expand All @@ -58,8 +59,7 @@
"resolutions": {
"@types/react": "^18",
"@types/react-dom": "^18",
"refractor@npm:3.6.0/prismjs": "^1.30.0",
"@backstage/plugin-home@^0.8.11": "patch:@backstage/plugin-home@npm%3A0.8.11#./.yarn/patches/@backstage-plugin-home-npm-0.8.11-a127246043.patch"
"refractor@npm:3.6.0/prismjs": "^1.30.0"
},
"prettier": "@backstage/cli/config/prettier",
"lint-staged": {
Expand Down
24 changes: 12 additions & 12 deletions workspaces/homepage/packages/app-legacy/knip-report.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Knip report

## Unused dependencies (2)
## Unused dependencies (1)

| Name | Location | Severity |
| :-------------------------------------------------------- | :----------- | :------- |
| @red-hat-developer-hub/backstage-plugin-dynamic-home-page | package.json | error |
| react-router | package.json | error |
| Name | Location | Severity |
| :----------- | :---------------- | :------- |
| react-router | package.json:56:6 | error |

## Unused devDependencies (4)
## Unused devDependencies (5)

| Name | Location | Severity |
| :-------------------------- | :----------- | :------- |
| @testing-library/user-event | package.json | error |
| @backstage/test-utils | package.json | error |
| @testing-library/dom | package.json | error |
| cross-env | package.json | error |
| Name | Location | Severity |
| :-------------------------- | :---------------- | :------- |
| @testing-library/user-event | package.json:68:6 | error |
| @axe-core/playwright | package.json:62:6 | error |
| @testing-library/dom | package.json:65:6 | error |
| @playwright/test | package.json:64:6 | error |
| cross-env | package.json:70:6 | error |

7 changes: 5 additions & 2 deletions workspaces/homepage/packages/app-legacy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"lint": "backstage-cli package lint"
},
"dependencies": {
"@backstage-community/plugin-rbac": "^1.52.1",
"@backstage/app-defaults": "^1.7.6",
"@backstage/catalog-model": "^1.7.7",
"@backstage/cli": "^0.36.0",
Expand Down Expand Up @@ -48,12 +49,14 @@
"@material-ui/icons": "^4.9.1",
"@openshift/dynamic-plugin-sdk": "^5.0.1",
"@red-hat-developer-hub/backstage-plugin-dynamic-home-page": "workspace:^",
"@red-hat-developer-hub/backstage-plugin-theme": "^0.12.0",
"@red-hat-developer-hub/backstage-plugin-theme": "^0.14.1",
"@scalprum/react-core": "0.11.1",
"react": "^18.0.2",
"react-dom": "^18.0.2",
"react-router": "^6.3.0",
"react-router-dom": "^6.3.0"
"react-router-dom": "^6.3.0",
"react-use": "17.6.0",
"yaml": "^2.8.3"
},
"devDependencies": {
"@axe-core/playwright": "^4.10.0",
Expand Down
17 changes: 17 additions & 0 deletions workspaces/homepage/packages/app-legacy/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ import { apis } from './apis';
import { entityPage } from './components/catalog/EntityPage';
import { searchPage } from './components/search/SearchPage';
import { Root } from './components/Root';
import { DebugHomepageAvailableWidgets } from './components/homepage/DebugHomepageAvailableWidgets';
import { DebugHomepageDefaultWidgets } from './components/homepage/DebugHomepageDefaultWidgets';

import {
AlertDisplay,
Expand All @@ -59,6 +61,8 @@ import { githubAuthApiRef } from '@backstage/core-plugin-api';
import { ScalprumContext, ScalprumState } from '@scalprum/react-core';
import { PluginStore } from '@openshift/dynamic-plugin-sdk';

import { RbacPage } from '@backstage-community/plugin-rbac';

import {
DynamicHomePage,
DynamicCustomizableHomePage,
Expand Down Expand Up @@ -437,6 +441,19 @@ const routes = (
</Route>
<Route path="/settings" element={<UserSettingsPage />} />
<Route path="/catalog-graph" element={<CatalogGraphPage />} />
<Route path="/rbac" element={<RbacPage />} />
<Route
path="/debug-available-widgets"
element={
<ScalprumContext.Provider value={scalprumState}>
<DebugHomepageAvailableWidgets />
</ScalprumContext.Provider>
}
/>
<Route
path="/debug-default-widgets"
element={<DebugHomepageDefaultWidgets />}
/>
</FlatRoutes>
);

Expand Down
Loading
Loading