From 76b510c01910c816b354d28a10babc76b8e730f0 Mon Sep 17 00:00:00 2001 From: Gabe Esquivel Gaghi Date: Tue, 12 May 2026 11:03:22 +0200 Subject: [PATCH 1/4] sort locals packages for consistent ordering --- .changeset/all-pandas-hide.md | 5 +++++ .../LocalRepositoryPackagesList.tsx | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/all-pandas-hide.md diff --git a/.changeset/all-pandas-hide.md b/.changeset/all-pandas-hide.md new file mode 100644 index 0000000000..657654830b --- /dev/null +++ b/.changeset/all-pandas-hide.md @@ -0,0 +1,5 @@ +--- +"landscape-ui": patch +--- + +Sort the local repositories packages list so it stays consistent diff --git a/src/features/local-repositories/components/LocalRepositoryPackagesList/LocalRepositoryPackagesList.tsx b/src/features/local-repositories/components/LocalRepositoryPackagesList/LocalRepositoryPackagesList.tsx index 08328ee24f..ec898467c0 100644 --- a/src/features/local-repositories/components/LocalRepositoryPackagesList/LocalRepositoryPackagesList.tsx +++ b/src/features/local-repositories/components/LocalRepositoryPackagesList/LocalRepositoryPackagesList.tsx @@ -16,7 +16,9 @@ const LocalRepositoryPackagesList: FC = ({ const [currentPage, setCurrentPage] = useState(1); const pageSize = 10; - const formattedPackages: LocalPackage[] = packages.map((name) => ({ name })); + const formattedPackages: LocalPackage[] = packages + .map((name) => ({ name })) + .sort((a, b) => a.name.localeCompare(b.name)); const pagedPackages = useMemo( () => formattedPackages.slice( From c6b109d452a9b80c9732a6224a81cf5c3ca8887d Mon Sep 17 00:00:00 2001 From: Gabe Esquivel Gaghi Date: Tue, 12 May 2026 11:03:33 +0200 Subject: [PATCH 2/4] run prettier --- .../components/DonutChart/DonutChart.test.tsx | 54 +++++-------------- .../SavedSearchList/SavedSearchList.tsx | 4 +- .../SearchBoxWithSavedSearches.tsx | 5 +- 3 files changed, 16 insertions(+), 47 deletions(-) diff --git a/src/features/overview/components/DonutChart/DonutChart.test.tsx b/src/features/overview/components/DonutChart/DonutChart.test.tsx index 6028c50c13..bf361e9e3d 100644 --- a/src/features/overview/components/DonutChart/DonutChart.test.tsx +++ b/src/features/overview/components/DonutChart/DonutChart.test.tsx @@ -136,14 +136,8 @@ describe("DonutChart", () => { it("uses light-mode default colors by default", () => { const { container } = renderChart(); const arcs = getArcs(container); - expect(arcs[0]).toHaveAttribute( - "stroke", - colorMap.green.light.default, - ); - expect(arcs[1]).toHaveAttribute( - "stroke", - colorMap.orange.light.default, - ); + expect(arcs[0]).toHaveAttribute("stroke", colorMap.green.light.default); + expect(arcs[1]).toHaveAttribute("stroke", colorMap.orange.light.default); expect(arcs[2]).toHaveAttribute("stroke", colorMap.red.light.default); }); @@ -151,14 +145,8 @@ describe("DonutChart", () => { localStorage.setItem("_landscape_dark_theme", "true"); const { container } = renderChart(); const arcs = getArcs(container); - expect(arcs[0]).toHaveAttribute( - "stroke", - colorMap.green.dark.default, - ); - expect(arcs[2]).toHaveAttribute( - "stroke", - colorMap.red.dark.default, - ); + expect(arcs[0]).toHaveAttribute("stroke", colorMap.green.dark.default); + expect(arcs[2]).toHaveAttribute("stroke", colorMap.red.dark.default); }); it("keeps default colors on every ring when one is hovered (dim via CSS opacity, not palette swap)", async () => { @@ -168,14 +156,8 @@ describe("DonutChart", () => { await user.hover(getRingGroup(0)); const arcs = getArcs(container); - expect(arcs[0]).toHaveAttribute( - "stroke", - colorMap.green.light.default, - ); - expect(arcs[1]).toHaveAttribute( - "stroke", - colorMap.orange.light.default, - ); + expect(arcs[0]).toHaveAttribute("stroke", colorMap.green.light.default); + expect(arcs[1]).toHaveAttribute("stroke", colorMap.orange.light.default); expect(arcs[2]).toHaveAttribute("stroke", colorMap.red.light.default); }); @@ -185,9 +167,7 @@ describe("DonutChart", () => { await user.hover(getRingGroup(0)); - expect(getRingGroup(0).getAttribute("class") ?? "").toMatch( - /ring--active/, - ); + expect(getRingGroup(0).getAttribute("class") ?? "").toMatch(/ring--active/); expect(getRingGroup(0).getAttribute("class") ?? "").not.toMatch( /ring--inactive/, ); @@ -211,9 +191,7 @@ describe("DonutChart", () => { expect(getRingGroup(1).getAttribute("class") ?? "").toMatch( /ring--inactive/, ); - expect(getRingGroup(2).getAttribute("class") ?? "").toMatch( - /ring--active/, - ); + expect(getRingGroup(2).getAttribute("class") ?? "").toMatch(/ring--active/); }); it("resets state when the inner container loses pointer", async () => { @@ -228,7 +206,9 @@ describe("DonutChart", () => { ) as HTMLElement; fireEvent.mouseLeave(inner); - expect(getRingGroup(0).getAttribute("class") ?? "").not.toMatch(/ring--active/); + expect(getRingGroup(0).getAttribute("class") ?? "").not.toMatch( + /ring--active/, + ); }); it("activates a ring on keyboard focus and clears on blur", () => { @@ -291,9 +271,7 @@ describe("DonutChart", () => { ], }); - expect(screen.getByTestId("donut-center-number").textContent).toBe( - "12.3K", - ); + expect(screen.getByTestId("donut-center-number").textContent).toBe("12.3K"); }); it("formats compactly when a large ring is hovered", async () => { @@ -309,9 +287,7 @@ describe("DonutChart", () => { await user.hover(getRingGroup(0)); - expect(screen.getByTestId("donut-center-number").textContent).toBe( - "87.4K", - ); + expect(screen.getByTestId("donut-center-number").textContent).toBe("87.4K"); expect(screen.getByTestId("donut-center-sublabel").textContent).toBe( "of 100K", ); @@ -319,9 +295,7 @@ describe("DonutChart", () => { it("renders a track circle behind each ring with the track class", () => { const { container } = renderChart(); - const tracks = container.querySelectorAll( - `circle[class*='track']`, - ); + const tracks = container.querySelectorAll(`circle[class*='track']`); expect(tracks).toHaveLength(3); }); }); diff --git a/src/features/saved-searches/components/SavedSearchList/SavedSearchList.tsx b/src/features/saved-searches/components/SavedSearchList/SavedSearchList.tsx index ffd496fb0d..6ccc3f91f4 100644 --- a/src/features/saved-searches/components/SavedSearchList/SavedSearchList.tsx +++ b/src/features/saved-searches/components/SavedSearchList/SavedSearchList.tsx @@ -88,9 +88,7 @@ const SavedSearchList: FC = ({