fix: order skills before plugins on homepage (#3316)

This commit is contained in:
Patrick Erichsen
2026-07-30 11:12:41 -07:00
committed by GitHub
parent 70ce492fd9
commit 0a2b1a26af
3 changed files with 18 additions and 11 deletions
@@ -83,6 +83,13 @@ describe("HomeListingSection", () => {
const second = makeTrending("second", "Second Skill", 3, 8000);
render(<HomeListingSection initialListing={initialTrending([first, second])} />);
const contentTypeButtons = screen
.getByRole("group", { name: "Content type" })
.querySelectorAll("button");
expect(Array.from(contentTypeButtons, (button) => button.textContent)).toEqual([
"Skills",
"Plugins",
]);
expect(screen.getByRole("button", { name: "Skills" }).getAttribute("aria-pressed")).toBe(
"true",
);
+1 -1
View File
@@ -144,8 +144,8 @@ describe("HomeListingSection", () => {
.getByRole("group", { name: "Content type" })
.querySelectorAll("button");
expect(Array.from(contentTypeButtons, (button) => button.textContent)).toEqual([
"Plugins",
"Skills",
"Plugins",
]);
expect(screen.getByRole("button", { name: "Plugins" }).getAttribute("aria-pressed")).toBe(
"true",
+10 -10
View File
@@ -793,16 +793,6 @@ export function HomeListingSection({ initialListing = null }: HomeListingSection
role="group"
aria-label="Content type"
>
<button
type="button"
className={`home-v2-listing-kind-btn clawhub-segmented-btn oc-segmented-item${
kind === "plugins" ? " is-active" : ""
}`}
aria-pressed={kind === "plugins"}
onClick={() => handleKindChange("plugins")}
>
Plugins
</button>
<button
type="button"
className={`home-v2-listing-kind-btn clawhub-segmented-btn oc-segmented-item${
@@ -813,6 +803,16 @@ export function HomeListingSection({ initialListing = null }: HomeListingSection
>
Skills
</button>
<button
type="button"
className={`home-v2-listing-kind-btn clawhub-segmented-btn oc-segmented-item${
kind === "plugins" ? " is-active" : ""
}`}
aria-pressed={kind === "plugins"}
onClick={() => handleKindChange("plugins")}
>
Plugins
</button>
</div>
<span className="home-v2-listing-divider" aria-hidden="true" />