Sort reverse reference lists by date, in data #536
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sorts reverse reference and contribution lists by date, notably using the intrinsically provided dates provided through
withResolvedContribs
(etc).Lists are only sorted by the literal property
date
on the referencing things; additionally disambiguating sorting should be performed before or after. (Although for "before" - the sorting should be done to the array shared by all things, or else the caching is defeated. We declare sorting through YAML loading specs'sort
step. Detailed discussion: #code-quarantine)Re: #383, sorting occurs for every reverse reference list (of the respective
input('data')
andinput('list')
all at once, at the same time as the reverse lists / cache records are basically prepared (i.e. on the first call with those inputs). Although we haven't 100% confirmed this is never significantly consequential, some initial measures suggest we'd have to be dealing with pretty big data to run into trouble. (Intro: #code-quarantine, summary: #code-quarantine)Resolves #529, fixing cover artwork chronology links (whose dates can vary from the respective track). We haven't integrated a predictable sort order into general content yet, and there probably needs to be a broader look at how sorted lists are represented to enable that (e.g. we should only sort according to language rules within ranges that are otherwise ambiguous).