mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: resolve text overflow issues for workspace empty state (#14015)
This commit is contained in:
@@ -92,8 +92,8 @@ export const WorkspacesEmpty = (props: {
|
||||
>
|
||||
{featuredTemplates?.map((t) => (
|
||||
<Link
|
||||
to={`/templates/${t.name}/workspace`}
|
||||
key={t.id}
|
||||
to={`/templates/${t.name}/workspace`}
|
||||
css={(theme) => ({
|
||||
width: "320px",
|
||||
padding: 16,
|
||||
@@ -120,19 +120,38 @@ export const WorkspacesEmpty = (props: {
|
||||
{t.name}
|
||||
</Avatar>
|
||||
</div>
|
||||
<div>
|
||||
<h4 css={{ fontSize: 14, fontWeight: 600, margin: 0 }}>
|
||||
{t.display_name.length > 0 ? t.display_name : t.name}
|
||||
|
||||
<div css={{ width: "100%", minWidth: "0" }}>
|
||||
<h4
|
||||
css={{
|
||||
fontSize: 14,
|
||||
fontWeight: 600,
|
||||
margin: 0,
|
||||
overflow: "hidden",
|
||||
textOverflow: "ellipsis",
|
||||
whiteSpace: "nowrap",
|
||||
}}
|
||||
>
|
||||
{t.display_name || t.name}
|
||||
</h4>
|
||||
<span
|
||||
|
||||
<p
|
||||
css={(theme) => ({
|
||||
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}
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
</Link>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user