« get me outta code hell

data: use soupyFind everywhere - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/things/homepage-layout.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2025-01-11 00:11:37 -0400
committer(quasar) nebula <qznebula@protonmail.com>2025-01-11 00:11:37 -0400
commit9d99dafca9dc4e16b867b707746314040a8d9ba5 (patch)
tree6928b4efcaeac5508d06c74ac3bfeefce0ce4b7d /src/data/things/homepage-layout.js
parent8bbd9ac0b5cf8cc64ccbae7ae16b23f05d93d880 (diff)
data: use soupyFind everywhere
also notes where remaining directly-provided wikiData() props
are used
Diffstat (limited to 'src/data/things/homepage-layout.js')
-rw-r--r--src/data/things/homepage-layout.js20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/data/things/homepage-layout.js b/src/data/things/homepage-layout.js
index 00d6aef5..52be1b11 100644
--- a/src/data/things/homepage-layout.js
+++ b/src/data/things/homepage-layout.js
@@ -17,7 +17,7 @@ import {
 
 import {exposeDependency} from '#composite/control-flow';
 import {withResolvedReference} from '#composite/wiki-data';
-import {color, contentString, name, referenceList, wikiData}
+import {color, contentString, name, referenceList, soupyFind}
   from '#composite/wiki-properties';
 
 export class HomepageLayout extends Thing {
@@ -74,17 +74,7 @@ export class HomepageLayoutRow extends Thing {
 
     // Update only
 
-    // These wiki data arrays aren't necessarily used by every subclass, but
-    // to the convenience of providing these, the superclass accepts all wiki
-    // data arrays depended upon by any subclass.
-
-    albumData: wikiData({
-      class: input.value(Album),
-    }),
-
-    groupData: wikiData({
-      class: input.value(Group),
-    }),
+    find: soupyFind(),
   });
 
   static [Thing.yamlDocumentSpec] = {
@@ -151,8 +141,7 @@ export class HomepageLayoutAlbumsRow extends HomepageLayoutRow {
 
       withResolvedReference({
         ref: input.updateValue(),
-        data: 'groupData',
-        find: input.value(find.group),
+        find: soupyFind.input('group'),
       }),
 
       exposeDependency({dependency: '#resolvedReference'}),
@@ -160,8 +149,7 @@ export class HomepageLayoutAlbumsRow extends HomepageLayoutRow {
 
     sourceAlbums: referenceList({
       class: input.value(Album),
-      find: input.value(find.album),
-      data: 'albumData',
+      find: soupyFind.input('album'),
     }),
 
     countAlbumsFromGroup: {