feat(x2a): icon for the X2A#2631
Conversation
Changed Packages
|
Review Summary by QodoAdd custom X2AIcon component for sidebar menu
WalkthroughsDescription• Add custom X2AIcon component for left sidebar menu • Export X2AIcon from plugin index for public use • Replace generic ExtensionIcon with X2AIcon in sidebar • Update catalog-info.yaml with accurate plugin metadata • Add changeset entry documenting icon addition Diagramflowchart LR
A["X2AIcon Component"] -->|"exported from"| B["Plugin Index"]
B -->|"imported in"| C["Root Component"]
C -->|"replaces"| D["ExtensionIcon"]
D -->|"in"| E["X2A Sidebar Item"]
File Changes1. workspaces/x2a/plugins/x2a/src/components/x2aIcon.tsx
|
Code Review by Qodo
1. SVG viewBox crops icon
|
| export const X2AIcon = (props: SvgIconProps) => ( | ||
| <SvgIcon viewBox="7 7 24 24" {...props}> | ||
| <path | ||
| className="uuid-af1cdb32-2f72-425e-8e77-dc25423c4aa2" | ||
| d="M28,1H10C5.0294,1,1,5.0294,1,10v18c0,4.9706,4.0294,9,9,9h18c4.9706,0,9-4.0294,9-9V10c0-4.9706-4.0294-9-9-9ZM35.75,28c0,4.2734-3.4766,7.75-7.75,7.75H10c-4.2734,0-7.75-3.4766-7.75-7.75V10c0-4.2734,3.4766-7.75,7.75-7.75h18c4.2734,0,7.75,3.4766,7.75,7.75v18Z" | ||
| /> |
There was a problem hiding this comment.
1. Svg viewbox crops icon 🐞 Bug ✓ Correctness
X2AIcon sets viewBox="7 7 24 24" but its path data includes coordinates outside that box (e.g., x=35.75), so the icon will render clipped/cropped in the sidebar.
Agent Prompt
### Issue description
`X2AIcon` uses a `viewBox` that is smaller than the coordinate range used by its `<path>` data, causing the rendered icon to be cropped.
### Issue Context
The first path contains coordinates up to `35.75` while the current viewBox ends at `31`.
### Fix Focus Areas
- workspaces/x2a/plugins/x2a/src/components/x2aIcon.tsx[23-28]
### Suggested fix
Update `viewBox` to match the icon’s coordinate system (e.g., use a box that includes the max x/y used by the paths), or normalize/scale the path data to fit a 24x24 viewBox.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
1bb7f16 to
c171805
Compare
Review Summary by QodoAdd custom X2A icon component for sidebar menu
WalkthroughsDescription• Add custom X2AIcon component for left sidebar menu • Export X2AIcon from plugin public API • Replace generic ExtensionIcon with X2AIcon in sidebar • Update catalog-info.yaml with accurate plugin metadata • Add changeset entry for icon feature Diagramflowchart LR
A["X2AIcon Component<br/>x2aIcon.tsx"] -- "exported from" --> B["Plugin Index<br/>index.ts"]
B -- "imported in" --> C["Root Component<br/>Root.tsx"]
C -- "replaces" --> D["ExtensionIcon<br/>in Sidebar"]
E["API Report<br/>report.api.md"] -- "documents" --> A
F["Changeset<br/>silly-views-change.md"] -- "tracks" --> A
File Changes1. workspaces/x2a/plugins/x2a/src/components/x2aIcon.tsx
|
Code Review by Qodo
1. SVG viewBox crops icon
|
c171805 to
a7abb49
Compare
Signed-off-by: Marek Libra <marek.libra@gmail.com>
a7abb49 to
b2b7c15
Compare
Review Summary by QodoAdd custom X2A icon component for sidebar menu
WalkthroughsDescription• Add custom X2AIcon component for left sidebar menu • Export X2AIcon from plugin index for public use • Replace generic ExtensionIcon with X2AIcon in sidebar • Update catalog-info.yaml with accurate plugin metadata • Add changeset entry documenting icon addition Diagramflowchart LR
A["X2AIcon Component"] -->|"exported from"| B["Plugin Index"]
B -->|"imported in"| C["Root Sidebar"]
C -->|"replaces"| D["ExtensionIcon"]
A -->|"documented in"| E["API Report"]
File Changes1. workspaces/x2a/plugins/x2a/src/components/x2aIcon.tsx
|
Code Review by Qodo
1. Undefined catalog owner
|
|
| type: backstage-frontend-plugin | ||
| lifecycle: active | ||
| owner: x2a-team | ||
| system: rhdh | ||
| subcomponentOf: rhdh-plugins |
There was a problem hiding this comment.
1. Undefined catalog owner 🐞 Bug ✓ Correctness
workspaces/x2a/catalog-info.yaml sets spec.owner: x2a-team, but no Group entity named x2a-team exists in this repository’s catalog team definitions, making the owner reference unresolvable. This can cause the component to appear without a valid owner relationship in Backstage and undermine owner-based filtering/permissions workflows.
Agent Prompt
## Issue description
`workspaces/x2a/catalog-info.yaml` sets `spec.owner` to `x2a-team`, but there is no corresponding `Group` entity named `x2a-team` in the repo’s catalog team definitions. This leaves the component with an unresolvable owner reference in Backstage.
## Issue Context
Other components in this repo use `spec.owner` values that are backed by `Group` entities defined in `catalog-info-teams.yaml` (for example, `orchestrator-team`). The X2A owner should follow the same convention.
## Fix Focus Areas
- Add a `Group` entity for `x2a-team`:
- catalog-info-teams.yaml[1-42]
- Or change the X2A component owner to an existing defined group (e.g. `rhdh-team`) if `x2a-team` is not intended to be a catalog entity:
- workspaces/x2a/catalog-info.yaml[18-22]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Fixes: FLPATH-3507
Adding custom X2A icon for the left side menu.
TODO:
Used by: x2ansible/x2a-convertor#160