chore: add changeset

Signed-off-by: Rajib Quayum <rajibq@users.noreply.github.com>
This commit is contained in:
Rajib Quayum
2026-02-27 12:45:57 -05:00
parent 9dc1bd53d3
commit 83856ffe55
2 changed files with 27 additions and 2 deletions
+24
View File
@@ -0,0 +1,24 @@
---
'example-app-legacy': minor
'@backstage/create-app': minor
'@backstage/theme': minor
'example-app': minor
---
Separates MUI 5 class name generator code into separate file and entry point that can be imported before any MUI 5 component loads.
This addresses the problem where the elements contain the `v5-` prefix for MUI class names, but the static class names from the library do not.
Import should be made as follows to ensure the prefix problem is addressed correctly:
```diff
// packages/app/index.ts
+ import '@backstage/theme/MuiClassNameSetup'; // must be the very first import!
import '@backstage/cli/asset-types';
import ReactDOM from 'react-dom/client';
import app from './App';
import '@backstage/ui/css/styles.css';
ReactDOM.createRoot(document.getElementById('root')!).render(app);
```
@@ -20,9 +20,10 @@ import { unstable_ClassNameGenerator as ClassNameGenerator } from '@mui/material
*
* This needs to be configured before any MUI 5 component can possibly be imported. See: https://v5.mui.com/material-ui/experimental-api/classname-generator/#caveat
*
* ```packages/app/index.ts
* ```diff
* // packages/app/index.ts
*
* import '@backstage/theme/MuiClassNameSetup'; // must be the very first import!
* + import '@backstage/theme/MuiClassNameSetup'; // must be the very first import!
* import '@backstage/cli/asset-types';
* import ReactDOM from 'react-dom/client';
* import app from './App';