backstage / backstage/community-plugins

๐Ÿ› tech-radar: Error if not all quadrants are set

Open
#10,802 2 comments 0 reactions 0 assignees View on GitHub
bug good first issue help wanted workspace/tech-radar
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:

Image

### ๐Ÿ‘Ÿ 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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.