chore(adoption-insights): version:bump to v1.49.3#2753
chore(adoption-insights): version:bump to v1.49.3#2753Eswaraiahsapram wants to merge 2 commits intoredhat-developer:mainfrom
Conversation
|
Important This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior. Changed Packages
|
Review Summary by QodoUpgrade adoption-insights to Backstage v1.49.3 with API migrations
WalkthroughsDescription• Upgrade Backstage framework to v1.49.3 with dependency updates • Remove deprecated variant="gridItem" props from catalog entity cards • Migrate sidebar navigation to new plugin API with improved component structure • Update TypeScript to v5.8.0 and multiple Backstage plugin versions Diagramflowchart LR
A["Backstage v1.47.3"] -->|"Upgrade framework"| B["Backstage v1.49.3"]
B -->|"Update dependencies"| C["CLI 0.36.0, TS 5.8.0"]
D["Deprecated variant props"] -->|"Remove from cards"| E["Updated EntityPage.tsx"]
F["Old sidebar API"] -->|"Migrate to plugin-app-react"| G["New NavContentBlueprint"]
C -->|"Apply across"| H["All packages updated"]
File Changes1. workspaces/adoption-insights/.changeset/weak-jokes-write.md
|
Code Review by Qodo
|
| component: ({ navItems }) => { | ||
| const nav = navItems.withComponent(item => ( | ||
| <SidebarItem icon={() => item.icon} to={item.href} text={item.title} /> | ||
| )); |
There was a problem hiding this comment.
1. Sidebar icon rendered wrong 🐞 Bug ≡ Correctness
SidebarContent passes icon={() => item.icon} to SidebarItem, but nav items provide icon as
an IconComponent (a component type). This makes the icon renderer return a function instead of a
React element, so icons may not render and React can warn/error about functions as children.
Agent Prompt
### Issue description
`SidebarItem` is currently given `icon={() => item.icon}`. Because `item.icon` is an `IconComponent` (component type), this wrapper component returns a function instead of returning a React element, which can prevent the icon from rendering and can trigger React runtime warnings.
### Issue Context
Nav items (e.g., Adoption Insights) export `icon` as `IconComponent` via `NavItemBlueprint`.
### Fix Focus Areas
- workspaces/adoption-insights/packages/app/src/modules/nav/Sidebar.tsx[30-33]
### Suggested change
Update the mapping to pass the icon component through, e.g.:
- `icon={item.icon}`
(If you need to support both element and component forms, convert to an element explicitly with `icon={() => React.createElement(item.icon)}` or similar, but the repo’s nav-item contract here is `IconComponent`.)
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|



Hey, I just made a Pull Request!
Fix: https://redhat.atlassian.net/browse/RHIDP-12845
✔️ Checklist