Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chronology tooltip #523

Merged
merged 29 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ab99bc5
data: drop "More list utilities", organize data index au Scratch
towerofnix Jun 17, 2024
4a5212a
data: withIndexInList, withNearbyItemFromList
towerofnix Jun 18, 2024
2b10259
data: Contribution.artistProperty
towerofnix Jun 18, 2024
8f70f3f
data: set artistProperty on forwards contribution lists
towerofnix Jun 18, 2024
1c81eed
data: withContributionArtist: depend on 'artist' prop by default
towerofnix Jun 18, 2024
3a0701f
data: withContainingReverseContributionList
towerofnix Jun 18, 2024
d2422a1
data: Contribution.{previous,next}BySameArtist
towerofnix Jun 18, 2024
4a4fe9e
content: linkAnythingMan
towerofnix Jun 18, 2024
319963e
content: linkContribution: refactor for multipart tooltip content
towerofnix Jun 18, 2024
2e44819
content, css: linkContribution: 'showChronology' basic impl.
towerofnix Jun 18, 2024
f721133
content: show chronology links in artist tooltips
towerofnix Jun 18, 2024
6ab709f
content: generateExternalIcon, extract from linkExternalAsIcon
towerofnix Jun 18, 2024
78b5929
content: generateExternal{Handle,Platform}
towerofnix Jun 18, 2024
89b967e
content: generateTooltip: blank if no content
towerofnix Jun 18, 2024
65690d6
content: generateContributionTooltip, etc
towerofnix Jun 18, 2024
2fb7462
content, css: generateContributionTooltip: dynamic divider line
towerofnix Jun 18, 2024
0f6eea2
content: gCTExternalLinkSection: inline linkExternalAsIcon behavior
towerofnix Jun 18, 2024
868ec75
content, css: general tooltip/icon css cleanup
towerofnix Jun 18, 2024
d955997
test: update linkContribution (snapshot, unit)
towerofnix Jun 18, 2024
e31330a
css: external links subgrid
towerofnix Jun 18, 2024
6f96994
content, css: chronology links subgrid
towerofnix Jun 18, 2024
f9ff3fb
content, css: chronology link info
towerofnix Jun 18, 2024
4f248d1
content: chronology labels in release info lines
towerofnix Jun 18, 2024
0495e21
content: chronology labels in contribution lists
towerofnix Jun 18, 2024
7020b8b
css: limit handle/thing tooltip width, overflow ellipsis
towerofnix Jun 18, 2024
a4626ee
css: fix surprise wrapping in contribution list tooltips
towerofnix Jun 18, 2024
a337c55
content: remove old chronology links
towerofnix Jun 18, 2024
c1e2465
content: linkContribution: manually check for blank tooltip
towerofnix Jun 18, 2024
2205ccb
test: update contribution tests (snapshot)
towerofnix Jun 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 0 additions & 53 deletions src/content/dependencies/generateAlbumChronologyLinks.js

This file was deleted.

7 changes: 0 additions & 7 deletions src/content/dependencies/generateAlbumInfoPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export default {
'generateAlbumSocialEmbed',
'generateAlbumStyleRules',
'generateAlbumTrackList',
'generateAlbumChronologyLinks',
'generateCommentarySection',
'generateContentHeading',
'generatePageLayout',
Expand All @@ -33,9 +32,6 @@ export default {
albumNavAccent:
relation('generateAlbumNavAccent', album, null),

chronologyLinks:
relation('generateAlbumChronologyLinks', album),

secondaryNav:
relation('generateAlbumSecondaryNav', album),

Expand Down Expand Up @@ -196,9 +192,6 @@ export default {
},
],

navContent:
relations.chronologyLinks,

banner: relations.banner ?? null,
bannerPosition: 'top',

Expand Down
24 changes: 16 additions & 8 deletions src/content/dependencies/generateAlbumReleaseInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,25 @@ export default {
{[html.joinChildren]: html.tag('br')},

[
relations.artistContributionsLine
.slots({stringKey: capsule + '.by'}),
relations.artistContributionsLine.slots({
stringKey: capsule + '.by',
chronologyKind: 'album',
}),

relations.coverArtistContributionsLine
.slots({stringKey: capsule + '.coverArtBy'}),
relations.coverArtistContributionsLine.slots({
stringKey: capsule + '.coverArtBy',
chronologyKind: 'coverArt',
}),

relations.wallpaperArtistContributionsLine
.slots({stringKey: capsule + '.wallpaperArtBy'}),
relations.wallpaperArtistContributionsLine.slots({
stringKey: capsule + '.wallpaperArtBy',
chronologyKind: 'wallpaperArt',
}),

relations.bannerArtistContributionsLine
.slots({stringKey: capsule + '.bannerArtBy'}),
relations.bannerArtistContributionsLine.slots({
stringKey: capsule + '.bannerArtBy',
chronologyKind: 'bannerArt',
}),

language.$(capsule, 'released', {
[language.onlyIfOptions]: ['date'],
Expand Down
112 changes: 0 additions & 112 deletions src/content/dependencies/generateChronologyLinks.js

This file was deleted.

68 changes: 0 additions & 68 deletions src/content/dependencies/generateChronologyLinksScopeSwitcher.js

This file was deleted.

11 changes: 8 additions & 3 deletions src/content/dependencies/generateContributionList.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,22 @@ export default {
.map(contrib => relation('linkContribution', contrib)),
}),

generate: (relations, {html}) =>
slots: {
chronologyKind: {type: 'string'},
},

generate: (relations, slots, {html}) =>
html.tag('ul',
{[html.onlyIfContent]: true},

relations.contributionLinks
.map(contributionLink =>
html.tag('li',
contributionLink.slots({
showIcons: true,
showExternalLinks: true,
showContribution: true,
showChronology: true,
preventWrapping: false,
iconMode: 'tooltip',
chronologyKind: slots.chronologyKind,
})))),
};
48 changes: 48 additions & 0 deletions src/content/dependencies/generateContributionTooltip.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
export default {
contentDependencies: [
'generateContributionTooltipChronologySection',
'generateContributionTooltipExternalLinkSection',
'generateTooltip',
],

extraDependencies: ['html'],

relations: (relation, contribution) => ({
tooltip:
relation('generateTooltip'),

externalLinkSection:
relation('generateContributionTooltipExternalLinkSection', contribution),

chronologySection:
relation('generateContributionTooltipChronologySection', contribution),
}),

slots: {
showExternalLinks: {type: 'boolean'},
showChronology: {type: 'boolean'},

chronologyKind: {type: 'string'},
},

generate: (relations, slots, {html}) =>
relations.tooltip.slots({
attributes:
{class: 'contribution-tooltip'},

contentAttributes: {
[html.joinChildren]:
html.tag('span', {class: 'tooltip-divider'}),
},

content: [
slots.showExternalLinks &&
relations.externalLinkSection,

slots.showChronology &&
relations.chronologySection.slots({
kind: slots.chronologyKind,
}),
],
}),
};
Loading