Skip to content

feat(dynatrace): migrate plugin from Material-UI to Backstage UI - #11607

Open
deepthi-28 wants to merge 4 commits into
backstage:mainfrom
deepthi-28:mui-bui-migration-dynatrace
Open

deepthi-28 wants to merge 4 commits into
backstage:mainfrom
deepthi-28:mui-bui-migration-dynatrace

Conversation

@deepthi-28

@deepthi-28 deepthi-28 commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Hey, I just made a Pull Request!

Migrates the Dynatrace plugin from Material-UI to Backstage UI.

Screenshot 2026-10-16 113215
  • 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)

Tracking issue: #7869

@backstage-goalie

backstage-goalie Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Important

This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior.

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage-community/plugin-dynatrace workspaces/dynatrace/plugins/dynatrace minor v10.26.0

@AmbrishRamachandiran AmbrishRamachandiran 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.

Thanks for the migration @deepthi-28! This is a clean, complete migration: there are no @material-ui imports left in the plugin, @material-ui/core is gone from package.json, and the mocked DynatraceApi and entity in the dev app make it easy to check locally.

A few things before this can go in:

  • Merge conflicts: the branch is about 290 commits behind main and GitHub reports conflicts. Since it was opened, main has bumped this workspace to Backstage v1.56.2 (#11832, which now resolves @backstage/[email protected]) and migrated it to Jest 30 (#11987). Could you rebase on the latest main and resolve the conflicts? For yarn.lock, it's usually easiest to take main's version and re-run yarn install in workspaces/dynatrace rather than hand-merging it. Please check that tests still pass with Jest 30 afterwards.
  • Peer dependencies: these need to be narrowed to match @backstage/ui (see inline).
  • Changeset: use the standard BREAKING wording used by the other migrations.
  • Two smaller inline notes.

Could you also link the tracking issue #7869 in the PR description, and use a conventional title (e.g. feat(dynatrace): migrate plugin from Material-UI to Backstage UI), as in your codescene and gcalendar PRs?

'@backstage-community/plugin-dynatrace': minor
---

Migrated the Dynatrace plugin from Material-UI to Backstage UI.

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.

Could we use the same wording as the other BUI migrations? Adopters now need Backstage UI and its stylesheet installed:

Suggested change
Migrated the Dynatrace plugin from Material-UI to Backstage UI.
**BREAKING** Migrated from Material UI (MUI) to Backstage UI (BUI). This means that Backstage UI is now a requirement for this plugin, see the Backstage UI [installation documentation](https://ui.backstage.io/get-started/installation) for more details.

minor has been accepted for pre-1.0 plugins on recent migrations, so I'll leave the bump level to the maintainers.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed in the latest commits on this branch (6e3efb9 and follow-up).

"@backstage/frontend-plugin-api": "backstage:^",
"@backstage/plugin-catalog-react": "backstage:^",
"@material-ui/core": "^4.12.2",
"@backstage/ui": "backstage:^",

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.

@backstage/ui (0.18.0 on this branch, 0.19.0 on main after the v1.56.2 bump) declares peer dependencies react ^18.0.0, react-dom ^18.0.0, react-router-dom ^6.30.2 and @types/react ^18.0.0. This package still advertises ^16.13.1 || ^17.0.0 || ^18.0.0 and 6.0.0-beta.0 || ^6.3.0 in peerDependencies/devDependencies, and the same wide @types/react range, so a React 17 app could install it and end up with unmet peers. Could you narrow them, as was requested on the firehydrant migration?

"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.30.2"

and "@types/react": "^18.0.0".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed in the latest commits on this branch (6e3efb9 and follow-up).

<TagGroup aria-label={`Synthetic location ${value?.name}`}>
<Tag
size="medium"
style={{ backgroundColor: chipColor(lastFailedTimestamp) }}

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.

chipColor still returns hard-coded CSS colour names (salmon, sandybrown, palegoldenrod, lightgreen) applied inline. Now that this is a BUI Tag, its text uses the BUI foreground token. In the dark theme that's a light colour on a light pastel background, so the location name becomes hard to read. Reviewers have also asked to use BUI tokens over hard-coded values in other migrations.

Could this map to status tokens through a small CSS module instead? For example:

.failedLastHour   { background-color: var(--bui-negative-bg-subdued); color: var(--bui-negative-fg-subdued); }
.failedLast6Hours { background-color: var(--bui-warning-bg-subdued);  color: var(--bui-warning-fg-subdued); }
.failedLast24Hours{ background-color: var(--bui-warning-bg-subdued);  color: var(--bui-warning-fg-subdued); }
.healthy          { background-color: var(--bui-positive-bg-subdued); color: var(--bui-positive-fg-subdued); }

with chipColor returning a className. Distinguishing 1h from 6h is up to you, e.g. solid --bui-negative-bg for the most recent failures.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed in the latest commits on this branch (6e3efb9 and follow-up).

import { dynatraceApiRef } from '../src/api';
import type { DynatraceApi } from '../src/api/DynatraceApi';
// eslint-disable-next-line @backstage/no-ui-css-imports-in-non-frontend
import '@backstage/ui/css/styles.css';

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.

Nit: I think this import (and the eslint-disable above it) isn't needed. createDevApp from @backstage/dev-utils already lazy-loads @backstage/ui/css/styles.css (dist/devApp/BuiCss.esm.js), and the repo's mui-to-bui-migration skill says to skip the import for createDevApp workspaces.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed in the latest commits on this branch (6e3efb9 and follow-up).

@deepthi-28 deepthi-28 changed the title Mui bui migration dynatrace feat(dynatrace): migrate plugin from Material-UI to Backstage UI Nov 25, 2026
@awanlin
awanlin requested a balanced review from Copilot and removed request for BethGriggs November 26, 2026 15:00

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

A clean dev launch throws because the mock lacks dynatrace.baseUrl, and the required consumer stylesheet setup is undocumented.

2 open issues
What changed in this PR

Migrates Dynatrace’s layout and synthetic-location badges from Material-UI to Backstage UI, supporting the community-wide migration tracked in #7869.

Changes:

  • Replaces Material-UI grids and chips with Backstage UI components.
  • Adds a sample entity and mocked Dynatrace responses to the development page.
  • Updates dependencies, development stylesheet loading, and release metadata.
File Description
workspaces/​dynatrace/​yarn.lock Records the direct Backstage UI dependency.
workspaces/​dynatrace/​plugins/​dynatrace/​src/​components/​Synthetics/​SyntheticsLocation/​SyntheticsLocation.tsx Replaces location chips with tags and tag groups.
workspaces/​dynatrace/​plugins/​dynatrace/​src/​components/​DynatraceTab/​DynatraceTab.tsx Uses Backstage UI grids for monitoring cards.
workspaces/​dynatrace/​plugins/​dynatrace/​package.json Replaces the direct Material-UI dependency with Backstage UI.
workspaces/​dynatrace/​plugins/​dynatrace/​dev/​index.tsx Adds mock data, entity context, and stylesheet loading.
workspaces/​dynatrace/​.changeset/​dynatrace-mui-to-bui.md Adds a minor-release migration note.

Review effort: Balanced

.addPage({
element: <DynatraceTab />,
element: (
<TestApiProvider apis={[[dynatraceApiRef, mockDynatraceApi]]}>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed in the latest commits on this branch (6e3efb9 and follow-up).

'@backstage-community/plugin-dynatrace': minor
---

Migrated the Dynatrace plugin from Material-UI to Backstage UI.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed in the latest commits on this branch (6e3efb9 and follow-up).

Replace MUI Grid with BUI Grid.Root/Grid.Item and MUI Chip with BUI Tag
wrapped in TagGroup. Drop the @material-ui/core dependency and add
@backstage/ui.

Wire an EntityProvider and a mock Dynatrace API into the dev app so the
plugin can be previewed locally without a backend.

Signed-off-by: deepthi-ajith_infosys <[email protected]>
@deepthi-28
deepthi-28 force-pushed the mui-bui-migration-dynatrace branch from 97527c8 to 9960f24 Compare November 27, 2026 14:48
@awanlin
awanlin requested a balanced review from Copilot November 27, 2026 18:09
@awanlin awanlin self-assigned this Nov 27, 2026

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

The dependency changes leave yarn.lock out of sync, causing immutable CI installs to fail, and the recent-failure tag has insufficient text contrast in dark mode.

4 open issues

Review effort: Balanced

"@backstage/ui": "backstage:^",
"@material-ui/core": "^4.12.2",
"@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0",
"@types/react": "^18.0.0",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed in the latest commits on this branch (6e3efb9 and follow-up).

@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.

Thanks for the contribution @deepthi-28 and for following up on @AmbrishRamachandiran's feedback.

There's a CI error that needs to be address. The Copilot comments need to be followed up on as well.

@AmbrishRamachandiran, thanks for the review, appreciate the initial set of eyes on this 🙏

@deepthi-28

Copy link
Copy Markdown
Contributor Author

Feedback addressed (6a26549):

  • Rebased on latest main; conflicts resolved.
  • Peer/dev deps narrowed to react/react-dom ^18.0.0, react-router-dom ^6.30.2, @types/react ^18.0.0; yarn.lock updated to match (no more @material-ui/core in the workspace entry).
  • Changeset uses the standard BREAKING wording; README documents the @backstage/ui/css/styles.css import.
  • Location tags use BUI status tokens via a CSS module; the recent-failure tag now pairs --bui-negative-bg with --bui-negative-fg for contrast.
  • Dev app: removed the stylesheet import and added a configApiRef mock with dynatrace.baseUrl.

@AmbrishRamachandiran @awanlin could you please re-review?

deepthi-28 and others added 2 commits December 1, 2026 07:58
Co-authored-by: Copilot <[email protected]>
Signed-off-by: deepthi-ajith_infosys <[email protected]>
Co-authored-by: Copilot <[email protected]>
Signed-off-by: deepthi-ajith_infosys <[email protected]>
@deepthi-28
deepthi-28 requested a review from awanlin December 1, 2026 09:17

@AmbrishRamachandiran AmbrishRamachandiran 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.

Thanks for the updates. The rebase, peer deps, changeset wording and the tag colours are all sorted, and CI is green now. LGTM.

cc @awanlin @backstage/community-plugins-maintainers

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

The minor changeset would ship breaking React and router peer requirements within ^10.25.0, so a major release is needed to prevent incompatible updates for existing consumers.

4 open issues
1 resolved since last review

Review effort: Balanced

@@ -0,0 +1,5 @@
---
'@backstage-community/plugin-dynatrace': minor

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