Skip to content

fix: align the layout tab template order with the other grids#116

Merged
rimzzlabs merged 1 commit into
mainfrom
fix/template-order-all-grids
Jul 18, 2026
Merged

fix: align the layout tab template order with the other grids#116
rimzzlabs merged 1 commit into
mainfrom
fix/template-order-all-grids

Conversation

@rimzzlabs

Copy link
Copy Markdown
Owner

Three surfaces render a template grid: the browse page, the create dialog, and the editor's Layout tab. The earlier alignment fix (#107) sorted the create dialog to match the browse page's default order but did it with a local copy of the sort, and the Layout tab was missed entirely; it still rendered the catalog's declaration order (Awal, Ketat, Luasa, Tebal, Klasik, Ketik).

The ordering now lives once in the catalog: SORTED_TEMPLATES in src/lib/templates.ts, pre-sorted by the default browse sort. The Layout tab and the create dialog both render it, and the dialog's local sorting is gone. The browse page keeps its user-controlled sort toolbar, whose default already produces the same list, so a fourth surface added tomorrow has one obvious import to reach for.

Testing: read the rendered tile names in order from all three surfaces and confirmed they match exactly (Awal, Ketat, Ketik, Klasik, Luasa, Tebal); the browse page's sort toolbar still re-sorts on demand.

Signed-off-by: Rizki Citra <rimzzlabs@proton.me>
@rimzzlabs
rimzzlabs merged commit 10ef5fc into main Jul 18, 2026
4 checks passed
@rimzzlabs
rimzzlabs deleted the fix/template-order-all-grids branch July 18, 2026 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant