Add thumbnail for featured dataverses
What this PR does / why we need it:
With this PR, a dataverse administrator can set a thumbnail image into theme page, to be displayed in featured dataverses. Unlike logo or footer images, the preview image has no display parameters such as "logo format" or "logo alignment".
The following rule applies to the images displayed for featured collections: if a preview image is present then it's displayed, else if a banner is present then it's displayed, else the default Dataverse logo is displayed.
Which issue(s) this PR closes:
Closes #10291
Special notes for your reviewer:
I have to refactor some code to fix a bug : I move image suppression block instruction from UpdateDataverseThemeCommand.java to ThemeWidgetFragment.java. When the logo was first deleted, the theme was saved in database with partial information (no footer). When the image footer was deleted, as the database theme no longer contained this information, so the image was not deleted.
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
dataverse_thumbnail_featured_dataverses.webm
Additional documentation:
Dataverse management documentation page have been modify to add the feature
coverage: 20.754% (-0.005%) from 20.759% when pulling 27f682f83c5cf70debb8ee0ed5baf82922de2bd9 on Recherche-Data-Gouv:10291-collection_thumbnail into d4b9260e22694c9ff7530551e087d4ba386a39c3 on IQSS:develop.
2024/03/28
- Prioritized due to relationship with already prioritized issue that is currently waiting: https://github.com/IQSS/dataverse/issues/10194
@jeromeroucou this PR has merge conflicts. Can you please resolve them?
Hi @pdurbin , @jeromeroucou is currently on vacation and will be able to get back to this PR in september :)
Maybe @luddaniel can fix the merge conflicts? They seem pretty straightforward but I can't push to https://github.com/Recherche-Data-Gouv/dataverse
It should be just a matter of renaming the sql file (bumping the version to the next available):
pdurbin@beamish dataverse % git merge develop
Auto-merging src/main/java/edu/harvard/iq/dataverse/DataverseServiceBean.java
Auto-merging src/main/java/propertyFiles/Bundle.properties
Auto-merging src/main/resources/db/migration/V6.2.0.1.sql
CONFLICT (add/add): Merge conflict in src/main/resources/db/migration/V6.2.0.1.sql
Automatic merge failed; fix conflicts and then commit the result.
pdurbin@beamish dataverse %
Heads up that there's also a sql file in #10694 so one of these PRs will need to bump again. Here are our docs on the matter, if you haven't seen them: https://guides.dataverse.org/en/6.3/developers/sql-upgrade-scripts.html
@pdurbin done ;) we will rename sql file once again if needed.
By the way, RemoteOverlayAccessIOTest.testRemoteOverlayFiles:103 expected: <true> but was: <false> is also failing on develop
Screenshots from playing around with this feature: