Skip to content

Commit c2239f4

Browse files
committed
Remove template short description
1 parent ba35273 commit c2239f4

22 files changed

Lines changed: 2432 additions & 91 deletions

File tree

apps/web/app/openclaw/template/[templateSlug]/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export async function generateMetadata({
6262

6363
return buildSeoMetadata({
6464
title: `${detail.template.title} — OpenClaw Template on Claws.supply`,
65-
description: detail.template.shortDescription,
65+
description: detail.template.excerpt,
6666
path: templatePath(detail.template.slug),
6767
ogType: "article",
6868
});
@@ -168,7 +168,7 @@ export default async function TemplateDetailPage({ params }: TemplatePageProps)
168168
</div>
169169
</div>
170170

171-
<p className="max-w-3xl text-sm text-muted-foreground">{detail.template.shortDescription}</p>
171+
<p className="max-w-3xl text-sm text-muted-foreground">{detail.template.excerpt}</p>
172172

173173
{detail.template.versionNotes ? (
174174
<div className="border border-border bg-muted/20 p-3 text-xs">

apps/web/app/openclaw/templates/publish-via-cli/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default function PublishViaCliPage() {
4141
{`npx claws-supply publish`}
4242
</pre>
4343
<p className="text-sm text-muted-foreground">
44-
The CLI prints the template URL after draft creation. Only you and admins can view it until it is published.
44+
The CLI prints the direct edit URL after draft creation. Only you and admins can view it until it is published.
4545
</p>
4646
</section>
4747

apps/web/components/template-card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export function TemplateCard({ template, showCategory = false }: TemplateCardPro
4141
</Link>
4242
</h3>
4343
<p className="text-xs leading-relaxed text-muted-foreground">
44-
{template.shortDescription}
44+
{template.excerpt}
4545
</p>
4646
</div>
4747

apps/web/components/templates/template-metadata-fields.tsx

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ export type TemplateMetadataFormValues = {
1010
slug: string;
1111
category: CategorySlug;
1212
description: string;
13-
shortDescription: string;
1413
priceCents: number;
1514
};
1615

@@ -22,7 +21,6 @@ type TemplateMetadataFieldsProps = {
2221
onSlugChange: (value: string) => void;
2322
onCategoryChange: (value: CategorySlug) => void;
2423
onDescriptionChange: (value: string) => void;
25-
onShortDescriptionChange: (value: string) => void;
2624
onPriceCentsChange: (value: number) => void;
2725
};
2826

@@ -34,7 +32,6 @@ export function TemplateMetadataFields({
3432
onSlugChange,
3533
onCategoryChange,
3634
onDescriptionChange,
37-
onShortDescriptionChange,
3835
onPriceCentsChange,
3936
}: TemplateMetadataFieldsProps) {
4037
return (
@@ -104,27 +101,6 @@ export function TemplateMetadataFields({
104101
/>
105102
</div>
106103

107-
<div className="space-y-1">
108-
<label
109-
htmlFor="template-short-description"
110-
className="text-xs uppercase tracking-wide"
111-
>
112-
Short Description
113-
</label>
114-
<Textarea
115-
id="template-short-description"
116-
value={values.shortDescription}
117-
onChange={(event) => onShortDescriptionChange(event.target.value)}
118-
maxLength={240}
119-
rows={3}
120-
required
121-
disabled={disabled}
122-
/>
123-
<p className="text-[11px] text-muted-foreground">
124-
{values.shortDescription.length}/240
125-
</p>
126-
</div>
127-
128104
<div className="space-y-1">
129105
<label
130106
htmlFor="template-description"

apps/web/components/templates/template-owner-panel.tsx

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import {
2525
type TemplateMutationDTO,
2626
type TemplateVersionDTO,
2727
} from "@/lib/templates/client/api";
28-
import { deriveShortDescriptionFromMarkdown } from "@/lib/templates/form-helpers";
2928

3029
type TemplateOwnerPanelProps = {
3130
initialTemplate: TemplateMutationDTO;
@@ -50,7 +49,6 @@ function toMetadataValues(template: TemplateMutationDTO): TemplateMetadataFormVa
5049
slug: template.slug,
5150
category: template.category as TemplateMetadataFormValues["category"],
5251
description: template.description,
53-
shortDescription: template.shortDescription,
5452
priceCents: template.priceCents,
5553
};
5654
}
@@ -84,11 +82,6 @@ export function TemplateOwnerPanel({
8482
const [template, setTemplate] = useState(initialTemplate);
8583
const [versions, setVersions] = useState(initialVersions);
8684
const [metadata, setMetadata] = useState(() => toMetadataValues(initialTemplate));
87-
const [isShortDescriptionManuallyEdited, setIsShortDescriptionManuallyEdited] =
88-
useState(
89-
initialTemplate.shortDescription !==
90-
deriveShortDescriptionFromMarkdown(initialTemplate.description),
91-
);
9285
const [currentVersionNotesDraft, setCurrentVersionNotesDraft] = useState(
9386
initialTemplate.versionNotes ?? "",
9487
);
@@ -101,17 +94,12 @@ export function TemplateOwnerPanel({
10194
setVersions(initialVersions);
10295
setMetadata(toMetadataValues(initialTemplate));
10396
setCurrentVersionNotesDraft(initialTemplate.versionNotes ?? "");
104-
setIsShortDescriptionManuallyEdited(
105-
initialTemplate.shortDescription !==
106-
deriveShortDescriptionFromMarkdown(initialTemplate.description),
107-
);
10897
}, [initialTemplate, initialVersions]);
10998

11099
const canSaveEdits = template.status !== "deleted";
111100
const hasMetadataChanges =
112101
metadata.title !== template.title ||
113102
metadata.description !== template.description ||
114-
metadata.shortDescription !== template.shortDescription ||
115103
metadata.category !== template.category ||
116104
metadata.priceCents !== template.priceCents;
117105

@@ -136,9 +124,6 @@ export function TemplateOwnerPanel({
136124
...(metadata.description !== template.description
137125
? { description: metadata.description }
138126
: {}),
139-
...(metadata.shortDescription !== template.shortDescription
140-
? { shortDescription: metadata.shortDescription }
141-
: {}),
142127
...(metadata.category !== template.category
143128
? { category: metadata.category }
144129
: {}),
@@ -200,16 +185,6 @@ export function TemplateOwnerPanel({
200185
setMetadata((current) => ({
201186
...current,
202187
description: value,
203-
shortDescription: isShortDescriptionManuallyEdited
204-
? current.shortDescription
205-
: deriveShortDescriptionFromMarkdown(value),
206-
}));
207-
}}
208-
onShortDescriptionChange={(value) => {
209-
setIsShortDescriptionManuallyEdited(true);
210-
setMetadata((current) => ({
211-
...current,
212-
shortDescription: value,
213188
}));
214189
}}
215190
onPriceCentsChange={(value) => {

apps/web/content/docs/publish-template.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ npx claws-supply build
2929
npx claws-supply publish
3030
```
3131

32-
The publish command creates a **draft template** and prints the template URL.
32+
The publish command creates a **draft template** and prints the direct edit URL.
3333

3434
## What publish creates
3535

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE "template" DROP COLUMN "short_description";

0 commit comments

Comments
 (0)