Skip to content

Commit

Permalink
feat(deps): use RHDH themes in the backstage app and dev pages (janus…
Browse files Browse the repository at this point in the history
  • Loading branch information
jerolimov committed May 14, 2024
1 parent 5e27a8c commit 8263bf0
Show file tree
Hide file tree
Showing 43 changed files with 102 additions and 29 deletions.
7 changes: 4 additions & 3 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
"lint": "backstage-cli package lint"
},
"dependencies": {
"@backstage-community/plugin-github-actions": "^0.6.16",
"@backstage-community/plugin-tech-radar": "^0.7.4",
"@backstage/app-defaults": "^1.5.4",
"@backstage/catalog-model": "^1.4.5",
"@backstage/core-app-api": "^1.12.4",
Expand All @@ -48,13 +50,12 @@
"@mui/icons-material": "^5.15.16",
"@mui/material": "^5.15.16",
"@mui/styles": "^5.15.16",
"@redhat-developer/red-hat-developer-hub-theme": "^0.0.40",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router": "^6.23.0",
"react-router-dom": "^6.23.0",
"tss-react": "^4.9.10",
"@backstage-community/plugin-github-actions": "^0.6.16",
"@backstage-community/plugin-tech-radar": "^0.7.4"
"tss-react": "^4.9.10"
},
"devDependencies": {
"@backstage/cli": "0.26.4",
Expand Down
2 changes: 2 additions & 0 deletions packages/app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { TechDocsAddons } from '@backstage/plugin-techdocs-react';
import { UserSettingsPage } from '@backstage/plugin-user-settings';

import { TechRadarPage } from '@backstage-community/plugin-tech-radar';
import { getThemes } from '@redhat-developer/red-hat-developer-hub-theme';

import { apis } from './apis';
import { entityPage } from './components/catalog/EntityPage';
Expand Down Expand Up @@ -61,6 +62,7 @@ const app = createApp({
components: {
SignInPage: props => <SignInPage {...props} auto providers={['guest']} />,
},
themes: getThemes(),
});

const routes = (
Expand Down
3 changes: 3 additions & 0 deletions plugins/acr/dev/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { createDevApp } from '@backstage/dev-utils';
import { EntityProvider } from '@backstage/plugin-catalog-react';
import { TestApiProvider } from '@backstage/test-utils';

import { createDevAppThemes } from '@redhat-developer/red-hat-developer-hub-theme';

import { mockAcrTagsData } from '../src/__fixtures__/acrTagsObject';
import { mockEntity } from '../src/__fixtures__/mockEntity';
import {
Expand All @@ -29,6 +31,7 @@ class MockAzureContainerRegistryApiClient

createDevApp()
.registerPlugin(acrPlugin)
.addThemes(createDevAppThemes())
.addPage({
element: (
<TestApiProvider
Expand Down
3 changes: 2 additions & 1 deletion plugins/acr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
"@backstage/core-plugin-api": "^1.9.2",
"@backstage/plugin-catalog-react": "^1.11.3",
"@backstage/theme": "^0.5.3",
"@janus-idp/shared-react": "2.6.1",
"@material-ui/core": "^4.9.13",
"@material-ui/icons": "^4.11.3",
"@material-ui/lab": "^4.0.0-alpha.45",
"@janus-idp/shared-react": "2.6.1",
"react-use": "^17.4.0"
},
"peerDependencies": {
Expand All @@ -45,6 +45,7 @@
"@backstage/dev-utils": "1.0.31",
"@backstage/test-utils": "1.5.4",
"@janus-idp/cli": "1.8.6",
"@redhat-developer/red-hat-developer-hub-theme": "*",
"@testing-library/jest-dom": "6.4.2",
"@testing-library/react": "14.2.1",
"@testing-library/react-hooks": "8.0.1",
Expand Down
3 changes: 3 additions & 0 deletions plugins/analytics-module-matomo/dev/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ import React from 'react';

import { createDevApp } from '@backstage/dev-utils';

import { createDevAppThemes } from '@redhat-developer/red-hat-developer-hub-theme';

import { analyticsModuleMatomoPlugin } from '../src';
import { Playground } from './Playground';

createDevApp()
.registerPlugin(analyticsModuleMatomoPlugin)
.addThemes(createDevAppThemes())
.addPage({
title: 'Matomo Analytics Playground',
path: '/analytics-module-matomo',
Expand Down
1 change: 1 addition & 0 deletions plugins/analytics-module-matomo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@backstage/dev-utils": "1.0.31",
"@backstage/test-utils": "1.5.4",
"@janus-idp/cli": "1.8.6",
"@redhat-developer/red-hat-developer-hub-theme": "*",
"@testing-library/jest-dom": "6.4.2",
"@testing-library/react": "14.2.1",
"@testing-library/user-event": "14.5.1",
Expand Down
3 changes: 3 additions & 0 deletions plugins/analytics-provider-segment/dev/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@ import React from 'react';

import { createDevApp } from '@backstage/dev-utils';

import { createDevAppThemes } from '@redhat-developer/red-hat-developer-hub-theme';

import { analyticsModuleSegment } from '../src';
import { Playground } from './Playground';

createDevApp()
.registerPlugin(analyticsModuleSegment)
.addThemes(createDevAppThemes())
.addPage({
path: '/segment',
title: 'Segment Playground',
Expand Down
1 change: 1 addition & 0 deletions plugins/analytics-provider-segment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"@backstage/dev-utils": "1.0.31",
"@backstage/test-utils": "1.5.4",
"@janus-idp/cli": "1.8.6",
"@redhat-developer/red-hat-developer-hub-theme": "*",
"@testing-library/dom": "9.3.3",
"@testing-library/jest-dom": "6.4.2",
"@testing-library/react": "14.2.1",
Expand Down
2 changes: 2 additions & 0 deletions plugins/argocd/dev/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { EntityProvider } from '@backstage/plugin-catalog-react';
import { TestApiProvider } from '@backstage/test-utils';

import { Box } from '@material-ui/core';
import { createDevAppThemes } from '@redhat-developer/red-hat-developer-hub-theme';

import {
ArgoCDApi,
Expand Down Expand Up @@ -64,6 +65,7 @@ export class MockArgoCDApiClient implements ArgoCDApi {

createDevApp()
.registerPlugin(argocdPlugin)
.addThemes(createDevAppThemes())
.addPage({
element: (
<TestApiProvider
Expand Down
1 change: 1 addition & 0 deletions plugins/argocd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"@backstage/test-utils": "1.5.4",
"@janus-idp/cli": "1.8.6",
"@playwright/test": "1.41.2",
"@redhat-developer/red-hat-developer-hub-theme": "*",
"@testing-library/jest-dom": "6.0.0",
"@testing-library/react": "14.0.0",
"@testing-library/user-event": "14.0.0",
Expand Down
3 changes: 3 additions & 0 deletions plugins/bulk-import/dev/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ import React from 'react';

import { createDevApp } from '@backstage/dev-utils';

import { createDevAppThemes } from '@redhat-developer/red-hat-developer-hub-theme';

import { BulkImportPage, bulkImportPlugin } from '../src/plugin';

createDevApp()
.registerPlugin(bulkImportPlugin)
.addThemes(createDevAppThemes())
.addPage({
element: <BulkImportPage />,
title: 'Bulk import',
Expand Down
5 changes: 3 additions & 2 deletions plugins/bulk-import/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
"@material-ui/lab": "^4.0.0-alpha.61",
"@mui/icons-material": "5.14.11",
"@mui/material": "^5.12.2",
"lodash": "^4.17.21",
"formik": "^2.4.5",
"lodash": "^4.17.21",
"react-use": "^17.2.4"
},
"peerDependencies": {
Expand All @@ -49,10 +49,11 @@
"@backstage/dev-utils": "1.0.31",
"@backstage/test-utils": "1.5.4",
"@janus-idp/cli": "1.7.10",
"@playwright/test": "1.41.2",
"@redhat-developer/red-hat-developer-hub-theme": "*",
"@testing-library/jest-dom": "6.0.0",
"@testing-library/react": "14.0.0",
"@testing-library/user-event": "14.0.0",
"@playwright/test": "1.41.2",
"msw": "1.0.0"
},
"scalprum": {
Expand Down
3 changes: 3 additions & 0 deletions plugins/dynamic-plugins-info/dev/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { Content, Header, HeaderTabs, Page } from '@backstage/core-components';
import { createDevApp } from '@backstage/dev-utils';
import { TestApiProvider } from '@backstage/test-utils';

import { createDevAppThemes } from '@redhat-developer/red-hat-developer-hub-theme';

import { listLoadedPluginsResult } from '../src/__fixtures__/listLoadedPluginsResult';
import { dynamicPluginsInfoApiRef } from '../src/api/types';
import { DynamicPluginsInfoContent } from '../src/components/DynamicPluginsInfoContent/DynamicPluginsInfoContent';
Expand All @@ -17,6 +19,7 @@ const mockedApi = {

createDevApp()
.registerPlugin(dynamicPluginsInfoPlugin)
.addThemes(createDevAppThemes())
.addPage({
element: (
<TestApiProvider apis={[[dynamicPluginsInfoApiRef, mockedApi]]}>
Expand Down
1 change: 1 addition & 0 deletions plugins/dynamic-plugins-info/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"@backstage/core-app-api": "1.12.4",
"@backstage/dev-utils": "1.0.31",
"@backstage/test-utils": "1.5.4",
"@redhat-developer/red-hat-developer-hub-theme": "*",
"@testing-library/jest-dom": "6.4.2",
"@testing-library/react": "14.2.1",
"@testing-library/user-event": "14.5.1",
Expand Down
3 changes: 3 additions & 0 deletions plugins/feedback/dev/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import React from 'react';
import { createDevApp } from '@backstage/dev-utils';
import { EntityProvider } from '@backstage/plugin-catalog-react';

import { createDevAppThemes } from '@redhat-developer/red-hat-developer-hub-theme';

import { mockEntity } from '../src/mocks';
import {
EntityFeedbackPage,
Expand All @@ -13,6 +15,7 @@ import {

createDevApp()
.registerPlugin(feedbackPlugin)
.addThemes(createDevAppThemes())
.addPage({
element: (
<>
Expand Down
1 change: 1 addition & 0 deletions plugins/feedback/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"@backstage/dev-utils": "1.0.31",
"@backstage/test-utils": "1.5.4",
"@janus-idp/cli": "1.8.6",
"@redhat-developer/red-hat-developer-hub-theme": "*",
"@testing-library/jest-dom": "6.4.2",
"@testing-library/react": "14.2.1",
"@testing-library/user-event": "14.0.0",
Expand Down
3 changes: 3 additions & 0 deletions plugins/jfrog-artifactory/dev/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { Entity } from '@backstage/catalog-model';
import { createDevApp } from '@backstage/dev-utils';
import { EntityProvider } from '@backstage/plugin-catalog-react';

import { createDevAppThemes } from '@redhat-developer/red-hat-developer-hub-theme';

import { JfrogArtifactoryPage, jfrogArtifactoryPlugin } from '../src/plugin';

const mockEntity: Entity = {
Expand All @@ -25,6 +27,7 @@ const mockEntity: Entity = {

createDevApp()
.registerPlugin(jfrogArtifactoryPlugin)
.addThemes(createDevAppThemes())
.addPage({
element: (
<EntityProvider entity={mockEntity}>
Expand Down
1 change: 1 addition & 0 deletions plugins/jfrog-artifactory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"@backstage/dev-utils": "1.0.31",
"@backstage/test-utils": "1.5.4",
"@janus-idp/cli": "1.8.6",
"@redhat-developer/red-hat-developer-hub-theme": "*",
"@testing-library/jest-dom": "6.4.2",
"@testing-library/react": "14.2.1",
"@testing-library/user-event": "14.5.1",
Expand Down
2 changes: 2 additions & 0 deletions plugins/kiali/dev/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { EntityProvider } from '@backstage/plugin-catalog-react';
import { TestApiProvider } from '@backstage/test-utils';

import { Grid } from '@material-ui/core';
import { createDevAppThemes } from '@redhat-developer/red-hat-developer-hub-theme';

import { EntityKialiResourcesCard, kialiPlugin } from '../src';
import { getEntityRoutes, getRoutes } from '../src/components/Router';
Expand Down Expand Up @@ -619,6 +620,7 @@ const MockKialiError = () => {

createDevApp()
.registerPlugin(kialiPlugin)
.addThemes(createDevAppThemes())
.addPage({
element: <MockProvider />,
title: 'KialiPage',
Expand Down
1 change: 1 addition & 0 deletions plugins/kiali/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"@backstage/test-utils": "1.5.4",
"@janus-idp/cli": "1.8.6",
"@playwright/test": "1.41.2",
"@redhat-developer/red-hat-developer-hub-theme": "*",
"@testing-library/jest-dom": "6.4.2",
"@testing-library/react": "14.2.1",
"@testing-library/user-event": "14.5.1",
Expand Down
3 changes: 3 additions & 0 deletions plugins/matomo/dev/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ import React from 'react';

import { createDevApp } from '@backstage/dev-utils';

import { createDevAppThemes } from '@redhat-developer/red-hat-developer-hub-theme';

import { MatomoPage, matomoPlugin } from '../src/plugin';

createDevApp()
.registerPlugin(matomoPlugin)
.addThemes(createDevAppThemes())
.addPage({
element: <MatomoPage />,
title: 'Root Page',
Expand Down
1 change: 1 addition & 0 deletions plugins/matomo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"@backstage/dev-utils": "1.0.31",
"@backstage/test-utils": "1.5.4",
"@janus-idp/cli": "1.8.6",
"@redhat-developer/red-hat-developer-hub-theme": "*",
"@testing-library/jest-dom": "6.4.2",
"@testing-library/react": "14.2.1",
"@testing-library/user-event": "14.5.1",
Expand Down
3 changes: 3 additions & 0 deletions plugins/nexus-repository-manager/dev/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { createDevApp } from '@backstage/dev-utils';
import { EntityProvider } from '@backstage/plugin-catalog-react';
import { TestApiProvider } from '@backstage/test-utils';

import { createDevAppThemes } from '@redhat-developer/red-hat-developer-hub-theme';

import {
entityMock,
NexusRepositoryManagerApiClientMock,
Expand All @@ -16,6 +18,7 @@ import {

createDevApp()
.registerPlugin(nexusRepositoryManagerPlugin)
.addThemes(createDevAppThemes())
.addPage({
element: (
<TestApiProvider
Expand Down
7 changes: 4 additions & 3 deletions plugins/nexus-repository-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"@backstage/core-components": "^0.14.6",
"@backstage/core-plugin-api": "^1.9.2",
"@backstage/plugin-catalog-react": "^1.11.3",
"@janus-idp/shared-react": "2.6.1",
"@backstage/theme": "^0.5.3",
"@janus-idp/shared-react": "2.6.1",
"@material-ui/core": "^4.9.13",
"@material-ui/icons": "^4.11.3",
"@material-ui/lab": "^4.0.0-alpha.45",
Expand All @@ -47,15 +47,16 @@
"@backstage/core-app-api": "1.12.4",
"@backstage/dev-utils": "1.0.31",
"@backstage/test-utils": "1.5.4",
"@hey-api/openapi-ts": "0.34.5",
"@janus-idp/cli": "1.8.6",
"@redhat-developer/red-hat-developer-hub-theme": "*",
"@testing-library/jest-dom": "6.4.2",
"@testing-library/react": "14.2.1",
"@testing-library/react-hooks": "8.0.1",
"@testing-library/user-event": "14.5.1",
"@types/node": "18.18.5",
"cross-fetch": "4.0.0",
"msw": "1.3.2",
"@hey-api/openapi-ts": "0.34.5"
"msw": "1.3.2"
},
"files": [
"dist",
Expand Down
3 changes: 3 additions & 0 deletions plugins/notifications/dev/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ import React from 'react';

import { createDevApp } from '@backstage/dev-utils';

import { createDevAppThemes } from '@redhat-developer/red-hat-developer-hub-theme';

import { NotificationsPage, notificationsPlugin } from '../src/plugin';

createDevApp()
.registerPlugin(notificationsPlugin)
.addThemes(createDevAppThemes())
.addPage({
element: <NotificationsPage />,
title: 'Root Page',
Expand Down
1 change: 1 addition & 0 deletions plugins/notifications/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"@backstage/test-utils": "1.5.4",
"@janus-idp/cli": "1.8.6",
"@openapitools/openapi-generator-cli": "2.7.0",
"@redhat-developer/red-hat-developer-hub-theme": "*",
"@testing-library/jest-dom": "6.4.2",
"@testing-library/react": "14.2.1",
"@testing-library/user-event": "14.5.1",
Expand Down
2 changes: 2 additions & 0 deletions plugins/ocm/dev/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
import { SearchApi, searchApiRef } from '@backstage/plugin-search-react';

import { Grid } from '@material-ui/core';
import { createDevAppThemes } from '@redhat-developer/red-hat-developer-hub-theme';

import {
ClusterAvailableResourceCard,
Expand Down Expand Up @@ -83,6 +84,7 @@ createDevApp()
}),
)
.registerPlugin(ocmPlugin)
.addThemes(createDevAppThemes())
.addPage({
element: <OcmPage />,
title: 'Root Page',
Expand Down
1 change: 1 addition & 0 deletions plugins/ocm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"@backstage/plugin-catalog": "1.19.0",
"@backstage/test-utils": "1.5.4",
"@janus-idp/cli": "1.8.6",
"@redhat-developer/red-hat-developer-hub-theme": "*",
"@testing-library/jest-dom": "6.4.2",
"@testing-library/react": "14.2.1",
"@testing-library/user-event": "14.5.1",
Expand Down
Loading

0 comments on commit 8263bf0

Please sign in to comment.