Skip to content

Conversation

@artlowel
Copy link
Member

References

Description

There was already a call to get a shortlivedtoken in the thumbnail component. The issue was that in prod mode, angular didn't detect that the image src had changed afterwards so it didn't rerender the image.

The solution was to use a BehaviorSubject for the src and the isLoading boolean

Instructions for Reviewers

  • Create a bitstream in the ORIGINAL bundle of an item
  • Configure an embargo for that bitstream, with a date in the future
  • Run filter-media -f -i ${the item's handle} on the item containing the bitstream
  • Go to the item page as an admin, and verify that you can see that bitstream's thumbnail
  • Go to the item page as an anonymous user, and verify that you see a placeholder instead

Checklist

  • 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 ESLint validation using yarn lint
  • My PR doesn't introduce circular dependencies (verified via yarn check-circ-deps)
  • 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 libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

@artlowel artlowel added bug authorization related to authorization, permissions or groups testathon Reported by a tester during Community Testathon labels Apr 25, 2025
@artlowel artlowel moved this to 🙋 Needs Reviewers Assigned in DSpace Maintenance (9.x, 8.x, 7.6.x) Apr 25, 2025
Copy link
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 @artlowel ! Verified the code looks essentially the same as #4249 (except for older Angular release). Tested manually as well and it works the same

@github-project-automation github-project-automation bot moved this from 🙋 Needs Reviewers Assigned to 👍 Reviewer Approved in DSpace Maintenance (9.x, 8.x, 7.6.x) May 8, 2025
@tdonohue tdonohue merged commit d92aeb6 into DSpace:dspace-8_x May 8, 2025
15 checks passed
@github-project-automation github-project-automation bot moved this from 👍 Reviewer Approved to ✅ Done in DSpace Maintenance (9.x, 8.x, 7.6.x) May 8, 2025
@tdonohue tdonohue added this to the 8.2 milestone May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

authorization related to authorization, permissions or groups bug testathon Reported by a tester during Community Testathon

Projects

Development

Successfully merging this pull request may close these issues.

3 participants