diff --git a/workspaces/orchestrator/.changeset/mui-v5-orchestrator.md b/workspaces/orchestrator/.changeset/mui-v5-orchestrator.md
new file mode 100644
index 0000000000..5629d9f17d
--- /dev/null
+++ b/workspaces/orchestrator/.changeset/mui-v5-orchestrator.md
@@ -0,0 +1,7 @@
+---
+'@red-hat-developer-hub/backstage-plugin-orchestrator': patch
+'@red-hat-developer-hub/backstage-plugin-orchestrator-form-react': patch
+'@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets': patch
+---
+
+Replace Material UI v4 imports with MUI v5 and scope JSS class names to prevent style collisions.
diff --git a/workspaces/orchestrator/eslint.frontend-shared.cjs b/workspaces/orchestrator/eslint.frontend-shared.cjs
new file mode 100644
index 0000000000..73e3db265e
--- /dev/null
+++ b/workspaces/orchestrator/eslint.frontend-shared.cjs
@@ -0,0 +1,43 @@
+/*
+ * Copyright Red Hat, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+const materialUiMigrationEslintConfig = {
+ restrictedImports: [
+ {
+ name: '@material-ui/core',
+ message: 'Use @mui/material instead of Material UI v4.',
+ },
+ {
+ name: '@material-ui/lab',
+ message: 'Use @mui/material instead of Material UI v4.',
+ },
+ {
+ name: '@material-ui/styles',
+ message:
+ 'Use @mui/styles, @mui/material (sx/styled), or Backstage UI instead of Material UI v4.',
+ },
+ ],
+ restrictedImportPatterns: ['@material-ui/*'],
+};
+
+/**
+ * Shared ESLint config for frontend packages in the orchestrator workspace.
+ */
+module.exports = packageDir =>
+ require('@backstage/cli/config/eslint-factory')(
+ packageDir,
+ materialUiMigrationEslintConfig,
+ );
diff --git a/workspaces/orchestrator/packages/app-legacy/.eslintrc.js b/workspaces/orchestrator/packages/app-legacy/.eslintrc.js
index e2c39f94df..493ce7565d 100644
--- a/workspaces/orchestrator/packages/app-legacy/.eslintrc.js
+++ b/workspaces/orchestrator/packages/app-legacy/.eslintrc.js
@@ -14,4 +14,5 @@
* limitations under the License.
*/
-module.exports = require('@backstage/cli/config/eslint-factory')(__dirname);
+// eslint-disable-next-line @backstage/no-relative-monorepo-imports -- workspace ESLint shared config
+module.exports = require('../../eslint.frontend-shared.cjs')(__dirname);
diff --git a/workspaces/orchestrator/packages/app-legacy/package.json b/workspaces/orchestrator/packages/app-legacy/package.json
index 60e5bffe93..d144a68eb0 100644
--- a/workspaces/orchestrator/packages/app-legacy/package.json
+++ b/workspaces/orchestrator/packages/app-legacy/package.json
@@ -52,7 +52,7 @@
"@mui/styles": "5.18.0",
"@red-hat-developer-hub/backstage-plugin-orchestrator": "workspace:^",
"@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets": "workspace:^",
- "@red-hat-developer-hub/backstage-plugin-theme": "^0.12.0",
+ "@red-hat-developer-hub/backstage-plugin-theme": "^0.14.0",
"custom-authentication-provider-module": "workspace:^",
"history": "^5.3.0",
"react": "^18.0.2",
diff --git a/workspaces/orchestrator/packages/app-legacy/src/components/Root/LogoFull.tsx b/workspaces/orchestrator/packages/app-legacy/src/components/Root/LogoFull.tsx
deleted file mode 100644
index 15c7e15d8b..0000000000
--- a/workspaces/orchestrator/packages/app-legacy/src/components/Root/LogoFull.tsx
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright Red Hat, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import { makeStyles } from '@mui/styles';
-
-const useStyles = makeStyles({
- svg: {
- width: 'auto',
- height: 30,
- },
- path: {
- fill: '#7df3e1',
- },
-});
-const LogoFull = () => {
- const classes = useStyles();
-
- return (
-
- );
-};
-
-export default LogoFull;
diff --git a/workspaces/orchestrator/packages/app-legacy/src/components/Root/LogoIcon.tsx b/workspaces/orchestrator/packages/app-legacy/src/components/Root/LogoIcon.tsx
deleted file mode 100644
index 8ddd4f8040..0000000000
--- a/workspaces/orchestrator/packages/app-legacy/src/components/Root/LogoIcon.tsx
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright Red Hat, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import { makeStyles } from '@mui/styles';
-
-const useStyles = makeStyles({
- svg: {
- width: 'auto',
- height: 28,
- },
- path: {
- fill: '#7df3e1',
- },
-});
-
-const LogoIcon = () => {
- const classes = useStyles();
-
- return (
-
- );
-};
-
-export default LogoIcon;
diff --git a/workspaces/orchestrator/packages/app-legacy/src/components/Root/Root.tsx b/workspaces/orchestrator/packages/app-legacy/src/components/Root/Root.tsx
index c83fd32bc6..9236cc839f 100644
--- a/workspaces/orchestrator/packages/app-legacy/src/components/Root/Root.tsx
+++ b/workspaces/orchestrator/packages/app-legacy/src/components/Root/Root.tsx
@@ -39,38 +39,41 @@ import LibraryBooks from '@mui/icons-material/LibraryBooks';
import MenuIcon from '@mui/icons-material/Menu';
import GroupIcon from '@mui/icons-material/People';
import SearchIcon from '@mui/icons-material/Search';
-import { makeStyles } from '@mui/styles';
+import Box from '@mui/material/Box';
import { OrchestratorIcon } from '@red-hat-developer-hub/backstage-plugin-orchestrator';
import { NotificationsSidebarItem } from '@backstage/plugin-notifications';
import { Administration } from '@backstage-community/plugin-rbac';
-import LogoFull from './LogoFull';
-import LogoIcon from './LogoIcon';
-
-const useSidebarLogoStyles = makeStyles({
- root: {
- width: sidebarConfig.drawerWidthClosed,
- height: 3 * sidebarConfig.logoHeight,
- display: 'flex',
- flexFlow: 'row nowrap',
- alignItems: 'center',
- marginBottom: -14,
- },
- link: {
- width: sidebarConfig.drawerWidthClosed,
- marginLeft: 24,
- },
-});
+import {
+ LogoFull,
+ LogoIcon,
+} from '@red-hat-developer-hub/backstage-plugin-theme';
const SidebarLogo = () => {
- const classes = useSidebarLogoStyles();
const { isOpen } = useSidebarOpenState();
return (
-
-
+
+
{isOpen ? : }
-
+
);
};
diff --git a/workspaces/orchestrator/packages/app/.eslintrc.js b/workspaces/orchestrator/packages/app/.eslintrc.js
index 8bd689af97..493ce7565d 100644
--- a/workspaces/orchestrator/packages/app/.eslintrc.js
+++ b/workspaces/orchestrator/packages/app/.eslintrc.js
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 The Backstage Authors
+ * Copyright Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,4 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-module.exports = require('@backstage/cli/config/eslint-factory')(__dirname);
+
+// eslint-disable-next-line @backstage/no-relative-monorepo-imports -- workspace ESLint shared config
+module.exports = require('../../eslint.frontend-shared.cjs')(__dirname);
diff --git a/workspaces/orchestrator/packages/app/package.json b/workspaces/orchestrator/packages/app/package.json
index 4d844c4bcf..762b040f9d 100644
--- a/workspaces/orchestrator/packages/app/package.json
+++ b/workspaces/orchestrator/packages/app/package.json
@@ -30,10 +30,11 @@
"@backstage/plugin-catalog": "^2.0.1",
"@backstage/plugin-user-settings": "^0.9.1",
"@backstage/ui": "^0.13.2",
- "@material-ui/core": "^4.12.4",
"@mui/icons-material": "^5.17.1",
+ "@mui/material": "^5.17.1",
"@red-hat-developer-hub/backstage-plugin-orchestrator": "workspace:^",
"@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets": "workspace:^",
+ "@red-hat-developer-hub/backstage-plugin-theme": "^0.14.0",
"react": "^18.0.2",
"react-dom": "^18.0.2",
"react-router": "^6.3.0",
diff --git a/workspaces/orchestrator/packages/app/src/modules/nav/LogoFull.tsx b/workspaces/orchestrator/packages/app/src/modules/nav/LogoFull.tsx
deleted file mode 100644
index 6b6a1bd8c1..0000000000
--- a/workspaces/orchestrator/packages/app/src/modules/nav/LogoFull.tsx
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright Red Hat, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import { makeStyles } from '@material-ui/core';
-
-const useStyles = makeStyles({
- svg: {
- width: 'auto',
- height: 30,
- },
- path: {
- fill: '#7df3e1',
- },
-});
-
-export const LogoFull = () => {
- const classes = useStyles();
-
- return (
-
- );
-};
diff --git a/workspaces/orchestrator/packages/app/src/modules/nav/LogoIcon.tsx b/workspaces/orchestrator/packages/app/src/modules/nav/LogoIcon.tsx
deleted file mode 100644
index 87024b08c2..0000000000
--- a/workspaces/orchestrator/packages/app/src/modules/nav/LogoIcon.tsx
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright Red Hat, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import { makeStyles } from '@material-ui/core';
-
-const useStyles = makeStyles({
- svg: {
- width: 'auto',
- height: 28,
- },
- path: {
- fill: '#7df3e1',
- },
-});
-
-export const LogoIcon = () => {
- const classes = useStyles();
-
- return (
-
- );
-};
diff --git a/workspaces/orchestrator/packages/app/src/modules/nav/SidebarLogo.tsx b/workspaces/orchestrator/packages/app/src/modules/nav/SidebarLogo.tsx
index 0085b75fce..8bfa1e9aeb 100644
--- a/workspaces/orchestrator/packages/app/src/modules/nav/SidebarLogo.tsx
+++ b/workspaces/orchestrator/packages/app/src/modules/nav/SidebarLogo.tsx
@@ -18,34 +18,37 @@ import {
sidebarConfig,
useSidebarOpenState,
} from '@backstage/core-components';
-import { makeStyles } from '@material-ui/core';
-import { LogoFull } from './LogoFull';
-import { LogoIcon } from './LogoIcon';
-
-const useSidebarLogoStyles = makeStyles({
- root: {
- width: sidebarConfig.drawerWidthClosed,
- height: 3 * sidebarConfig.logoHeight,
- display: 'flex',
- flexFlow: 'row nowrap',
- alignItems: 'center',
- marginBottom: -14,
- },
- link: {
- width: sidebarConfig.drawerWidthClosed,
- marginLeft: 24,
- },
-});
+import Box from '@mui/material/Box';
+import {
+ LogoFull,
+ LogoIcon,
+} from '@red-hat-developer-hub/backstage-plugin-theme';
export const SidebarLogo = () => {
- const classes = useSidebarLogoStyles();
const { isOpen } = useSidebarOpenState();
return (
-
-
+
+
{isOpen ? : }
-
+
);
};
diff --git a/workspaces/orchestrator/plugins/orchestrator-form-react/.eslintrc.js b/workspaces/orchestrator/plugins/orchestrator-form-react/.eslintrc.js
index e2a53a6ad2..4283aec969 100644
--- a/workspaces/orchestrator/plugins/orchestrator-form-react/.eslintrc.js
+++ b/workspaces/orchestrator/plugins/orchestrator-form-react/.eslintrc.js
@@ -1 +1,17 @@
-module.exports = require('@backstage/cli/config/eslint-factory')(__dirname);
+/*
+ * Copyright Red Hat, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// eslint-disable-next-line @backstage/no-relative-monorepo-imports -- workspace ESLint shared config
+module.exports = require('../../eslint.frontend-shared.cjs')(__dirname);
diff --git a/workspaces/orchestrator/plugins/orchestrator-form-widgets/.eslintrc.js b/workspaces/orchestrator/plugins/orchestrator-form-widgets/.eslintrc.js
index 9184408ae4..4283aec969 100644
--- a/workspaces/orchestrator/plugins/orchestrator-form-widgets/.eslintrc.js
+++ b/workspaces/orchestrator/plugins/orchestrator-form-widgets/.eslintrc.js
@@ -13,4 +13,5 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-module.exports = require('@backstage/cli/config/eslint-factory')(__dirname);
+// eslint-disable-next-line @backstage/no-relative-monorepo-imports -- workspace ESLint shared config
+module.exports = require('../../eslint.frontend-shared.cjs')(__dirname);
diff --git a/workspaces/orchestrator/plugins/orchestrator/.eslintrc.js b/workspaces/orchestrator/plugins/orchestrator/.eslintrc.js
index e2a53a6ad2..4283aec969 100644
--- a/workspaces/orchestrator/plugins/orchestrator/.eslintrc.js
+++ b/workspaces/orchestrator/plugins/orchestrator/.eslintrc.js
@@ -1 +1,17 @@
-module.exports = require('@backstage/cli/config/eslint-factory')(__dirname);
+/*
+ * Copyright Red Hat, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// eslint-disable-next-line @backstage/no-relative-monorepo-imports -- workspace ESLint shared config
+module.exports = require('../../eslint.frontend-shared.cjs')(__dirname);
diff --git a/workspaces/orchestrator/plugins/orchestrator/dev/nav/SidebarLogo.tsx b/workspaces/orchestrator/plugins/orchestrator/dev/nav/SidebarLogo.tsx
index d8d952ed17..1a133abbbd 100644
--- a/workspaces/orchestrator/plugins/orchestrator/dev/nav/SidebarLogo.tsx
+++ b/workspaces/orchestrator/plugins/orchestrator/dev/nav/SidebarLogo.tsx
@@ -14,36 +14,44 @@
* limitations under the License.
*/
-import { Link, sidebarConfig } from '@backstage/core-components';
+import {
+ Link,
+ sidebarConfig,
+ useSidebarOpenState,
+} from '@backstage/core-components';
-import { makeStyles } from '@material-ui/core';
-import Typography from '@mui/material/Typography';
+import Box from '@mui/material/Box';
-const useSidebarLogoStyles = makeStyles({
- root: {
- width: sidebarConfig.drawerWidthClosed,
- height: 3 * sidebarConfig.logoHeight,
- display: 'flex',
- flexFlow: 'row nowrap',
- alignItems: 'center',
- marginBottom: -14,
- },
- link: {
- width: sidebarConfig.drawerWidthClosed,
- marginLeft: 24,
- },
-});
+import {
+ LogoFull,
+ LogoIcon,
+} from '@red-hat-developer-hub/backstage-plugin-theme';
export const SidebarLogo = () => {
- const classes = useSidebarLogoStyles();
+ const { isOpen } = useSidebarOpenState();
return (
-