Skip to content

Fix recent submissions list thumbnails#1860

Merged
tdonohue merged 3 commits intoDSpace:mainfrom
atmire:Fix-recent-submissions-list-thumbnails
Sep 27, 2022
Merged

Fix recent submissions list thumbnails#1860
tdonohue merged 3 commits intoDSpace:mainfrom
atmire:Fix-recent-submissions-list-thumbnails

Conversation

@ybnd
Copy link
Copy Markdown
Member

@ybnd ybnd commented Sep 26, 2022

References

Description

This PR fixes list thumbnails in the "Recent Items" section on the homepage. The cause ended up being a combination of the following three bugs:

  • ds-recent-item-list was not updated to match the changes in Show thumbnails in result lists #1780 (followLink('thumbnail') and CSS class to determine thumbnail placeholder font)
  • HomePageModule was not set up with all entity classes; it would render results as plain Items, skipping the custom SVG images for e.g. Projects
  • ds-thumbnail would sometimes fall back to the placeholder even when the default image was valid (faulty logic from Support restricted thumbnails #1694)

TODO:

  • Update specs
  • Check SSR

Instructions for Reviewers

Make sure browseBy.showThumbnails is set to true and confirm that #1855 can no longer be replicated.

Checklist

This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR passes TSLint validation using yarn run lint
  • My PR doesn't introduce circular dependencies
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • If my PR includes new, third-party dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.

@lgtm-com
Copy link
Copy Markdown

lgtm-com Bot commented Sep 26, 2022

This pull request introduces 2 alerts when merging f83a79a into 064dae2 - view on LGTM.com

new alerts:

  • 2 for Unused variable, import, function or class

@ybnd ybnd force-pushed the Fix-recent-submissions-list-thumbnails branch from f83a79a to 96144de Compare September 27, 2022 10:14
@lgtm-com
Copy link
Copy Markdown

lgtm-com Bot commented Sep 27, 2022

This pull request introduces 2 alerts when merging 96144de into 064dae2 - view on LGTM.com

new alerts:

  • 2 for Unused variable, import, function or class

@ybnd ybnd force-pushed the Fix-recent-submissions-list-thumbnails branch from 96144de to 396bbd4 Compare September 27, 2022 11:01
@alanorth
Copy link
Copy Markdown
Contributor

Hi @ybnd I was just testing the new thumbnail stuff and noticed that items on the "recent submissions" section of the home page didn't have thumbnails, but on search/browse/item pages they did. Your PR fixes it for me on 7.4-SNAPSHOT. I didn't notice any of the other font issues you mentioned, though.

Before:
Screenshot 2022-09-27 at 14-27-41 DSpace Angular Home-fs8

After:

Screenshot 2022-09-27 at 14-28-09 DSpace Angular Home-fs8

@ybnd
Copy link
Copy Markdown
Member Author

ybnd commented Sep 27, 2022

@alanorth the font issues are limited to specific screen widths, in your screenshots the page seems wide enough for everything to work properly without the scaling logic that was missing.

The original issue did include the thumbnails not being loaded at all (I focused on the placeholders & font because that was the first thing I saw)
→ thanks for confirming that this works for you!

@ybnd ybnd self-assigned this Sep 27, 2022
@ybnd ybnd added this to the 7.4 milestone Sep 27, 2022
@ybnd ybnd marked this pull request as ready for review September 27, 2022 12:22
@ybnd ybnd requested review from alanorth and tdonohue and removed request for alanorth September 27, 2022 12:22
Copy link
Copy Markdown
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thanks @ybnd ! Code looks good. I tested this and verified it fixes the thumbnail issue in recent submission lists. Also see that the placeholder images are displaying properly there and in all search/browse pages. So, this looks good!

@tdonohue
Copy link
Copy Markdown
Member

Merging as this is at +1 (alongside a test from @alanorth !)

@tdonohue tdonohue merged commit ad13a39 into DSpace:main Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Thumbnail placeholders in recent Item list rendered incorrectly

3 participants