Skip to content

Sonarqube mig - #9460

Open
amitkumar489 wants to merge 7 commits into
backstage:mainfrom
Infosys:sonarqube_mig
Open

amitkumar489 wants to merge 7 commits into
backstage:mainfrom
Infosys:sonarqube_mig

Conversation

@amitkumar489

@amitkumar489 amitkumar489 commented Jun 12, 2026 •

Copy link
Copy Markdown

Hey, I just made a Pull Request!

migrated the @backstage-community/plugin-sonarqube plugin from Material-UI (MUI) v4 to Backstage UI (BUI) v1.7.0, eliminating deprecated Material-UI dependencies while improving theming consistency and reducing bundle size.

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)
  • All your commits have a Signed-off-by line in the message. (more info)

Copilot AI review requested due to automatic review settings June 12, 2026 08:25
@amitkumar489
amitkumar489 requested review from a team as code owners June 12, 2026 08:25
@amitkumar489
amitkumar489 requested a review from 04kash June 12, 2026 08:25
@backstage-goalie

backstage-goalie Bot commented Jun 12, 2026 •

Copy link
Copy Markdown
Contributor

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage-community/plugin-sonarqube workspaces/sonarqube/plugins/sonarqube major v1.1.0

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR migrates the SonarQube card UI from Material-UI v4 components/styles to Backstage UI (BUI) components with CSS modules, removing deprecated MUI dependencies.

Changes:

  • Replaced MUI components (Grid, Typography, Avatar, Chip, Tooltip) with BUI primitives (Flex, Box, Text, Tag) and CSS modules.
  • Introduced CSS module styles for the SonarQube card subcomponents (Value, Rating, RatingCard, MetricInsights, Percentage).
  • Updated dependencies to add @backstage/ui, @remixicon/react, and react-aria-components, and removed MUI v4 packages.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
workspaces/sonarqube/plugins/sonarqube/src/components/SonarQubeCard/Value.tsx Switches value rendering from MUI Typography/JSS to BUI Text + CSS modules.
workspaces/sonarqube/plugins/sonarqube/src/components/SonarQubeCard/Value.module.css Adds CSS module styling for the Value component.
workspaces/sonarqube/plugins/sonarqube/src/components/SonarQubeCard/SonarQubeCard.tsx Replaces MUI Grid/JSS with BUI layout primitives and CSS modules.
workspaces/sonarqube/plugins/sonarqube/src/components/SonarQubeCard/SonarQubeCard.module.css Adds CSS module styling for SonarQubeCard header/action/lastAnalyzed.
workspaces/sonarqube/plugins/sonarqube/src/components/SonarQubeCard/RatingCard.tsx Migrates rating card layout/typography to BUI + CSS modules.
workspaces/sonarqube/plugins/sonarqube/src/components/SonarQubeCard/RatingCard.module.css Adds CSS module styling for RatingCard layout.
workspaces/sonarqube/plugins/sonarqube/src/components/SonarQubeCard/Rating.tsx Replaces MUI Avatar/JSS color logic with CSS-module-based rating badges.
workspaces/sonarqube/plugins/sonarqube/src/components/SonarQubeCard/Rating.module.css Adds CSS module styling for rating badges A–E.
workspaces/sonarqube/plugins/sonarqube/src/components/SonarQubeCard/Percentage.tsx Migrates circle sizing to CSS module; replaces theme-derived colors with constants.
workspaces/sonarqube/plugins/sonarqube/src/components/SonarQubeCard/Percentage.module.css Adds CSS module sizing for the percentage circle.
workspaces/sonarqube/plugins/sonarqube/src/components/SonarQubeCard/MetricInsights.tsx Migrates chips/icons/tooltips to BUI + remixicon + react-aria tooltip trigger.
workspaces/sonarqube/plugins/sonarqube/src/components/SonarQubeCard/MetricInsights.module.css Adds CSS module styling for the quality-gate badge variants.
workspaces/sonarqube/plugins/sonarqube/package.json Removes MUI v4 deps and adds BUI + remixicon + react-aria-components.
workspaces/sonarqube/.changeset/eighty-baboons-eat.md Declares a major version bump and describes the migration.
sonarqube/plugins/sonarqube/src/components/SonarQubeCard/SonarQubeCard.module.css Adds a second SonarQubeCard CSS module file in a different path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: amitkumar489 <[email protected]>
Signed-off-by: amitkumar489 <[email protected]>
Copilot AI review requested due to automatic review settings July 8, 2026 07:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 11 comments.

Comments suppressed due to low confidence (1)

workspaces/sonarqube/plugins/sonarqube/package.json:79

  • The plugin now depends on @backstage/ui and no longer depends on MUI, but the package dev app still imports Grid from @material-ui/core/Grid (workspaces/sonarqube/plugins/sonarqube/dev/index.tsx:19) and also doesn’t import @backstage/ui/css/styles.css (which other dev apps in this repo do). As-is, yarn start / the dev build for this plugin will likely be broken or unstyled unless the dev app is migrated away from MUI (preferred) or MUI is kept as a dev dependency and BUI CSS is imported.
  "dependencies": {
    "@backstage-community/plugin-sonarqube-react": "workspace:^",
    "@backstage/catalog-model": "backstage:^",
    "@backstage/core-compat-api": "backstage:^",
    "@backstage/core-components": "backstage:^",
    "@backstage/core-plugin-api": "backstage:^",
    "@backstage/errors": "backstage:^",
    "@backstage/frontend-app-api": "backstage:^",
    "@backstage/frontend-plugin-api": "backstage:^",
    "@backstage/plugin-catalog-react": "backstage:^",
    "@backstage/ui": "^1.7.0",
    "@remixicon/react": "^4.3.0",
    "react-aria-components": "^1.4.0",
    "@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0",
    "cross-fetch": "^4.0.0",
    "luxon": "^3.0.0",
    "rc-progress": "4.0.0",
    "react-use": "^17.2.4"
  },

Comment thread workspaces/sonarqube/plugins/README.md Resolved
@04kash

04kash commented Aug 4, 2026 •

Copy link
Copy Markdown
Member

Hey, can you include screenshots of what the UI looks like before and after the changes, make sure that the CI passes and also address the copilot comments if they make sense (or if they don't just mark them as resolved with a justification of why its fine to ignore them)?

@amitkumar489
amitkumar489 marked this pull request as draft August 11, 2026 13:08
Signed-off-by: amitkumar489 <[email protected]>
Signed-off-by: amitkumar489 <[email protected]>
Signed-off-by: amitkumar489 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Quality-gate badges fail to render, and undeclared development dependencies plus incompatible peer ranges can break the development app and supported consumer installations.

9 open issues
20 resolved since last review

Review effort: Balanced

"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.9.1",
"@material-ui/styles": "^4.10.0",
"@backstage/ui": "backstage:^",
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.9.1",
"@material-ui/styles": "^4.10.0",
"@backstage/ui": "backstage:^",
Comment on lines +67 to +69
<Tag
className={`${badgeClass} ${props.compact ? styles.badgeCompact : ''}`}
>
Comment on lines +1 to +21
@layer components {
.badgeLabel {
color: var(--bui-fg-primary);
}

.badgeCompact {
margin: 0;
height: 28px;
}

.badgeError {
background-color: var(--bui-status-error);
}

.badgeSuccess {
background-color: var(--bui-status-ok);
}

.badgeUnknown {
background-color: var(--bui-bg-surface-3);
}
Comment on lines +17 to +18
import { Tag, Text } from '@backstage/ui';
import { TooltipTrigger, Tooltip } from 'react-aria-components';
Comment on lines +81 to +83
<a href={value.projectUrl} target="_blank" rel="noopener noreferrer">
{qualityBadge}
</a>
height: var(--bui-space-6);
width: var(--bui-space-6);
color: var(--bui-fg-primary);
background-color: var(--bui-bg-surface-3);
} from '@backstage-community/plugin-sonarqube-react';
import Grid from '@material-ui/core/Grid';
import { makeStyles } from '@material-ui/core/styles';
import { Box, Flex } from '@backstage/ui';
Comment on lines +2 to +9
.value {
font-size: 1.5rem;
font-weight: 500;
}

.compact {
line-height: 1;
}

@awanlin awanlin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @amitkumar489, thanks for the contribution. There's merge conflicts and Copilot found a number of items that must be addressed. 👍

@awanlin awanlin self-assigned this Nov 27, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants