From 69208ae3ed649dec61ce87ccb1b791ddca1cd7b8 Mon Sep 17 00:00:00 2001 From: its-mitesh-kumar Date: Mon, 4 Nov 2024 14:32:51 +0530 Subject: [PATCH 1/5] fix(catalog-react) : fixing owner text overflow Signed-off-by: its-mitesh-kumar --- .../EntityDisplayName/EntityDisplayName.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/plugins/catalog-react/src/components/EntityDisplayName/EntityDisplayName.tsx b/plugins/catalog-react/src/components/EntityDisplayName/EntityDisplayName.tsx index 68d5ecefdb..7a00ff3809 100644 --- a/plugins/catalog-react/src/components/EntityDisplayName/EntityDisplayName.tsx +++ b/plugins/catalog-react/src/components/EntityDisplayName/EntityDisplayName.tsx @@ -77,7 +77,16 @@ export const EntityDisplayName = ( ); // The innermost "body" content - let content = <>{primaryTitle}; + let content = ( +
+ {primaryTitle} +
+ ); // Optionally an icon, and wrapper around them both content = ( From 9cc82c02bff06cae796f572001825e3516c27136 Mon Sep 17 00:00:00 2001 From: its-mitesh-kumar Date: Mon, 4 Nov 2024 14:50:51 +0530 Subject: [PATCH 2/5] fix(catalog-react) : adding changeset file Signed-off-by: its-mitesh-kumar --- .changeset/healthy-planets-confess.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/healthy-planets-confess.md diff --git a/.changeset/healthy-planets-confess.md b/.changeset/healthy-planets-confess.md new file mode 100644 index 0000000000..a55b5c1044 --- /dev/null +++ b/.changeset/healthy-planets-confess.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-react': patch +--- + +Fixed bug in `EntityDisplayName` where text was overflowing. From 08a3c86aa91832e33620eeee5d5055a636dd5290 Mon Sep 17 00:00:00 2001 From: its-mitesh-kumar Date: Wed, 6 Nov 2024 12:36:41 +0530 Subject: [PATCH 3/5] fix(catalog-react) : moving styles under makeStyles Signed-off-by: its-mitesh-kumar --- .../EntityDisplayName/EntityDisplayName.tsx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/plugins/catalog-react/src/components/EntityDisplayName/EntityDisplayName.tsx b/plugins/catalog-react/src/components/EntityDisplayName/EntityDisplayName.tsx index 7a00ff3809..3e722efb46 100644 --- a/plugins/catalog-react/src/components/EntityDisplayName/EntityDisplayName.tsx +++ b/plugins/catalog-react/src/components/EntityDisplayName/EntityDisplayName.tsx @@ -42,6 +42,10 @@ const useStyles = makeStyles( verticalAlign: 'middle', }, }, + breakTextOverflow: { + overflow: 'hidden', + wordBreak: 'break-word', + }, }), { name: 'CatalogReactEntityDisplayName' }, ); @@ -77,16 +81,7 @@ export const EntityDisplayName = ( ); // The innermost "body" content - let content = ( -
- {primaryTitle} -
- ); + let content =
{primaryTitle}
; // Optionally an icon, and wrapper around them both content = ( From 386e31bf410bc9e2cedc5542bfa09999a9f99bea Mon Sep 17 00:00:00 2001 From: its-mitesh-kumar Date: Mon, 18 Nov 2024 11:59:23 +0530 Subject: [PATCH 4/5] fix(catalog-react) : moving styles to parent Signed-off-by: its-mitesh-kumar --- .../src/components/EntityDisplayName/EntityDisplayName.tsx | 7 +------ plugins/catalog/src/components/AboutCard/AboutContent.tsx | 1 + plugins/catalog/src/components/AboutCard/AboutField.tsx | 5 +++-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/plugins/catalog-react/src/components/EntityDisplayName/EntityDisplayName.tsx b/plugins/catalog-react/src/components/EntityDisplayName/EntityDisplayName.tsx index 3e722efb46..75a2950908 100644 --- a/plugins/catalog-react/src/components/EntityDisplayName/EntityDisplayName.tsx +++ b/plugins/catalog-react/src/components/EntityDisplayName/EntityDisplayName.tsx @@ -42,10 +42,6 @@ const useStyles = makeStyles( verticalAlign: 'middle', }, }, - breakTextOverflow: { - overflow: 'hidden', - wordBreak: 'break-word', - }, }), { name: 'CatalogReactEntityDisplayName' }, ); @@ -81,8 +77,7 @@ export const EntityDisplayName = ( ); // The innermost "body" content - let content =
{primaryTitle}
; - + let content = <>{primaryTitle}; // Optionally an icon, and wrapper around them both content = ( diff --git a/plugins/catalog/src/components/AboutCard/AboutContent.tsx b/plugins/catalog/src/components/AboutCard/AboutContent.tsx index f6d2d80264..07547c8949 100644 --- a/plugins/catalog/src/components/AboutCard/AboutContent.tsx +++ b/plugins/catalog/src/components/AboutCard/AboutContent.tsx @@ -132,6 +132,7 @@ export function AboutContent(props: AboutContentProps) { {ownedByRelations.length > 0 && ( diff --git a/plugins/catalog/src/components/AboutCard/AboutField.tsx b/plugins/catalog/src/components/AboutCard/AboutField.tsx index 7587867af0..15e02307f0 100644 --- a/plugins/catalog/src/components/AboutCard/AboutField.tsx +++ b/plugins/catalog/src/components/AboutCard/AboutField.tsx @@ -48,11 +48,12 @@ export interface AboutFieldProps { value?: string; gridSizes?: Record; children?: React.ReactNode; + className?: string; } /** @public */ export function AboutField(props: AboutFieldProps) { - const { label, value, gridSizes, children } = props; + const { label, value, gridSizes, children, className } = props; const classes = useStyles(); const childElements = useElementFilter(children, c => c.getElements()); @@ -67,7 +68,7 @@ export function AboutField(props: AboutFieldProps) { ); return ( - + {label} From fdd759b7a5576d0e258171a29a20689d367ebd4e Mon Sep 17 00:00:00 2001 From: its-mitesh-kumar Date: Mon, 18 Nov 2024 14:49:11 +0530 Subject: [PATCH 5/5] chore: update API reports for changes Signed-off-by: its-mitesh-kumar --- plugins/catalog/report.api.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/catalog/report.api.md b/plugins/catalog/report.api.md index d817118e3a..7f1c334146 100644 --- a/plugins/catalog/report.api.md +++ b/plugins/catalog/report.api.md @@ -64,6 +64,8 @@ export interface AboutFieldProps { // (undocumented) children?: React_2.ReactNode; // (undocumented) + className?: string; + // (undocumented) gridSizes?: Record; // (undocumented) label: string;