« 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.js29
1 files changed, 16 insertions, 13 deletions
diff --git a/src/data/things/homepage-layout.js b/src/data/things/homepage-layout.js
index 007e0236..677a2756 100644
--- a/src/data/things/homepage-layout.js
+++ b/src/data/things/homepage-layout.js
@@ -109,10 +109,21 @@ export class HomepageLayoutAlbumsRow extends HomepageLayoutRow {
 
     sourceGroup: compositeFrom(`HomepageLayoutAlbumsRow.sourceGroup`, [
       {
-        transform: (value, continuation) =>
-          (value === 'new-releases' || value === 'new-additions'
-            ? value
-            : continuation(value)),
+        flags: {expose: true, update: true, compose: true},
+
+        update: {
+          validate:
+            oneOf(
+              is('new-releases', 'new-additions'),
+              validateReference(Group[Thing.referenceType])),
+        },
+
+        expose: {
+          transform: (value, continuation) =>
+            (value === 'new-releases' || value === 'new-additions'
+              ? value
+              : continuation(value)),
+        },
       },
 
       withResolvedReference({
@@ -121,15 +132,7 @@ export class HomepageLayoutAlbumsRow extends HomepageLayoutRow {
         find: input.value(find.group),
       }),
 
-      exposeDependency({
-        dependency: '#resolvedReference',
-        update: input.value({
-          validate:
-            oneOf(
-              is('new-releases', 'new-additions'),
-              validateReference(Group[Thing.referenceType])),
-        }),
-      }),
+      exposeDependency({dependency: '#resolvedReference'}),
     ]),
 
     sourceAlbums: referenceList({