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

Scoped listings #424

Draft
wants to merge 95 commits into
base: preview
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
b26a9c0
url-spec: STATIC_VERSION 3p1
towerofnix Jun 12, 2024
919fb16
data, test: withPropertyFromObject: 'internal' input
towerofnix Mar 4, 2024
db054be
data: transparent basic Contribution objects
towerofnix Mar 4, 2024
ef84fb8
data: contribution: thingProperty
towerofnix Mar 5, 2024
be402bf
data: contribution: context
towerofnix Mar 5, 2024
5826cb1
data: WikiInfo: contributionPresets
towerofnix Mar 5, 2024
6a33ef6
data: contribution: matchingPresets
towerofnix Mar 5, 2024
61a666d
data: contribution: countIn{Contribution,Duration}Totals
towerofnix Mar 5, 2024
d5e79dc
data: inheritFromContributionPresets: logic cleanup
towerofnix Mar 6, 2024
06303dc
cacheable-object: clone, copyUpdateValuesOnto
towerofnix Mar 6, 2024
323c8df
data: withRecontextualizedContributionList
towerofnix Mar 6, 2024
34f6afb
data: inheritContributionListFromOriginalRelease
towerofnix Mar 6, 2024
53155b2
data: exposeWhetherDependencyAvailable
towerofnix Mar 6, 2024
dc57720
data: Track.isOriginalRelease, Track.isRerelease
towerofnix Mar 6, 2024
0630bef
data: withContributionListSums, withSum
towerofnix Mar 6, 2024
4dd54f8
data: withReverseContributionList: mode: contributions
towerofnix Mar 6, 2024
878e09f
data: Artist.totalDuration
towerofnix Mar 6, 2024
3d51b9e
content: gAIPTracksChunkedList: stub separate-components refactor
towerofnix Mar 6, 2024
0e85744
data: track: withDate
towerofnix Mar 7, 2024
89e73c1
data: withClonedThings
towerofnix Mar 7, 2024
cfba7bd
data: track: withTrackArtDate
towerofnix Mar 7, 2024
cd27679
data: withCoverArtDate
towerofnix Mar 7, 2024
72f5aaf
data: Contribution.date (stub)
towerofnix Mar 7, 2024
55df0a7
data: apply contribution dates when resolving
towerofnix Mar 7, 2024
2ecbfea
data: redate inherited contribution lists
towerofnix Mar 7, 2024
3394478
data: withContributionContext: guard missing dependencies
towerofnix Mar 7, 2024
e98ddce
data: Artist.artistContributions, Artist.contributorContributions
towerofnix Mar 7, 2024
0514493
sort: sortContributionsChronologically
towerofnix Mar 7, 2024
1cf56b3
content: gAIPTracks{ChunkedList,Chunk,ChunkItem}: data refactor
towerofnix Mar 7, 2024
7318aa7
data: withCoverArtDate refactor, make Album.coverArtDate updatable
towerofnix Mar 7, 2024
7191722
data: artist: fix contributorContributions getting artist contribs
towerofnix Apr 10, 2024
5d5d476
sort: sortContributionsChronologically: fix non-mutating
towerofnix Apr 10, 2024
bba5ac5
data: Track.contributionContribs: use computed date
towerofnix Apr 10, 2024
d16f20a
wiki-data: is{Artist,Contributor,CoverArtist}Contribution
towerofnix Apr 10, 2024
ad671f2
content: gAIPTracksChunkItem: fix nonsense .kind accesses
towerofnix Apr 10, 2024
1fd4db3
data: Contribution.associatedContributions
towerofnix Apr 10, 2024
69fca8d
content: gAIPOtherArtistLinks: use associatedContributions
towerofnix Apr 10, 2024
0eeb86e
content: gAIPChunk: consolidate date processing
towerofnix Apr 10, 2024
36d72d8
data, content: various property & thing-type matches
towerofnix Apr 10, 2024
1ddf40e
data: artist: scope contribution properties to thing kind
towerofnix Apr 10, 2024
9f94010
data: artist: more contribution-y properties
towerofnix Apr 10, 2024
645c1ac
content: gAIPArtworksChunkedList: general refactor a la tracks
towerofnix Apr 10, 2024
82c2cab
content: listArtistsByDuration: use Artist.totalDurations
towerofnix Apr 26, 2024
42a0633
content: gAIPFlashesChunkedList: general refactor a la tracks
towerofnix Jun 1, 2024
69479b5
data: withContributionListSums: drop debug message
towerofnix Jun 1, 2024
5f16db8
content, page, util: general contributions usage cleanup
towerofnix Jun 2, 2024
f657465
data: artist: drop {tracks,albums}as{Artist,Contributor,..etc..}
towerofnix Jun 2, 2024
1ade183
data: withReverseContributionList: drop 'mode' option
towerofnix Jun 2, 2024
0757103
data: withReverse{Reference,Contribution}List: factor commonality
towerofnix Jun 3, 2024
c850fb7
content: generateTrackInfoPage: clone one content heading
towerofnix Jun 12, 2024
af6f7dc
content: generateTrackInfoPageOtherReleasesList
towerofnix Jun 12, 2024
da2dbfd
html: isBlank: handle onlyIfSIblings template content
towerofnix Jun 12, 2024
d6ff52b
html: #stringifyContent: always resolve template items
towerofnix Jun 12, 2024
e1548a2
content: generateContentHeading: always onlyIfSiblings
towerofnix Jun 12, 2024
2fd2c62
content: generateTrackList: blank if no tracks
towerofnix Jun 12, 2024
606fae0
content: generateTrackInfoPage: simpler forward ref list layout
towerofnix Jun 12, 2024
1c993c4
content: generateAdditionalFilesList: blank if no entries
towerofnix Jun 12, 2024
6f18e22
content: generateTrackInfoPage: simpler additional files layout
towerofnix Jun 12, 2024
2be0b6f
content: generateTrackListDividedByGroups: blank if no tracks
towerofnix Jun 12, 2024
0141756
content: generateTrackInfoPage: simpler reverse ref list layout
towerofnix Jun 12, 2024
0902c43
content: generateContributionList: blank if no contributions
towerofnix Jun 12, 2024
cb8ae05
content: generateTrackInfoPage: simpler contributor list layout
towerofnix Jun 12, 2024
261ee0f
content: generateTrackInfoPageFeaturedByFlashesList
towerofnix Jun 12, 2024
29cfb4b
content: generateCommentarySection: blank if no entries
towerofnix Jun 12, 2024
dd3052d
content: transformContent: blank if no content
towerofnix Jun 12, 2024
f2df9fb
content: generateTrackInfoPage: simpler commentary/lyrics layout
towerofnix Jun 12, 2024
7dba186
content: generateTrackInfoPageOtherReleasesList: blank if empty
towerofnix Jun 12, 2024
31429e4
content: generateTrackInfoPage: content function syntax cleanup
towerofnix Jun 12, 2024
a726037
content: generateAlbumChronologyLinks
towerofnix Jun 12, 2024
33c0aa9
content: generateAlbumInfoPage: content function syntax cleanup
towerofnix Jun 12, 2024
1df42ce
content: generateFlashInfoPage: content function syntax cleanup
towerofnix Jun 12, 2024
842c766
content: generateGroupInfoPage: content function syntax cleanup
towerofnix Jun 12, 2024
0e2535a
content: gAIPChunkedList: blank if slots are blank
towerofnix Jun 12, 2024
456dd2c
content: gAIPFlashesChunkedList: blank if flashes disabled
towerofnix Jun 12, 2024
eb1bae1
content: generateArtistInfoPage: content function syntax cleanup
towerofnix Jun 12, 2024
9c2b7f0
content: linkStationaryIndex: make stringsKey arg optional
towerofnix Feb 22, 2024
3f145f8
content, data, page: stub basic listing scopes implementation
towerofnix Feb 22, 2024
bbcda2e
data, content: basic Listing data object infrastructure
towerofnix Feb 22, 2024
72a37e5
content: generateArtistNavLinks: remove Listings nav link
towerofnix Feb 23, 2024
0f75085
data: getCamelCase
towerofnix Feb 23, 2024
3dbd67e
content, data: support dashes in listing targets
towerofnix Feb 23, 2024
ca91b38
port over rest of listings to basic listing-spec structure
towerofnix Feb 23, 2024
33b3e68
data: extract some logic into Thing.computePropertyDescriptors
towerofnix Feb 23, 2024
0aa9f9c
listings: basic listing data processing implementation
towerofnix Feb 23, 2024
8deca1e
data: listing eslint miscellany
towerofnix Feb 23, 2024
4d6113f
listings, upd8: link wiki data arrays in listings hackily
towerofnix Feb 23, 2024
f040c52
listings: port Albums - by Date as demo
towerofnix Feb 23, 2024
53ed0a0
data, content: make links to listings work again
towerofnix Feb 23, 2024
d9c15c5
listings: port albums/by-{duration,name,tracks}
towerofnix Feb 24, 2024
35a65df
data: withThingsSortedChronologically
towerofnix Feb 26, 2024
6b0e0d3
data: withAligned{Indices,List}, withIndicesFromList
towerofnix Jun 4, 2024
0431bb1
data: withThingsSortedChronologically: use new list utilities
towerofnix Jun 4, 2024
0c84f99
listings: albums/by-date: use withThingsSortedChronologically
towerofnix Jun 4, 2024
2d61793
WIP
towerofnix Jun 7, 2024
f157403
listings: albums/by-date: filter out dateless albums
towerofnix Jun 12, 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
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@
"#composite/wiki-data": "./src/data/composite/wiki-data/index.js",
"#composite/wiki-properties": "./src/data/composite/wiki-properties/index.js",
"#composite/things/album": "./src/data/composite/things/album/index.js",
"#composite/things/artist": "./src/data/composite/things/artist/index.js",
"#composite/things/contribution": "./src/data/composite/things/contribution/index.js",
"#composite/things/flash": "./src/data/composite/things/flash/index.js",
"#composite/things/flash-act": "./src/data/composite/things/flash-act/index.js",
"#composite/things/listing": "./src/data/composite/things/listing/index.js",
"#composite/things/track": "./src/data/composite/things/track/index.js",
"#composite/things/track-section": "./src/data/composite/things/track-section/index.js",
"#content-dependencies": "./src/content/dependencies/index.js",
Expand All @@ -34,8 +37,11 @@
"#html": "./src/util/html.js",
"#import-heck": "./src/import-heck.js",
"#language": "./src/data/language.js",
"#listing-spec": "./src/listing-spec/all.js",
"#listings": "./src/listings.js",
"#page-specs": "./src/page/index.js",
"#node-utils": "./src/util/node-utils.js",
"#page-util": "./src/page/page-util.js",
"#repl": "./src/write/build-modes/repl.js",
"#replacer": "./src/util/replacer.js",
"#search": "./src/search.js",
Expand Down
2 changes: 2 additions & 0 deletions src/content/dependencies/generateAdditionalFilesList.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export default {

generate: (slots, {html}) =>
html.tag('ul', {class: 'additional-files-list'},
{[html.onlyIfContent]: true},

stitchArrays({
chunk: slots.chunks,
items: slots.chunkItems,
Expand Down
53 changes: 53 additions & 0 deletions src/content/dependencies/generateAlbumChronologyLinks.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import {sortAlbumsTracksChronologically} from '#sort';

import getChronologyRelations from '../util/getChronologyRelations.js';

export default {
contentDependencies: [
'generateChronologyLinks',
'linkAlbum',
'linkArtist',
'linkTrack',
],

relations: (relation, album) => ({
chronologyLinks:
relation('generateChronologyLinks'),

coverArtistChronologyContributions:
getChronologyRelations(album, {
contributions: album.coverArtistContribs ?? [],

linkArtist: artist => relation('linkArtist', artist),

linkThing: trackOrAlbum =>
(trackOrAlbum.album
? relation('linkTrack', trackOrAlbum)
: relation('linkAlbum', trackOrAlbum)),

getThings(artist) {
const getDate = thing => thing.coverArtDate ?? thing.date;

const things =
([
artist.albumCoverArtistContributions,
artist.trackCoverArtistContributions,
]).flat()
.map(({thing}) => thing)
.filter(getDate);

return sortAlbumsTracksChronologically(things, {getDate});
},
}),
}),

generate: (relations) =>
relations.chronologyLinks.slots({
chronologyInfoSets: [
{
headingString: 'misc.chronology.heading.coverArt',
contributions: relations.coverArtistChronologyContributions,
},
],
}),
}
Loading