Render the item-page thumbnail only once#5824
Open
bram-atmire wants to merge 1 commit into
Open
Conversation
The advanced attachment rendering (showDownloadLinkAsAttachment) showed a thumbnail (or 'no thumbnail' placeholder) per attachment card, duplicating the item thumbnail already rendered in the item-page sidebar. Remove the per-attachment thumbnail from BitstreamAttachmentComponent so the page renders a single thumbnail; the attachment cards keep their file metadata and download button. Fixes DSpace#5821
Member
|
@bram-atmire : I'm not sure I agree with this PR as it removes the thumbnail entirely from the My understanding is that this came over from DSpace-CRIS because it's a part of the Configurable Layout of Entity/Item pages coming in DSpace 11, see DSpace/DSpace#11779 I believe the thumbnail appears in this component because it does NOT always appear in the other location, based on how the layout is configured. So, I think it'd be a better solution to make this configurable... or wait until DSpace/DSpace#11779 is fixed before we move this forward. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
References
Fixes #5821
Description
Removes the duplicate thumbnail on the item page: the advanced attachment cards rendered their own thumbnail in addition to the item thumbnail already shown in the item-page sidebar.
Instructions for Reviewers
This affects the advanced attachment rendering used on the item page when
layout.showDownloadLinkAsAttachment: true(theds-bitstream-attachmentcards). Each card rendered a thumbnail (or the "no thumbnail" placeholder) for its bitstream, which duplicated the item-level thumbnail already rendered in the left sidebar (col-md-4), spending prime above-the-fold space on a second copy.List of changes in this PR:
BitstreamAttachmentComponent's template.thumbnail$subject, itsngOnInitsubscription, theThemedThumbnailComponentimport, and the dead.thumbnail-wrapperstyle.The single item thumbnail rendered in the sidebar is retained; the attachment cards keep their file metadata and download button.
How to test:
layout.showDownloadLinkAsAttachment: truein yourconfig.*.yml.Checklist
mainbranch of code.