Skip to content

Migrate Entity Validation Plugin From MUI to BUI - #10136

Open
AmbrishRamachandiran wants to merge 13 commits into
backstage:mainfrom
AmbrishRamachandiran:entity-validations-migrations
Open

AmbrishRamachandiran wants to merge 13 commits into
backstage:mainfrom
AmbrishRamachandiran:entity-validations-migrations

Conversation

@AmbrishRamachandiran

@AmbrishRamachandiran AmbrishRamachandiran commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

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

Screenshots

Entity Validator – light theme

Entity Validator – light theme

Validation errors – light theme

Validation errors – light theme

Entity Validator – dark theme

Entity Validator – dark theme

Validation errors – dark theme

Validation errors – dark theme

Embedded content

Embedded content

@AmbrishRamachandiran
AmbrishRamachandiran requested a review from a team as a code owner July 27, 2026 17:14
@backstage-goalie

backstage-goalie Bot commented Jul 27, 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-entity-validation workspaces/entity-validation/plugins/entity-validation major v0.26.0

@AmbrishRamachandiran

Copy link
Copy Markdown
Contributor Author

@Parsifal-M can you have a look once you get the time , TIA

@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 @AmbrishRamachandiran, I started a review but there's a lot of HTML primitives - divs , ul's, li's - being used here over actual Backstage UI components that it makes it hard to review. Can you please give this another look? 🙏

@AmbrishRamachandiran

Copy link
Copy Markdown
Contributor Author

Hi @AmbrishRamachandiran, I started a review but there's a lot of HTML primitives - divs , ul's, li's - being used here over actual Backstage UI components that it makes it hard to review. Can you please give this another look? 🙏

@awanlin

Thanks for reviewing the PR. I have addressed all the review comments. Could you please take another look when you have a chance?

@AmbrishRamachandiran
AmbrishRamachandiran marked this pull request as draft August 27, 2026 07:58
Signed-off-by: AmbrishRamachandiran <[email protected]>
Signed-off-by: AmbrishRamachandiran <[email protected]>
Signed-off-by: AmbrishRamachandiran <[email protected]>
Signed-off-by: AmbrishRamachandiran <[email protected]>
@AmbrishRamachandiran
AmbrishRamachandiran force-pushed the entity-validations-migrations branch from ca80c91 to 9497683 Compare August 27, 2026 08:58
Signed-off-by: AmbrishRamachandiran <[email protected]>
@AmbrishRamachandiran
AmbrishRamachandiran marked this pull request as ready for review August 27, 2026 09:10

@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 follow up @AmbrishRamachandiran, looked at this more closely this time around and found a few more items we need to clean up 👍

Comment thread workspaces/entity-validation/yarn.lock Resolved
Comment thread workspaces/entity-validation/yarn.lock Resolved
Signed-off-by: AmbrishRamachandiran <[email protected]>
Signed-off-by: AmbrishRamachandiran <[email protected]>
@AmbrishRamachandiran
AmbrishRamachandiran force-pushed the entity-validations-migrations branch from d203b84 to c7635c6 Compare September 1, 2026 07:40
@AmbrishRamachandiran

Copy link
Copy Markdown
Contributor Author

Thanks for the follow up @AmbrishRamachandiran, looked at this more closely this time around and found a few more items we need to clean up 👍

@awanlin changes updated please review

@pedrojreis

Copy link
Copy Markdown
Contributor

Following this PR as it's the only plugin (that we use) without BUI :P

One question : shouldn't the header also be updated?

@AmbrishRamachandiran

Copy link
Copy Markdown
Contributor Author

@Parsifal-M any changes needed can you please check?

- Pin @remixicon/react below 4.9.0 (license change in 4.9.0)
- Use backstage:^ version spec for @backstage/ui
- Restore responsive two-column layout using BUI Grid
- Use BUI Flex/Box spacing props and Text colors instead of custom CSS
- Replace InfoCard with BUI Card
- Use onPress for BUI Button
- Update API reports

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

Copy link
Copy Markdown
Contributor Author

@awanlin @Parsifal-M I've pushed another round of updates and merged the latest main. Could you please take another look when you get a chance? 🙏

Changes in this update

  • Pinned @remixicon/react to >=4.6.0 <4.9.0, since 4.9.0 changed its license (per the repo's MUI→BUI migration guidance)
  • Switched @backstage/ui to the backstage:^ version spec, which now resolves to 0.19.0
  • Restored the responsive two-column layout with BUI Grid.Root / Grid.Item (it stacks on small screens, like the old md={6} xs={12})
  • Replaced the custom flexbox CSS with BUI Flex/Box props (gap, align, p, mt) and used Text color="success" | "danger" in place of the color classes. EntityValidationOutput.module.css has been removed
  • Replaced InfoCard with BUI Card / CardBody
  • Button now uses onPress
  • API reports regenerated

All the earlier review items (major changeset, no @layer, no workspace-root changes, Alert, ButtonIcon, List/ListRow, MUI removed from yarn.lock) are still in place. tsc, lint, prettier, and tests pass locally.

@pedrojreis thanks for the question about the header. For now I've kept Page/Header/Content from @backstage/core-components for the standalone page, which matches the recently merged graphiql migration. If the maintainers would prefer the BUI Header here, I'm happy to switch it in this PR.

@AmbrishRamachandiran

Copy link
Copy Markdown
Contributor Author

@awanlin The requested changes should all be addressed now (all review threads are resolved), and I've linked #7869 in the description. Could you re-review when you get a chance? 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

Missing or null entity metadata can crash result rendering before validation errors appear, while inherited no-wrap styles can clip expanded diagnostics.

4 open issues
What changed in this PR

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

Changes:

  • Replace MUI layouts, controls, validation results, and icons with BUI components and Remix Icons.
  • Move component styles into CSS modules and update the development example.
  • Update dependencies and add a major changeset documenting the new BUI requirement.
File Description
workspaces/​entity-validation/​yarn.lock Records updated UI dependencies.
workspaces/​entity-validation/​plugins/​entity-validation/​src/​components/​EntityValidationPage/​EntityValidationPage.tsx Migrates page layout and form controls.
workspaces/​entity-validation/​plugins/​entity-validation/​src/​components/​EntityValidationPage/​EntityValidationPage.module.css Adds page and editor layout styles.
workspaces/​entity-validation/​plugins/​entity-validation/​src/​components/​EntityValidationOutput/​EntityValidationOutput.tsx Migrates result cards, lists, alerts, and status text.
workspaces/​entity-validation/​plugins/​entity-validation/​src/​components/​EntityValidationOutput/​EntityResult.tsx Migrates result rows and expansion controls.
workspaces/​entity-validation/​plugins/​entity-validation/​src/​components/​EntityValidationOutput/​EntityResult.module.css Adds validation status and error-panel styles.
workspaces/​entity-validation/​plugins/​entity-validation/​src/​components/​EntityTextArea/​EntityTextArea.tsx Uses BUI Box and CSS-module styling.
workspaces/​entity-validation/​plugins/​entity-validation/​src/​components/​EntityTextArea/​EntityTextArea.module.css Adds editor positioning and instruction-panel styles.
workspaces/​entity-validation/​plugins/​entity-validation/​src/​alpha/​entityPages.tsx Replaces the page icon with a Remix Icon.
workspaces/​entity-validation/​plugins/​entity-validation/​report.api.md Reflects explicit ReactNode type imports.
workspaces/​entity-validation/​plugins/​entity-validation/​package.json Replaces direct MUI dependencies with BUI and Remix Icons.
workspaces/​entity-validation/​plugins/​entity-validation/​dev/​index.tsx Uses BUI text in the embedded example.
workspaces/​entity-validation/​.changeset/​chilly-owls-wash.md Documents the breaking BUI requirement.

Review effort: Balanced

…migrations

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

# Conflicts:
#	workspaces/entity-validation/plugins/entity-validation/src/components/EntityValidationPage/EntityValidationPage.tsx
#	workspaces/entity-validation/yarn.lock
- Handle entities with missing metadata when building the result row id,
  so their validation errors are still shown (with a test)
- Let expanded validation errors wrap instead of being clipped
- Use BUI tokens that exist for the editor hint and error panel colours
- Opt the page out of the default page header so only the BUI Header
  is shown

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

Copy link
Copy Markdown
Contributor Author

Hi @awanlin @Parsifal-M i have resolved the copilot comments and tested it in local please find the latest screenshots in following link:

Screenshots in light and dark themes (PDF):

ENTITY VALIDATION MUI TO BUI SCREENS

@awanlin awanlin self-assigned this Nov 27, 2026
@awanlin
awanlin requested a balanced review from Copilot November 27, 2026 18:08

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

Validation result rows can have duplicate IDs and lack text values, preventing independent result tracking and keyboard type-ahead navigation.

2 open issues
4 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. 👍

- Pass a per-result id from the list instead of deriving it from entity
  fields, so repeated or unnamed entities get distinct rows
- Set textValue from the entity display name for keyboard type-ahead
- Add a test with repeated and unnamed entities

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?

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.

🔵 Needs a closer look

Clicking an invalid entity’s name no longer expands or collapses its validation errors, regressing the existing behavior and leaving only the arrow button functional.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Restore entity name click to expand validation errors

workspaces/​entity-validation/​plugins/​entity-validation/​src/​components/​EntityValidationOutput/​EntityResult.tsx:55

Clicking an entity's name no longer expands or collapses its validation errors: the previous ListItemText click handler was removed, and only the arrow button now updates expanded. Restore the row/name activation handler for invalid entities using ListRow's onAction, and cover it with an interaction test to preserve the existing behavior.

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

5 participants