Skip to content

Commit eb8d85f

Browse files
authored
feat: treat deprecation messages as markdown (#11562)
1 parent 95fd0bb commit eb8d85f

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

site/src/pages/WorkspacePage/Workspace.stories.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ export const Deprecated: Story = {
230230
template: {
231231
...Mocks.MockTemplate,
232232
deprecated: true,
233-
deprecation_message: "Template deprecated due to reasons",
233+
deprecation_message:
234+
"Template deprecated due to reasons. [Learn more](#)",
234235
},
235236
},
236237
};

site/src/pages/WorkspacePage/Workspace.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import { SidebarIconButton } from "components/FullPageLayout/Sidebar";
2626
import HubOutlined from "@mui/icons-material/HubOutlined";
2727
import { ResourcesSidebar } from "./ResourcesSidebar";
2828
import { ResourceCard } from "components/Resources/ResourceCard";
29+
import { MemoizedInlineMarkdown } from "components/Markdown/Markdown";
2930

3031
export type WorkspaceError =
3132
| "getBuildsError"
@@ -363,8 +364,14 @@ export const Workspace: FC<WorkspaceProps> = ({
363364

364365
{template?.deprecated && (
365366
<Alert severity="warning">
366-
<AlertTitle>Workspace using deprecated template</AlertTitle>
367-
<AlertDetail>{template?.deprecation_message}</AlertDetail>
367+
<AlertTitle>
368+
This workspace uses a deprecated template
369+
</AlertTitle>
370+
<AlertDetail>
371+
<MemoizedInlineMarkdown>
372+
{template?.deprecation_message}
373+
</MemoizedInlineMarkdown>
374+
</AlertDetail>
368375
</Alert>
369376
)}
370377

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy