Sort theme catalog items alphabetically by name (#7144)

* [AI] Sort custom theme catalog options alphabetically in the UI

Sort catalog themes by name using localeCompare before rendering,
without modifying the underlying JSON data file.

https://claude.ai/code/session_01Y5SGaVYqsVWVsvXV8ZFXj3

* Add release notes for PR #7144

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Matiss Janis Aboltins
2026-03-06 23:01:07 +00:00
committed by GitHub
parent fdf5c8d0a9
commit 7e0edd43ec
2 changed files with 9 additions and 1 deletions

View File

@@ -246,7 +246,9 @@ export function ThemeInstaller({
return null;
}
const catalogItems = catalog ?? [];
const catalogItems = [...(catalog ?? [])].sort((a, b) =>
a.name.localeCompare(b.name),
);
const itemsPerRow = getItemsPerRow(width);
const rows: CatalogTheme[][] = [];
for (let i = 0; i < catalogItems.length; i += itemsPerRow) {

View File

@@ -0,0 +1,6 @@
---
category: Enhancements
authors: [MatissJanis]
---
Sort theme catalog items alphabetically by name for improved user interface organization.