From 6efb1212dd643dc98e71e272a1a66f042884edb9 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Fri, 26 May 2023 10:09:16 -0300 Subject: content: sprawl divideTrackListsByGroups ...Instead of tangling it in from generateTrackInfoPage, page/track.js, and top-level page evaluation itself. This is why sprawling is better! --- src/content/dependencies/generateTrackInfoPage.js | 4 ++-- src/content/dependencies/generateTrackInfoPageContent.js | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src/content') diff --git a/src/content/dependencies/generateTrackInfoPage.js b/src/content/dependencies/generateTrackInfoPage.js index 61b2b165..5900b27e 100644 --- a/src/content/dependencies/generateTrackInfoPage.js +++ b/src/content/dependencies/generateTrackInfoPage.js @@ -16,7 +16,7 @@ export default { extraDependencies: ['language'], - relations(relation, track, {topLevelGroups}) { + relations(relation, track) { return { layout: relation('generatePageLayout'), @@ -57,7 +57,7 @@ export default { albumNavLinks: relation('generateAlbumNavLinks', track.album, track), chronologyLinks: relation('generateChronologyLinks'), - content: relation('generateTrackInfoPageContent', track, {topLevelGroups}), + content: relation('generateTrackInfoPageContent', track), sidebar: relation('generateAlbumSidebar', track.album, track), albumStyleRules: relation('generateAlbumStyleRules', track.album), colorStyleRules: relation('generateColorStyleRules', track.color), diff --git a/src/content/dependencies/generateTrackInfoPageContent.js b/src/content/dependencies/generateTrackInfoPageContent.js index ed2662e6..c3a1c051 100644 --- a/src/content/dependencies/generateTrackInfoPageContent.js +++ b/src/content/dependencies/generateTrackInfoPageContent.js @@ -19,11 +19,12 @@ export default { sprawl({wikiInfo}) { return { + divideTrackListsByGroups: wikiInfo.divideTrackListsByGroups, enableFlashesAndGames: wikiInfo.enableFlashesAndGames, }; }, - relations(relation, sprawl, track, {topLevelGroups}) { + relations(relation, sprawl, track) { const {album} = track; const relations = {}; @@ -126,7 +127,7 @@ export default { referencedBy.list = relation('generateTrackListDividedByGroups', track.referencedByTracks, - topLevelGroups); + sprawl.divideTrackListsByGroups); } // Section: Sampled tracks @@ -152,7 +153,7 @@ export default { sampledBy.list = relation('generateTrackListDividedByGroups', track.sampledByTracks, - topLevelGroups); + sprawl.divideTrackListsByGroups); } // Section: Flashes that feature -- cgit 1.3.0-6-gf8a5