Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

fix(marketplace): Fix store card style (#9769)

Abhimanyu Yadav07a09d802c70
diff --git a/autogpt_platform/frontend/src/components/agptui/StoreCard.tsx b/autogpt_platform/frontend/src/components/agptui/StoreCard.tsx
index 48274cb217..6124e3ff96 100644
--- a/autogpt_platform/frontend/src/components/agptui/StoreCard.tsx
+++ b/autogpt_platform/frontend/src/components/agptui/StoreCard.tsx
@@ -32,7 +32,7 @@ export const StoreCard: React.FC<StoreCardProps> = ({
return (
<div
- className="inline-flex w-full max-w-[434px] cursor-pointer flex-col items-start justify-start gap-2.5 rounded-[26px] bg-white transition-all duration-300 hover:shadow-lg dark:bg-transparent dark:hover:shadow-gray-700"
+ className="flex h-[27rem] w-full max-w-md cursor-pointer flex-col items-start rounded-3xl bg-white transition-all duration-300 hover:shadow-lg dark:bg-transparent dark:hover:shadow-gray-700"
onClick={handleClick}
data-testid="store-card"
role="button"
@@ -44,8 +44,8 @@ export const StoreCard: React.FC<StoreCardProps> = ({
}
}}
>
- {/* Header Image Section with Avatar */}
- <div className="relative h-[200px] w-full overflow-hidden rounded-[20px]">
+ {/* First Section: Image with Avatar */}
+ <div className="relative aspect-[2/1.2] w-full overflow-hidden rounded-3xl md:aspect-[2.17/1]">
{agentImage && (
<Image
src={agentImage}
@@ -72,37 +72,46 @@ export const StoreCard: React.FC<StoreCardProps> = ({
)}
</div>
- {/* Content Section */}
- <div className="w-full px-2 py-4">
- {/* Title and Creator */}
- <h3 className="mb-0.5 font-poppins text-2xl font-semibold text-[#272727] dark:text-neutral-100">
- {agentName}
- </h3>
- {!hideAvatar && creatorName && (
- <p className="mb-2.5 font-sans text-xl font-normal text-neutral-600 dark:text-neutral-400">
- by {creatorName}
+ <div className="mt-3 flex w-full flex-1 flex-col px-4">
+ {/* Second Section: Agent Name and Creator Name */}
+ <div className="flex w-full flex-col">
+ <h3 className="line-clamp-2 font-poppins text-2xl font-semibold text-[#272727] dark:text-neutral-100">
+ {agentName}
+ </h3>
+ {!hideAvatar && creatorName && (
+ <p className="mt-3 truncate font-sans text-xl font-normal text-neutral-600 dark:text-neutral-400">
+ by {creatorName}
+ </p>
+ )}
+ </div>
+
+ {/* Third Section: Description */}
+ <div className="mt-2.5 flex w-full flex-col">
+ <p className="line-clamp-3 font-sans text-base font-normal leading-normal text-neutral-600 dark:text-neutral-400">
+ {description}
</p>
- )}
- {/* Description */}
- <p className="mb-4 font-sans text-base font-normal leading-normal text-neutral-600 dark:text-neutral-400">
- {description}
- </p>
+ </div>
- {/* Stats Row */}
- <div className="flex items-center justify-between">
- <div className="font-sans text-lg font-semibold text-neutral-800 dark:text-neutral-200">
- {runs.toLocaleString()} runs
- </div>
- <div className="flex items-center gap-2">
- <span className="font-geist text-lg font-semibold text-neutral-800 dark:text-neutral-200">
- {rating.toFixed(1)}
- </span>
- <div
- className="inline-flex items-center"
- role="img"
- aria-label={`Rating: ${rating.toFixed(1)} out of 5 stars`}
- >
- {StarRatingIcons(rating)}
+ <div className="flex-grow" />
+ {/* Spacer to push stats to bottom */}
+
+ {/* Fourth Section: Stats Row - aligned to bottom */}
+ <div className="mt-5 w-full">
+ <div className="flex items-center justify-between">
+ <div className="font-sans text-lg font-semibold text-neutral-800 dark:text-neutral-200">
+ {runs.toLocaleString()} runs
+ </div>
+ <div className="flex items-center gap-2">
+ <span className="font-sans text-lg font-semibold text-neutral-800 dark:text-neutral-200">
+ {rating.toFixed(1)}
+ </span>
+ <div
+ className="inline-flex items-center"
+ role="img"
+ aria-label={`Rating: ${rating.toFixed(1)} out of 5 stars`}
+ >
+ {StarRatingIcons(rating)}
+ </div>
</div>
</div>
</div>
diff --git a/autogpt_platform/frontend/src/components/agptui/composite/AgentsSection.tsx b/autogpt_platform/frontend/src/components/agptui/composite/AgentsSection.tsx
index bd67e5b17a..b4b5da8838 100644
--- a/autogpt_platform/frontend/src/components/agptui/composite/AgentsSection.tsx
+++ b/autogpt_platform/frontend/src/components/agptui/composite/AgentsSection.tsx
@@ -81,7 +81,7 @@ export const AgentsSection: React.FC<AgentsSectionProps> = ({
</CarouselContent>
</Carousel>
- <div className="hidden grid-cols-1 place-items-center gap-6 md:grid md:grid-cols-2 lg:grid-cols-4">
+ <div className="hidden grid-cols-1 place-items-center gap-6 md:grid md:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4">
{displayedAgents.map((agent, index) => (
<StoreCard
key={index}
diff --git a/autogpt_platform/frontend/src/components/agptui/composite/FeaturedSection.tsx b/autogpt_platform/frontend/src/components/agptui/composite/FeaturedSection.tsx
index 92d10d5164..5b930238e9 100644
--- a/autogpt_platform/frontend/src/components/agptui/composite/FeaturedSection.tsx
+++ b/autogpt_platform/frontend/src/components/agptui/composite/FeaturedSection.tsx
@@ -46,8 +46,8 @@ export const FeaturedSection: React.FC<FeaturedSectionProps> = ({
};
return (
- <section className="mx-auto w-full max-w-7xl px-4 pb-16">
- <h2 className="mb-8 text-left font-poppins text-[18px] font-[600] leading-9 text-neutral-800 dark:text-neutral-200">
+ <section className="w-full pb-16">
+ <h2 className="mb-8 font-poppins text-2xl font-semibold leading-7 text-neutral-800 dark:text-neutral-200">
Featured agents
</h2>