-
Notifications
You must be signed in to change notification settings - Fork 647
fix(quay): migrate MUIv4 to MUIv5 #9473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@backstage-community/plugin-quay': patch | ||
| --- | ||
|
|
||
| Migrated the Quay plugin and dev app from Material UI v4 to MUI v5. Replaced `@material-ui/*` with `@mui/material` and `@mui/icons-material`; migrated plugin styling to the `sx` prop and dev app `makeStyles` to `tss-react/mui`. Existing `@backstage/ui` CSS imports are unchanged. No breaking API changes. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,3 +4,5 @@ coverage | |
| knip-report.md | ||
| .vscode | ||
| .eslintrc.js | ||
| report.api.md | ||
| report-alpha.api.md | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| /* | ||
| * Copyright 2026 The Backstage Authors | ||
| * | ||
| * 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. | ||
| */ | ||
|
|
||
| /** @type {import('prettier').Config} */ | ||
| module.exports = { | ||
| ...require('@backstage/cli/config/prettier'), | ||
| // api-reports formats report.api.md from the workspace root; disable | ||
| // auto-loading prettier-plugin-sort-imports (declaration-only TS blocks). | ||
| pluginSearchDirs: false, | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,3 +10,5 @@ renovate.json | |
| dist-dynamic | ||
| dist-scalprum | ||
| playwright-report | ||
| report.api.md | ||
| report-alpha.api.md | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,3 +10,5 @@ renovate.json | |
| dist-dynamic | ||
| dist-scalprum | ||
| playwright-report | ||
| report.api.md | ||
| report-alpha.api.md | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,3 +10,5 @@ renovate.json | |
| dist-dynamic | ||
| dist-scalprum | ||
| playwright-report | ||
| report.api.md | ||
| report-alpha.api.md | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,3 +10,5 @@ renovate.json | |
| dist-dynamic | ||
| dist-scalprum | ||
| playwright-report | ||
| report.api.md | ||
| report-alpha.api.md | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,9 +43,10 @@ | |
| "@backstage/plugin-catalog-react": "^3.0.0", | ||
| "@backstage/plugin-permission-react": "^0.5.1", | ||
| "@backstage/theme": "^0.7.3", | ||
| "@material-ui/core": "^4.12.2", | ||
| "@material-ui/icons": "^4.11.3", | ||
| "@material-ui/lab": "4.0.0-alpha.61", | ||
| "@emotion/react": "^11.13.0", | ||
| "@emotion/styled": "^11.13.0", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "@emotion/react": "^11.13.0",
"@emotion/styled": "^11.13.0",Can we remove these as the plugin source has zero imports from
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They’re there because MUI v5 uses Emotion as its styling engine. The code never imports them directly, but
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for explaining! You're right that MUI v5 uses Emotion under the hood for Please check the possibility of removing it. |
||
| "@mui/icons-material": "^5.16.7", | ||
| "@mui/material": "^5.16.7", | ||
| "filesize": "^11.0.0", | ||
| "luxon": "^3.6.1", | ||
| "react-use": "^17.4.0" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,8 +17,7 @@ import type { ReactNode } from 'react'; | |
|
|
||
| import { Link, Progress, TableColumn } from '@backstage/core-components'; | ||
|
|
||
| import { Tooltip } from '@material-ui/core'; | ||
| import makeStyles from '@material-ui/core/styles/makeStyles'; | ||
| import Tooltip from '@mui/material/Tooltip'; | ||
|
|
||
| import { securityScanComparator, vulnerabilitySummary } from '../../lib/utils'; | ||
| import type { QuayTagData } from '../../types'; | ||
|
|
@@ -83,7 +82,7 @@ export const columns: TableColumn<QuayTagData>[] = [ | |
| { | ||
| title: 'Size', | ||
| field: 'size', | ||
| type: 'numeric', | ||
| type: 'string', | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why we are changing from
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If it's |
||
| customSort: (a: QuayTagData, b: QuayTagData) => a.rawSize - b.rawSize, | ||
| }, | ||
| { | ||
|
|
@@ -100,11 +99,3 @@ export const columns: TableColumn<QuayTagData>[] = [ | |
| a.manifest_digest_raw.localeCompare(b.manifest_digest_raw), | ||
| }, | ||
| ]; | ||
|
|
||
| export const useStyles = makeStyles(theme => ({ | ||
| empty: { | ||
| padding: theme.spacing(2), | ||
| display: 'flex', | ||
| justifyContent: 'center', | ||
| }, | ||
| })); | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It fixes a failure on pre-commit for prettier issue. The same solution has found in other plugins such as rbac or ocm as well.