Skip to content

Commit 94f3815

Browse files
manozzoclaude
andcommitted
fix(templates): cap visible tags so the Create button stays visible
Template cards have a fixed height, and the header rendered every tag. Portabase has 27, which pushed the description and footer (Create button) out of the card. Show the first 6 tags plus a "+N" badge whose title lists the rest. Closes #5660 Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 931f5c1 commit 94f3815

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

‎apps/dokploy/components/dashboard/project/add-template.tsx‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ export const AddTemplate = ({ environmentId, baseUrl }: Props) => {
435435
{viewMode === "detailed" &&
436436
template?.tags?.length > 0 && (
437437
<div className="flex flex-wrap justify-center gap-1.5">
438-
{template?.tags?.map((tag) => (
438+
{template.tags.slice(0, 6).map((tag) => (
439439
<Badge
440440
key={tag}
441441
variant="green"
@@ -444,6 +444,15 @@ export const AddTemplate = ({ environmentId, baseUrl }: Props) => {
444444
{tag}
445445
</Badge>
446446
))}
447+
{template.tags.length > 6 && (
448+
<Badge
449+
variant="green"
450+
className="text-[10px] px-2 py-0"
451+
title={template.tags.slice(6).join(", ")}
452+
>
453+
+{template.tags.length - 6}
454+
</Badge>
455+
)}
447456
</div>
448457
)}
449458
</div>

0 commit comments

Comments
 (0)