Skip to content

Migrate Lighthouse Plugin MUI to BUI - #10218

Open
AmbrishRamachandiran wants to merge 13 commits into
backstage:mainfrom
AmbrishRamachandiran:lighthouse-migrate
Open

AmbrishRamachandiran wants to merge 13 commits into
backstage:mainfrom
AmbrishRamachandiran:lighthouse-migrate

Conversation

@AmbrishRamachandiran

@AmbrishRamachandiran AmbrishRamachandiran commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

Part of #7869 (migration of community-maintainer-owned plugins from MUI to BUI).

Screenshots

Audits page with intro

Audits page with intro

Intro – Setup tab

Intro – Setup tab

Audit list – status column and pagination

Audit list – status column and pagination

Audit history and report

Audit history and report

After a single click on another audit

After a single click on another audit

Failed audit (BUI Alert)

Failed audit (BUI Alert)

Create audit form

Create audit form

Create audit – form factor (BUI Select)

Create audit – form factor (BUI Select)

Entity overview – Lighthouse Audit card

Entity overview – Lighthouse Audit card

Entity Lighthouse tab

Entity Lighthouse tab

Signed-off-by: AmbrishRamachandiran <[email protected]>
@backstage-goalie

backstage-goalie Bot commented Jul 31, 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-lighthouse workspaces/lighthouse/plugins/lighthouse minor v0.29.0

Signed-off-by: AmbrishRamachandiran <[email protected]>
Signed-off-by: AmbrishRamachandiran <[email protected]>
Signed-off-by: AmbrishRamachandiran <[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!

@github-actions github-actions Bot added the stale label Sep 15, 2026
Signed-off-by: AmbrishRamachandiran <[email protected]>
@AmbrishRamachandiran
AmbrishRamachandiran marked this pull request as ready for review November 2, 2026 10:27
@AmbrishRamachandiran
AmbrishRamachandiran requested a review from a team as a code owner November 2, 2026 10:27
Signed-off-by: AmbrishRamachandiran <[email protected]>
@AmbrishRamachandiran

Copy link
Copy Markdown
Contributor Author

@hopehadfield can you please review ? TIA?

- Remove remaining @material-ui/icons and @material-ui/lab usage
  (Highlight icon, Pagination, Alert) and drop them from dependencies
- Pin @remixicon/react below 4.9.0 (license change in 4.9.0)
- Bump changeset to major since the migration is breaking
- Use BUI List/ListRow for the audit sidebar, Grid for layouts,
  Select for form factor, Text instead of bare spans
- Remove @layer, inline styles and most custom CSS in favour of BUI props
- Use onPress for BUI Button and iconStart for button icons
- Remove leftover commented-out code
- Update tests for the BUI components

Signed-off-by: AmbrishRamachandiran <[email protected]>
@AmbrishRamachandiran

Copy link
Copy Markdown
Contributor Author

@hopehadfield @awanlin I've pushed an update that finishes the migration and merges the latest main. Could you please take a look when you get a chance? 🙏

Changes in this update

  • MUI fully removed: replaced the remaining @material-ui/icons (Highlight → RiFlashlightLine) and @material-ui/lab (Pagination → BUI TablePagination, Alert → BUI Alert), and dropped both from package.json
  • Changeset bumped to major, since the migration is breaking
  • Pinned @remixicon/react to >=4.6.0 <4.9.0 (4.9.0 changed its license)
  • Fewer HTML primitives:
    • Audit history sidebar now uses BUI List / ListRow with single selection and router-aware href (navigation keeps replace)
    • Page layouts use Grid.Root / Grid.Item (responsive)
    • The form factor picker uses BUI Select in place of a native <select>
    • Bare <span>s are now Text
  • Removed @layer, inline styles, and most custom CSS in favour of BUI props (gap, align, justify, mb). CreateAudit.module.css has been removed
  • BUI Button uses onPress, and the "Hide intro" icon uses iconStart
  • Removed leftover commented-out code in Intro
  • Updated tests for the new pagination, sidebar, and select components

tsc, lint, prettier, dedupe, and all tests pass locally, and CI is green.

@AmbrishRamachandiran AmbrishRamachandiran changed the title Migrate Lightouse Plugin MUI to BUI Migrate Lighthouse Plugin MUI to BUI Nov 17, 2026
- Import @backstage/ui stylesheet in the dev app (createApp does not load
  it automatically), matching other community plugins
- Pass the actual page size to TablePagination so the range label is
  correct when the server limit is not a default page size option
- Add a test for the pagination range label

Signed-off-by: AmbrishRamachandiran <[email protected]>
Signed-off-by: AmbrishRamachandiran <[email protected]>
@AmbrishRamachandiran

Copy link
Copy Markdown
Contributor Author

@hopehadfield @awanlin I've attached the migrated screenshots in the PR description for reference. Please take a look when you get a chance. Thanks! 🙏

@AmbrishRamachandiran

Copy link
Copy Markdown
Contributor Author

Friendly reminder @hopehadfield @awanlin: this one is ready for review (migration finished, latest main merged, screenshots in the description). Happy to adjust anything. Thanks!

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

Single-click audit navigation is broken, pagination ranges can mislabel results, and dependency downgrades reintroduce known security vulnerabilities.

2 open issues
What changed in this PR

Migrates the Lighthouse plugin’s interface from Material UI to Backstage UI, supporting the community-plugin migration tracked in #7869.

Changes:

  • Replaces MUI controls, layouts, typography, and icons with BUI and Remix Icon components.
  • Moves component styling into CSS modules and updates interaction and pagination tests.
  • Updates dependencies, loads BUI styles in the dev app, and documents the new requirement in a breaking-change changeset.
File Description
workspaces/​lighthouse/​yarn.lock Updates workspace dependency resolutions.
workspaces/​lighthouse/​plugins/​lighthouse/​src/​components/​Intro/​Intro.module.css Adds intro layout styling.
workspaces/​lighthouse/​plugins/​lighthouse/​src/​components/​Intro/​index.tsx Migrates tabs, layout, and dismissal button.
workspaces/​lighthouse/​plugins/​lighthouse/​src/​components/​CreateAudit/​index.tsx Migrates audit form controls and layout.
workspaces/​lighthouse/​plugins/​lighthouse/​src/​components/​CreateAudit/​index.test.tsx Updates button and select interactions.
workspaces/​lighthouse/​plugins/​lighthouse/​src/​components/​Cards/​LastLighthouseAuditCard.tsx Uses BUI text for unavailable scores.
workspaces/​lighthouse/​plugins/​lighthouse/​src/​components/​AuditView/​index.tsx Migrates history rows, alerts, layout, and actions.
workspaces/​lighthouse/​plugins/​lighthouse/​src/​components/​AuditView/​index.test.tsx Updates history-row selection and route assertions.
workspaces/​lighthouse/​plugins/​lighthouse/​src/​components/​AuditView/​AuditView.module.css Moves report and error styling into CSS.
workspaces/​lighthouse/​plugins/​lighthouse/​src/​components/​AuditList/​index.tsx Introduces BUI pagination and action buttons.
workspaces/​lighthouse/​plugins/​lighthouse/​src/​components/​AuditList/​index.test.tsx Updates pagination tests and covers custom page sizes.
workspaces/​lighthouse/​plugins/​lighthouse/​src/​components/​AuditList/​AuditListTable.tsx Migrates audit-status typography.
workspaces/​lighthouse/​plugins/​lighthouse/​src/​components/​AuditList/​AuditListForEntity.tsx Migrates the entity audit-creation button.
workspaces/​lighthouse/​plugins/​lighthouse/​src/​alpha/​extensions.tsx Replaces the plugin navigation icon.
workspaces/​lighthouse/​plugins/​lighthouse/​package.json Replaces direct MUI dependencies with BUI and icons.
workspaces/​lighthouse/​plugins/​lighthouse/​dev/​index.tsx Loads BUI styles for local development.
workspaces/​lighthouse/​.changeset/​eleven-parents-destroy.md Documents the migration and BUI installation requirement.

Review effort: Balanced

@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 @AmbrishRamachandiran, there's a conflict and Copilot has left some comments that need to be addressed. Also, there's some clear issue in the images you posted where things don't line up nice like the last report column and on the Lighthouse Audit card. Additionally the sidebar when looking at audits has an odd white square around it which looks bad. Finally, there's two headers, we should be using just the BUI header.

Signed-off-by: AmbrishRamachandiran <[email protected]>

# Conflicts:
#	workspaces/lighthouse/plugins/lighthouse/package.json
#	workspaces/lighthouse/plugins/lighthouse/src/components/AuditList/AuditListForEntity.tsx
#	workspaces/lighthouse/plugins/lighthouse/src/components/AuditList/index.tsx
#	workspaces/lighthouse/plugins/lighthouse/src/components/CreateAudit/index.tsx
#	workspaces/lighthouse/plugins/lighthouse/src/components/Intro/index.tsx
#	workspaces/lighthouse/yarn.lock
- Audit sidebar navigates on a single click (selection change) and keeps
  the current audit selected; status icon rendered inline instead of in
  the boxed ListRow icon slot
- Pagination range uses the offset returned by the server
- Align status icons with their text in the audit table and audit card
- Opt the page out of the default page header so only the BUI Header
  is shown
- Keep the audit report at a usable height inside the page container
- Tests click sidebar rows and cover the returned-offset range label

Signed-off-by: AmbrishRamachandiran <[email protected]>
@AmbrishRamachandiran

Copy link
Copy Markdown
Contributor Author

Thanks for the review @awanlin

i have pushed an update:

Merged the conflicts resolved.

One header: the page now opts out of the default page header (noHeader), so only the BUI Header is shown
Audit history list: a single click opens the audit, and the status icon is inline, so the boxed background around it is gone
Status icons are now aligned with their text in the "Last report" column and on the Lighthouse Audit card

Please refer to the :

Screenshots of the updated UI (PDF):

Updated UI

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

Repeated Next clicks while a page is loading use stale pagination state, allowing navigation past the last page and producing an empty result.

1 open issue
2 resolved since last review

Review effort: Balanced

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

There's still Copilot comments to address. Is it possible for you to trigger that yourself @AmbrishRamachandiran? That would help make the feedback cycle a bit better. I'm looking for it to be either a green approval or a blue human review needed. 👍

Also, please update the PR description with the images don't force a reviewer to look at a PDF file.

The previous page's data is kept while the next page loads, so repeated
clicks could navigate past the last page. Disable Previous/Next until the
request completes, with a test using a delayed response.

Signed-off-by: AmbrishRamachandiran <[email protected]>
@AmbrishRamachandiran

AmbrishRamachandiran commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks @awanlin. Updated screenshot in Description

I tried to re-run the Copilot review myself, but the option isn't available to me since I don't have write access to the repo. Could you trigger it again when you get a chance?

@AmbrishRamachandiran

Copy link
Copy Markdown
Contributor Author

sorry to ping you again @awanlin please take a look any changes needed so that i can open few other PR's as we have limit to 3 PR

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.

🟢 Approval recommended

No active review issues were identified for the Lighthouse plugin’s migration to Backstage UI.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

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.

4 participants