« get me outta code hell

content: gAIPChunk: items slot -> list - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2025-11-04 09:20:50 -0400
committer(quasar) nebula <qznebula@protonmail.com>2025-11-04 09:21:54 -0400
commite2d8c60381d6c712de3a7bdacd8d9fcb8b570897 (patch)
tree5fcb7251eff00fb391ab5aed6652ebaa4edd8724
parentfe0c825e5b969e7869549aaebc5f96b29697f77a (diff)
content: gAIPChunk: items slot -> list
-rw-r--r--src/content/dependencies/generateArtistInfoPageArtworksChunk.js9
-rw-r--r--src/content/dependencies/generateArtistInfoPageChunk.js7
-rw-r--r--src/content/dependencies/generateArtistInfoPageCommentaryChunkedList.js87
-rw-r--r--src/content/dependencies/generateArtistInfoPageFlashesChunk.js6
-rw-r--r--src/content/dependencies/generateArtistInfoPageTracksChunk.js5
5 files changed, 60 insertions, 54 deletions
diff --git a/src/content/dependencies/generateArtistInfoPageArtworksChunk.js b/src/content/dependencies/generateArtistInfoPageArtworksChunk.js
index f4c9439a..a7bbcc27 100644
--- a/src/content/dependencies/generateArtistInfoPageArtworksChunk.js
+++ b/src/content/dependencies/generateArtistInfoPageArtworksChunk.js
@@ -25,7 +25,7 @@ export default {
     },
   },
 
-  generate: (data, relations, slots) =>
+  generate: (data, relations, slots, {html}) =>
     relations.template.slots({
       mode: 'album',
       albumLink: relations.albumLink,
@@ -35,8 +35,9 @@ export default {
           ? Array.from({length: data.dates}, () => null)
           : data.dates),
 
-      items:
-        relations.items.map(item =>
-          item.slot('filterEditsForWiki', slots.filterEditsForWiki)),
+      list:
+        html.tag('ul',
+          relations.items.map(item =>
+            item.slot('filterEditsForWiki', slots.filterEditsForWiki))),
     }),
 };
diff --git a/src/content/dependencies/generateArtistInfoPageChunk.js b/src/content/dependencies/generateArtistInfoPageChunk.js
index 80429912..7fa0cfb5 100644
--- a/src/content/dependencies/generateArtistInfoPageChunk.js
+++ b/src/content/dependencies/generateArtistInfoPageChunk.js
@@ -18,7 +18,7 @@ export default {
       mutable: false,
     },
 
-    items: {
+    list: {
       type: 'html',
       mutable: false,
     },
@@ -103,10 +103,7 @@ export default {
         slots.id && {id: slots.id},
         accentedLink),
 
-      html.tag('dd',
-        html.tag('ul',
-          {class: 'offset-tooltips'},
-          slots.items)),
+      html.tag('dd', slots.list),
     ]);
   },
 };
diff --git a/src/content/dependencies/generateArtistInfoPageCommentaryChunkedList.js b/src/content/dependencies/generateArtistInfoPageCommentaryChunkedList.js
index caec58d6..a92f41a6 100644
--- a/src/content/dependencies/generateArtistInfoPageCommentaryChunkedList.js
+++ b/src/content/dependencies/generateArtistInfoPageCommentaryChunkedList.js
@@ -221,51 +221,56 @@ export default {
               ? chunk.slots({
                   mode: 'album',
                   albumLink: chunkLink,
-                  items:
-                    stitchArrays({
-                      item: items,
-                      link: itemLinks,
-                      annotation: itemAnnotations,
-                      type: itemTypes,
-                    }).map(({item, link, annotation, type}) =>
-                      item.slots({
-                        annotation:
-                          annotation.slots({
-                            mode: 'inline',
-                            absorbPunctuationFollowingExternalLinks: false,
-                          }),
-
-                        content:
-                          (type === 'album'
-                            ? html.tag('i',
-                                language.$(capsule, 'album.commentary'))
-                            : language.$(capsule, 'track', {track: link})),
-                      })),
+
+                  list:
+                    html.tag('ul',
+                      stitchArrays({
+                        item: items,
+                        link: itemLinks,
+                        annotation: itemAnnotations,
+                        type: itemTypes,
+                      }).map(({item, link, annotation, type}) =>
+                        item.slots({
+                          annotation:
+                            annotation.slots({
+                              mode: 'inline',
+                              absorbPunctuationFollowingExternalLinks: false,
+                            }),
+
+                          content:
+                            (type === 'album'
+                              ? html.tag('i',
+                                  language.$(capsule, 'album.commentary'))
+                              : language.$(capsule, 'track', {track: link})),
+                        }))),
                 })
-           : chunkType === 'flash-act'
+
+             : chunkType === 'flash-act'
               ? chunk.slots({
                   mode: 'flash',
                   flashActLink: chunkLink,
-                  items:
-                    stitchArrays({
-                      item: items,
-                      link: itemLinks,
-                      annotation: itemAnnotations,
-                    }).map(({item, link, annotation}) =>
-                      item.slots({
-                        annotation:
-                          (annotation
-                            ? annotation.slots({
-                                mode: 'inline',
-                                absorbPunctuationFollowingExternalLinks: false,
-                              })
-                            : null),
-
-                        content:
-                          language.$(capsule, 'flash', {
-                            flash: link,
-                          }),
-                      })),
+
+                  list:
+                    html.tag('ul',
+                      stitchArrays({
+                        item: items,
+                        link: itemLinks,
+                        annotation: itemAnnotations,
+                      }).map(({item, link, annotation}) =>
+                        item.slots({
+                          annotation:
+                            (annotation
+                              ? annotation.slots({
+                                  mode: 'inline',
+                                  absorbPunctuationFollowingExternalLinks: false,
+                                })
+                              : null),
+
+                          content:
+                            language.$(capsule, 'flash', {
+                              flash: link,
+                            }),
+                        }))),
                 })
               : null)))),
 };
diff --git a/src/content/dependencies/generateArtistInfoPageFlashesChunk.js b/src/content/dependencies/generateArtistInfoPageFlashesChunk.js
index acdb9897..c44c151c 100644
--- a/src/content/dependencies/generateArtistInfoPageFlashesChunk.js
+++ b/src/content/dependencies/generateArtistInfoPageFlashesChunk.js
@@ -18,11 +18,13 @@ export default {
         .map(contrib => contrib.date),
   }),
 
-  generate: (data, relations) =>
+  generate: (data, relations, {html}) =>
     relations.template.slots({
       mode: 'flash',
       flashActLink: relations.flashActLink,
       dates: data.dates,
-      items: relations.items,
+
+      list:
+        html.tag('ul', relations.items),
     }),
 };
diff --git a/src/content/dependencies/generateArtistInfoPageTracksChunk.js b/src/content/dependencies/generateArtistInfoPageTracksChunk.js
index 3e4cc4e9..2d932cbb 100644
--- a/src/content/dependencies/generateArtistInfoPageTracksChunk.js
+++ b/src/content/dependencies/generateArtistInfoPageTracksChunk.js
@@ -46,7 +46,7 @@ export default {
     return data;
   },
 
-  generate: (data, relations) =>
+  generate: (data, relations, {html}) =>
     relations.template.slots({
       mode: 'album',
 
@@ -56,6 +56,7 @@ export default {
       duration: data.duration,
       durationApproximate: data.durationApproximate,
 
-      items: relations.items,
+      list:
+        html.tag('ul', relations.items),
     }),
 };