dataverse icon indicating copy to clipboard operation
dataverse copied to clipboard

Add thumbnail for featured dataverses

Open jeromeroucou opened this issue 1 year ago • 2 comments

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

jeromeroucou avatar Mar 27 '24 11:03 jeromeroucou

Coverage Status

coverage: 20.754% (-0.005%) from 20.759% when pulling 27f682f83c5cf70debb8ee0ed5baf82922de2bd9 on Recherche-Data-Gouv:10291-collection_thumbnail into d4b9260e22694c9ff7530551e087d4ba386a39c3 on IQSS:develop.

coveralls avatar Mar 27 '24 11:03 coveralls

2024/03/28

  • Prioritized due to relationship with already prioritized issue that is currently waiting: https://github.com/IQSS/dataverse/issues/10194

cmbz avatar Mar 28 '24 18:03 cmbz

@jeromeroucou this PR has merge conflicts. Can you please resolve them?

pdurbin avatar Aug 05 '24 19:08 pdurbin

Hi @pdurbin , @jeromeroucou is currently on vacation and will be able to get back to this PR in september :)

DS-INRAE avatar Aug 07 '24 13:08 DS-INRAE

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 avatar Aug 27 '24 18:08 pdurbin

@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

luddaniel avatar Aug 28 '24 09:08 luddaniel

Screenshots from playing around with this feature:

Screenshot 2024-09-04 at 11 44 01 AM Screenshot 2024-09-04 at 11 43 35 AM Screenshot 2024-09-04 at 11 43 23 AM

pdurbin avatar Sep 04 '24 15:09 pdurbin