-
Notifications
You must be signed in to change notification settings - Fork 484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add thumbnail for featured dataverses #10433
Add thumbnail for featured dataverses #10433
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting feature! I left some quick feedback. Thanks for the video!
@@ -69,7 +69,8 @@ The Theme features provides you with a way to customize the look of your Dataver | |||
|
|||
- Inherit the theme from the parent Dataverse collection. This option is helpful if you'd like consistency across several Dataverse collections that all share the same parent. | |||
- Add or update a logo image, which will appear at the top of your Dataverse collection. | |||
- Add or update a footer image, which will appear at at the bottom of your Dataverse collection. | |||
- Add or update a thumbnail image, which will appear on featured dataverses of your Dataverse collection. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting feature! My first thought is, should this feature be available via API? That way the new frontend can use it some day.
Also, these issue are related:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to have thumbnail logo via API, all Theme feature have to be moved before. Do you know if the development of #10194 is well advanced and PR will be open soon ?
Either I wait for PR #10194 to be accepted (and I adapt the source code from it), or I propose one. But either way, I should change the status of this PR (#10433) to draft.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please be aware that we are changing how we name these flyway files:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I hadn't realized this change, thanks for the information !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a suggestion for the release note.
2024/03/28
|
Co-authored-by: Philip Durbin <philipdurbin@gmail.com>
Add new recommandations (HTML preview + "for more information ...")
@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):
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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a quick play with this and it seems to work. The code seems fine, I think. Approved.
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:
Special notes for your reviewer:
I have to refactor some code to fix a bug : I move image suppression block instruction from
UpdateDataverseThemeCommand.java
toThemeWidgetFragment.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
Preview docs at https://dataverse-guide--10433.org.readthedocs.build/en/10433/user/dataverse-management.html#theme