Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commiteb8d85f

Browse files
authored
feat: treat deprecation messages as markdown (#11562)
1 parent95fd0bb commiteb8d85f

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
importHubOutlinedfrom"@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
exporttypeWorkspaceError=
3132
|"getBuildsError"
@@ -363,8 +364,14 @@ export const Workspace: FC<WorkspaceProps> = ({
363364

364365
{template?.deprecated&&(
365366
<Alertseverity="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)

[8]ページ先頭

©2009-2025 Movatter.jp