From bcfdd852c253091ded73e10da7ab9a6e3b8005a8 Mon Sep 17 00:00:00 2001 From: Philipp Hugenroth Date: Thu, 15 Jul 2021 15:12:16 +0200 Subject: [PATCH] Break error message text for docs on EntityPage Signed-off-by: Philipp Hugenroth --- .../techdocs/src/reader/components/Reader.tsx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/plugins/techdocs/src/reader/components/Reader.tsx b/plugins/techdocs/src/reader/components/Reader.tsx index d63ddf8125..9dd8a2d656 100644 --- a/plugins/techdocs/src/reader/components/Reader.tsx +++ b/plugins/techdocs/src/reader/components/Reader.tsx @@ -19,7 +19,12 @@ import { Progress } from '@backstage/core-components'; import { useApi } from '@backstage/core-plugin-api'; import { scmIntegrationsApiRef } from '@backstage/integration-react'; import { BackstageTheme } from '@backstage/theme'; -import { Button, CircularProgress, useTheme } from '@material-ui/core'; +import { + Button, + CircularProgress, + makeStyles, + useTheme, +} from '@material-ui/core'; import { Alert } from '@material-ui/lab'; import React, { useCallback, useEffect, useRef, useState } from 'react'; import { useNavigate, useParams } from 'react-router-dom'; @@ -45,10 +50,17 @@ type Props = { onReady?: () => void; }; +const useStyles = makeStyles(() => ({ + message: { + overflowWrap: 'anywhere', + }, +})); + export const Reader = ({ entityId, onReady }: Props) => { const { kind, namespace, name } = entityId; const { '*': path } = useParams(); const theme = useTheme(); + const classes = useStyles(); const { state, @@ -369,6 +381,7 @@ export const Reader = ({ entityId, onReady }: Props) => { variant="outlined" severity="error" action={} + classes={{ message: classes.message }} > Building a newer version of this documentation failed.{' '} {syncErrorMessage} @@ -381,6 +394,7 @@ export const Reader = ({ entityId, onReady }: Props) => { variant="outlined" severity="error" action={} + classes={{ message: classes.message }} > Building a newer version of this documentation failed.{' '} {syncErrorMessage}