diff options
7 files changed, 18 insertions, 19 deletions
diff --git a/src/content/dependencies/generateContributionList.js b/src/content/dependencies/generateContributionList.js index 8e8c5020..d1c3de0f 100644 --- a/src/content/dependencies/generateContributionList.js +++ b/src/content/dependencies/generateContributionList.js @@ -20,8 +20,8 @@ export default { .map(contributionLink => html.tag('li', contributionLink.slots({ + showAnnotation: true, showExternalLinks: true, - showContribution: true, showChronology: true, preventWrapping: false, chronologyKind: slots.chronologyKind, diff --git a/src/content/dependencies/generateReleaseInfoContributionsLine.js b/src/content/dependencies/generateReleaseInfoContributionsLine.js index ee817f08..195b94f3 100644 --- a/src/content/dependencies/generateReleaseInfoContributionsLine.js +++ b/src/content/dependencies/generateReleaseInfoContributionsLine.js @@ -34,7 +34,7 @@ export default { }), slots: { - showContribution: {type: 'boolean', default: true}, + showAnnotation: {type: 'boolean', default: true}, showExternalLinks: {type: 'boolean', default: true}, showChronology: {type: 'boolean', default: true}, @@ -47,7 +47,7 @@ export default { language.formatConjunctionList( relations.contributionLinks.map(link => link.slots({ - showContribution: slots.showContribution, + showAnnotation: slots.showAnnotation, showExternalLinks: slots.showExternalLinks, showChronology: slots.showChronology, chronologyKind: slots.chronologyKind, diff --git a/src/content/dependencies/generateReleaseInfoContributionsLineWikiEditsPart.js b/src/content/dependencies/generateReleaseInfoContributionsLineWikiEditsPart.js index 37f29b1c..c5c52fa0 100644 --- a/src/content/dependencies/generateReleaseInfoContributionsLineWikiEditsPart.js +++ b/src/content/dependencies/generateReleaseInfoContributionsLineWikiEditsPart.js @@ -39,9 +39,8 @@ export default { language.$(capsule, 'editsLine', { artist: link.slots({ - showContribution: false, - showExternalLinks: false, - showChronology: false, + showAnnotation: true, + trimAnnotation: true, preventTooltip: true, }), })), diff --git a/src/content/dependencies/linkContribution.js b/src/content/dependencies/linkContribution.js index 67451093..0c5ec8f4 100644 --- a/src/content/dependencies/linkContribution.js +++ b/src/content/dependencies/linkContribution.js @@ -19,12 +19,12 @@ export default { }), data: (contribution) => ({ - contribution: contribution.annotation, + annotation: contribution.annotation, urls: contribution.artist.urls, }), slots: { - showContribution: {type: 'boolean', default: false}, + showAnnotation: {type: 'boolean', default: false}, showExternalLinks: {type: 'boolean', default: false}, showChronology: {type: 'boolean', default: false}, @@ -67,10 +67,10 @@ export default { relations.tooltip, })); - if (slots.showContribution && data.contribution) { + if (slots.showAnnotation && data.annotation) { workingCapsule += '.withContribution'; workingOptions.contrib = - data.contribution; + data.annotation; } return language.formatString(workingCapsule, workingOptions); diff --git a/tap-snapshots/test/snapshot/linkContribution.js.test.cjs b/tap-snapshots/test/snapshot/linkContribution.js.test.cjs index a9ac916e..0c44a85c 100644 --- a/tap-snapshots/test/snapshot/linkContribution.js.test.cjs +++ b/tap-snapshots/test/snapshot/linkContribution.js.test.cjs @@ -73,7 +73,7 @@ exports[`test/snapshot/linkContribution.js > TAP > linkContribution (snapshot) > <span class="external-platform">Other</span></span></span></span> (Arrangement)</span> ` -exports[`test/snapshot/linkContribution.js > TAP > linkContribution (snapshot) > only showContribution 1`] = ` +exports[`test/snapshot/linkContribution.js > TAP > linkContribution (snapshot) > only showAnnotation 1`] = ` <span class="contribution nowrap"><a href="artist/clark-powell/">Clark Powell</a></span> <span class="contribution nowrap"><a href="artist/the-big-baddies/">Grounder & Scratch</a> (Snooping)</span> <span class="contribution nowrap"><a href="artist/toby-fox/">Toby Fox</a> (Arrangement)</span> @@ -98,7 +98,7 @@ exports[`test/snapshot/linkContribution.js > TAP > linkContribution (snapshot) > <span class="external-platform">Other</span></span></span></span></span> ` -exports[`test/snapshot/linkContribution.js > TAP > linkContribution (snapshot) > showContribution & showExternalLinks 1`] = ` +exports[`test/snapshot/linkContribution.js > TAP > linkContribution (snapshot) > showAnnotation & showExternalLinks 1`] = ` <span class="contribution nowrap"><span class="text-with-tooltip"><span class="hoverable"><a class="text-with-tooltip-interaction-cue" href="artist/clark-powell/">Clark Powell</a></span><span class="tooltip contribution-tooltip"><span class="tooltip-content"><a class="external-link" href="https://soundcloud.com/plazmataz"> <span class="external-icon"><svg><use href="static/misc/icons.svg#icon-soundcloud"></use></svg></span> <span class="external-handle">plazmataz</span> diff --git a/test/snapshot/linkContribution.js b/test/snapshot/linkContribution.js index 5844b0b9..47ef1503 100644 --- a/test/snapshot/linkContribution.js +++ b/test/snapshot/linkContribution.js @@ -33,13 +33,13 @@ testContentFunctions(t, 'linkContribution (snapshot)', async (t, evaluate) => { slots, }); - quickSnapshot('showContribution & showExternalLinks', { - showContribution: true, + quickSnapshot('showAnnotation & showExternalLinks', { + showAnnotation: true, showExternalLinks: true, }); - quickSnapshot('only showContribution', { - showContribution: true, + quickSnapshot('only showAnnotation', { + showAnnotation: true, }); quickSnapshot('only showExternalLinks', { @@ -66,7 +66,7 @@ testContentFunctions(t, 'linkContribution (snapshot)', async (t, evaluate) => { }); quickSnapshot('no preventWrapping', { - showContribution: true, + showAnnotation: true, showExternalLinks: true, preventWrapping: false, }); diff --git a/test/unit/content/dependencies/linkContribution.js b/test/unit/content/dependencies/linkContribution.js index e7a29310..3ffd71d2 100644 --- a/test/unit/content/dependencies/linkContribution.js +++ b/test/unit/content/dependencies/linkContribution.js @@ -26,7 +26,7 @@ t.test('generateContributionLinks (unit)', async t => { await testContentFunctions(t, 'generateContributionLinks (unit 1)', async (t, evaluate) => { const slots = { - showContribution: true, + showAnnotation: true, showExternalLinks: true, }; @@ -81,7 +81,7 @@ t.test('generateContributionLinks (unit)', async t => { await testContentFunctions(t, 'generateContributionLinks (unit 2)', async (t, evaluate) => { const slots = { - showContribution: false, + showAnnotation: false, showExternalLinks: false, }; |