diff --git a/.changeset/stupid-insects-allow.md b/.changeset/stupid-insects-allow.md new file mode 100644 index 0000000000..a55b5c1044 --- /dev/null +++ b/.changeset/stupid-insects-allow.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-react': patch +--- + +Fixed bug in `EntityDisplayName` where text was overflowing. diff --git a/plugins/catalog-react/src/components/EntityDisplayName/EntityDisplayName.tsx b/plugins/catalog-react/src/components/EntityDisplayName/EntityDisplayName.tsx index 68d5ecefdb..7ffceb2cce 100644 --- a/plugins/catalog-react/src/components/EntityDisplayName/EntityDisplayName.tsx +++ b/plugins/catalog-react/src/components/EntityDisplayName/EntityDisplayName.tsx @@ -20,6 +20,7 @@ import Tooltip from '@material-ui/core/Tooltip'; import { Theme, makeStyles } from '@material-ui/core/styles'; import React from 'react'; import { useEntityPresentation } from '../../apis'; +import Typography from '@material-ui/core/Typography'; /** * The available style class keys for {@link EntityDisplayName}, under the name @@ -34,6 +35,7 @@ const useStyles = makeStyles( root: { display: 'inline-flex', alignItems: 'center', + maxWidth: '100%', }, icon: { marginRight: theme.spacing(0.5), @@ -77,7 +79,22 @@ export const EntityDisplayName = ( ); // The innermost "body" content - let content = <>{primaryTitle}; + let content = ( + + + {primaryTitle} + + + ); // Optionally an icon, and wrapper around them both content = (