fix(ui): show stats on trending cards (#3243)

This commit is contained in:
Patrick Erichsen
2026-07-23 12:38:09 -07:00
committed by GitHub
parent fec0f5bd23
commit 9c63ed9b6b
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -498,7 +498,7 @@ describe("HomeListingSection", () => {
slug: "trending-skill",
displayName: "Trending Skill",
summary: "Hot this week.",
stats: { installs: 999 },
stats: { stars: 12, downloads: 340, installs: 999 },
},
ownerHandle: "builder",
},
@@ -534,7 +534,7 @@ describe("HomeListingSection", () => {
expect(convexQueryMock).toHaveBeenCalledWith("skills:listPublicTrendingPage", { limit: 20 });
expect(screen.getByText("Trending Skill")).toBeTruthy();
});
expect(screen.queryByText("Popularity")).toBeNull();
expect(screen.getByLabelText("Popularity").textContent).toBe("12340");
expect(screen.queryByText("999")).toBeNull();
});
+1 -1
View File
@@ -431,7 +431,7 @@ export function HomeListingSection({ initialListing = null }: HomeListingSection
: plugins;
const activeStatus = isSearchMode ? searchStatus : status;
const isEmpty = activeStatus === "idle" && activeItems.length === 0;
const showSkillStats = !(kind === "skills" && tab === "trending" && !isSearchMode);
const showSkillStats = true;
const showListingMore =
activeStatus === "idle" && (activeItems.length > visibleCount || listingHasMore);