« get me outta code hell

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:
Diffstat (limited to 'src/data/things/homepage-layout.js')
-rw-r--r--src/data/things/homepage-layout.js23
1 files changed, 5 insertions, 18 deletions
diff --git a/src/data/things/homepage-layout.js b/src/data/things/homepage-layout.js
index 00d6aef5..47d92471 100644
--- a/src/data/things/homepage-layout.js
+++ b/src/data/things/homepage-layout.js
@@ -1,7 +1,6 @@
 export const HOMEPAGE_LAYOUT_DATA_FILE = 'homepage.yaml';
 
 import {input} from '#composite';
-import find from '#find';
 import Thing from '#thing';
 
 import {
@@ -17,7 +16,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 {
@@ -55,7 +54,7 @@ export class HomepageLayout extends Thing {
 export class HomepageLayoutRow extends Thing {
   static [Thing.friendlyName] = `Homepage Row`;
 
-  static [Thing.getPropertyDescriptors] = ({Album, Group}) => ({
+  static [Thing.getPropertyDescriptors] = () => ({
     // Update & expose
 
     name: name('Unnamed Homepage Row'),
@@ -74,17 +73,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 +140,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 +148,7 @@ export class HomepageLayoutAlbumsRow extends HomepageLayoutRow {
 
     sourceAlbums: referenceList({
       class: input.value(Album),
-      find: input.value(find.album),
-      data: 'albumData',
+      find: soupyFind.input('album'),
     }),
 
     countAlbumsFromGroup: {