backstage / backstage/community-plugins
๐ tech-radar: Error if not all quadrants are set
- Dominant language
- TypeScript
- Stars
- 422
- Forks
- 697
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 286
Description
### Workspace
tech-radar
### ๐ Description
If a tech radar has not data for all four quadrants (e.g. only three quadrants) then a error appears.
In older versions (e.g. `0.7.11`) it works without errors.
### ๐ Expected behavior
The tech radar should be displayed, only the quadrants without data should be empty(also without legend).
This was the behaviour in older versions, like `0.7.11`.
### ๐ Actual Behavior with Screenshots
Instead of the tech radar the following error will be displayed fullsized in the browser:
### ๐ Reproduction steps
- create a tech radar with only data for e.g. 3 quadrants
### ๐ Provide the context for the Bug.
According to quick look in the source code of the plugin, the reason ist probably the access of array elements of `adjustedQuadrants` without checking if this array element exists at all (e.g. in`Radar.tsx` line 61 and 62, perhaps there are other places as well).
btw: The introductory comment of `adjustQuadrants` in `utils.ts` is incorrect, and maybe could also be fixed:
- `xStops` did not exists anymore, it was replaced with `xStarts` in the past, but the comment still referenced it
- Q2 and Q3 should be swapped, as the quadrants are filled clockwise (as also described in the README.md)
### ๐ Have you spent some time to check if this bug has been raised before?
- [x] I checked and didn't find similar issue
### ๐ข Have you read the Code of Conduct?
- [x] I have read the [Code of Conduct](https://github.com/backstage/community-plugins/blob/main/CODE_OF_CONDUCT.md)
### Are you willing to submit PR?
None
Contributor guide
Research direction
Reproduce the issue with a tech radar containing data for only three quadrants, then inspect Radar.tsx around lines 61โ62 and the adjustedQuadrants handling in utils.ts. Confirm the radar renders with missing quadrants empty and without legends; also check the adjustQuadrants comment and README.md quadrant order references.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 76/100