From fe5421c014f7008a1928d3125579b84f8dacf2f2 Mon Sep 17 00:00:00 2001 From: Parkreiner Date: Thu, 25 Jul 2024 18:08:42 +0000 Subject: [PATCH] fix: resolve text overflow issues for workspace empty state --- .../pages/WorkspacesPage/WorkspacesEmpty.tsx | 33 +++++++++++++++---- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/site/src/pages/WorkspacesPage/WorkspacesEmpty.tsx b/site/src/pages/WorkspacesPage/WorkspacesEmpty.tsx index f836d1fa73e92..bf877d580bc07 100644 --- a/site/src/pages/WorkspacesPage/WorkspacesEmpty.tsx +++ b/site/src/pages/WorkspacesPage/WorkspacesEmpty.tsx @@ -92,8 +92,8 @@ export const WorkspacesEmpty = (props: { > {featuredTemplates?.map((t) => ( ({ width: "320px", padding: 16, @@ -120,19 +120,38 @@ export const WorkspacesEmpty = (props: { {t.name} -
-

- {t.display_name.length > 0 ? t.display_name : t.name} + +
+

+ {t.display_name || t.name}

- ({ fontSize: 13, color: theme.palette.text.secondary, - lineHeight: "0.5", + lineHeight: "1.4", + margin: 0, + paddingTop: "4px", + + // We've had users plug URLs directly into the + // descriptions, when those URLS have no hyphens or other + // easy semantic breakpoints. Need to set this to ensure + // those URLs don't break outside their containing boxes + wordBreak: "break-word", })} > {t.description} - +

))}