Repository navigation
Migrate Lighthouse Plugin MUI to BUI - #10218
AmbrishRamachandiran wants to merge 13 commits into
Conversation
Signed-off-by: AmbrishRamachandiran <[email protected]>
|
Important This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior. Changed Packages
|
Signed-off-by: AmbrishRamachandiran <[email protected]>
Signed-off-by: AmbrishRamachandiran <[email protected]>
Signed-off-by: AmbrishRamachandiran <[email protected]>
|
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! |
Signed-off-by: AmbrishRamachandiran <[email protected]>
Signed-off-by: AmbrishRamachandiran <[email protected]>
|
@hopehadfield can you please review ? TIA? |
Signed-off-by: AmbrishRamachandiran <[email protected]>
- 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]>
|
@hopehadfield @awanlin I've pushed an update that finishes the migration and merges the latest Changes in this update
|
- 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]>
|
@hopehadfield @awanlin I've attached the migrated screenshots in the PR description for reference. Please take a look when you get a chance. Thanks! 🙏 |
|
Friendly reminder @hopehadfield @awanlin: this one is ready for review (migration finished, latest |
There was a problem hiding this comment.
🟡 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
left a comment
There was a problem hiding this comment.
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]>
|
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 Please refer to the : Screenshots of the updated UI (PDF): |
awanlin
left a comment
There was a problem hiding this comment.
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]>
|
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? |
|
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 |


Part of #7869 (migration of community-maintainer-owned plugins from MUI to BUI).
Screenshots
Audits page with intro
Intro – Setup tab
Audit list – status column and pagination
Audit history and report
After a single click on another audit
Failed audit (BUI Alert)
Create audit form
Create audit – form factor (BUI Select)
Entity overview – Lighthouse Audit card
Entity Lighthouse tab