From 4aca33098a53d29082e1e121d841d5eb6fb07126 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Mon, 29 Jan 2024 08:27:40 -0400 Subject: data: pre-sort artists, mark group non-sorting --- src/data/things/artist.js | 6 ++++++ src/data/things/group.js | 4 ++++ 2 files changed, 10 insertions(+) (limited to 'src/data') diff --git a/src/data/things/artist.js b/src/data/things/artist.js index 8f32afd7..a3766f00 100644 --- a/src/data/things/artist.js +++ b/src/data/things/artist.js @@ -5,6 +5,7 @@ import find from '#find'; import {unique} from '#sugar'; import Thing from '#thing'; import {isName, validateArrayItems} from '#validators'; +import {sortAlphabetically} from '#wiki-data'; import {withReverseContributionList} from '#composite/wiki-data'; @@ -287,5 +288,10 @@ export class Artist extends Thing { return {artistData, artistAliasData}; }, + + sort({artistData, artistAliasData}) { + sortAlphabetically(artistData); + sortAlphabetically(artistAliasData); + }, }); } diff --git a/src/data/things/group.js b/src/data/things/group.js index a32cd64d..462c928a 100644 --- a/src/data/things/group.js +++ b/src/data/things/group.js @@ -143,6 +143,10 @@ export class Group extends Thing { return {groupData, groupCategoryData}; }, + + // Groups aren't sorted at all, always preserving the order in the data + // file as-is. + sort: null, }); } -- cgit 1.3.0-6-gf8a5