feat(plugin-tech-radar): map description in API RadarEntry to Entry
The description in the Entry was mapped to the latest timeline entry, which is a changelog. This change maps the description in the API to the entry. To maintain backwards compatibility it will set the description to the last timeline entry if no description exists at the entry level. Signed-off-by: Niall McCullagh <niallmccullagh@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
---
|
||||
'@backstage/plugin-tech-radar': minor
|
||||
---
|
||||
|
||||
Map description in API RadarEntry to Entry
|
||||
|
||||
The description in the Entry was mapped to the latest timeline entry, which is a changelog. This
|
||||
change maps the description in the API to the entry. To maintain backwards compatibility it
|
||||
will set the description to the last timeline entry if no description exists at the entry level.
|
||||
@@ -38,6 +38,7 @@ export interface RadarEntry {
|
||||
title: string;
|
||||
url: string;
|
||||
timeline: Array<RadarEntrySnapshot>;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export interface RadarEntrySnapshot {
|
||||
|
||||
@@ -68,7 +68,7 @@ const RadarComponent = (props: TechRadarComponentProps): JSX.Element => {
|
||||
};
|
||||
}),
|
||||
moved: entry.timeline[0].moved,
|
||||
description: entry.timeline[0].description,
|
||||
description: entry.description || entry.timeline[0].description,
|
||||
url: entry.url,
|
||||
};
|
||||
});
|
||||
|
||||
@@ -49,6 +49,8 @@ entries.push({
|
||||
id: 'javascript',
|
||||
title: 'JavaScript',
|
||||
quadrant: 'languages',
|
||||
description:
|
||||
'Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum',
|
||||
});
|
||||
entries.push({
|
||||
timeline: [
|
||||
@@ -65,6 +67,8 @@ entries.push({
|
||||
id: 'typescript',
|
||||
title: 'TypeScript',
|
||||
quadrant: 'languages',
|
||||
description:
|
||||
'Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat',
|
||||
});
|
||||
entries.push({
|
||||
timeline: [
|
||||
|
||||
Reference in New Issue
Block a user