Open tikabom opened 3 months ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I think that this is most likely going to be fixed when we move away from material-ui@v4
and to the new mui@v5
in core-components
. We don't really have a plan for what core-components
will look like when we move.
It could be worth following the milestone here and we're gonna be looking a polishing off mui@v5
support for the framework later on after summer, which will enable us to plan what to do with core-components
.
📜 Description
Using the SidebarItem and Link components from backstage's core-components produces console errors in Portal.
👍 Expected behavior
No console errors for deprecated apis used in backstage's core-components.
👎 Actual Behavior with Screenshots
The SidebarItem component in backstage's core-components results in the following console error in Portal -
👟 Reproduction steps
Create a react app and add @backstage/core-components as a dependency. Create a new sidebar item with an
onClick
handler it uses an mui4 button under the hood like so:Or use the core-component Link component with an
onClick
handler. Will produce the same console error.📃 Provide the context for the Bug.
Looks to be a result of the muiv4 Button component use in the SidebarItem here: https://github.com/backstage/backstage/blob/3c47d9b755421c39c0109a7f27b68217e9639456/packages/core-components/src/layout/Sidebar/Items.tsx#L466-L474
For the Link component it seems muiv4 Link might be using a deprecated api.
@awanlin has additionally highlighted that this might be the result of logging added in react 18.3 around deprecated apis - https://react.dev/blog/2024/04/25/react-19-upgrade-guide#react-18-3
🖥️ Your Environment
👀 Have you spent some time to check if this bug has been raised before?
🏢 Have you read the Code of Conduct?
Are you willing to submit PR?
Yes I am willing to submit a PR!