Skip to content

fix: actually sort layouts by collection order#3526

Merged
tefkah merged 2 commits intomainfrom
tfk/fix-sort
Mar 9, 2026
Merged

fix: actually sort layouts by collection order#3526
tefkah merged 2 commits intomainfrom
tfk/fix-sort

Conversation

@tefkah
Copy link
Member

@tefkah tefkah commented Mar 9, 2026

Issue(s) Resolved

Pages with more than one pub block, with pubs sorted by collection order, were not actually sorted by collection order.

That's bc the code was somehow assuming (who could it have been 🤔) that CollectionPub.rank was a stringified float, when it was ofc a mudder rank like "aa".

Using localeCompare instead fixed it.

Test Plan

Just send it and see if https://oecs.mit.edu/open-encyclopedia-of-cognitive-science is sorted alphabetically now

Screenshots (if applicable)

Optional

Notes/Context/Gotchas

Supporting Docs

@tefkah tefkah requested a review from isTravis March 9, 2026 17:23
@tefkah tefkah merged commit a844b23 into main Mar 9, 2026
1 check passed
@tefkah tefkah deleted the tfk/fix-sort branch March 9, 2026 18:22
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.

2 participants