improve display of parent/child relationships (e.g. thumbnails) #4525
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.
Builds on #3998 adding improved display of parent/child relationships (e.g. thumbnails).
Detail
If any of the following exist on an image...
derivative-of-media-idsidentifier (value is comma separated if multiple)replaces-media-ididentifier... the image detail endpoint of media-API now looks up each of the referenced media IDs in ElasticSearch (using existing
getImageByIdfunction1) and maps each to the following shape...and are placed in a new object
parentAndChildDetailson the response, keyed with human readable titles for the respective lists...This then powers a relatively generic UI that renders these as thumbnails at the bottom of the left hand sidebar (where original & crops currently display at the top, with some neat sizing such that scrolling is nice when there are lots of crops and lots of parents/children.)
Footnotes
I did attempt doing it in a single ES call using the
idssearch param but the logic to piece it back together was rather messy and this is such an infrequent feature I think the extra call(s) are worth it ↩