Site Branding - Theme colors and logo config#486
Conversation
balmas
left a comment
There was a problem hiding this comment.
See comments at vivo-project/VIVO#4040 (comment)
|
Why should the logo be cropped? Couldn't it just be uploaded as a file? |
|
|
||
|
|
||
| const defaultColorPalete = { | ||
| "themes/wilma/": { |
There was a problem hiding this comment.
Hardcoding theme names/paths is not an option. It will be broken once theme is renamed for customization.
There was a problem hiding this comment.
This part is removed when the theme's default color pallete is moved inside the theme folder
117ef24 to
acc9ea0
Compare
balmas
left a comment
There was a problem hiding this comment.
Please conversation history in vivo-project/VIVO#4040 for the details of my testing and subsequent changes.
ea22a1e to
e3533cb
Compare
|
|
||
| // Default initializations, which may be overwritten in the AppBeanMapper | ||
| // but are otherwise not changed there | ||
| private String individualUri; |
There was a problem hiding this comment.
How is the individualUri used?
There was a problem hiding this comment.
Apparently, this is no longer in use. This PR has gone through significant design changes.
If I recall correctly, site settings (such as the site name) are stored in a triplet, where the subject is the application instance named “...portal.” Because of that approach, I initially stored this site setting in the same way, as it was more convenient to access from my controllers. It is certainly no longer in use since we moved to a display model. Thank you for noticing, it will be removed.
Co-authored-by: Dragan Ivanovic <chenejac@uns.ac.rs>
VIVO GitHub issue
Linked Vivo PR
What does this pull request do?
This pull request allows administrators to customize institutional branding by defining institutional colors and updating the key color scheme of the current theme.
What's new?
Administrators can now change the following theme colors:
Additional options for detailed customization:
The theme editor is fully customizable per theme.
Each theme’s colors are defined in:
webapp/themes/{theme}/theme-config.jsonAdditional Notes
This PR introduces ReferrerHelper.java
This util class easily retrieves the previous page from the request and uses it for the back button.
The traditional approach for handling the back button was to always navigate to the document.referrer or previously visited page. However, this strategy breaks when dealing with nested navigation flows.
Home -> Page 2 -> Page 3when the user is on Page 3 and clicks the back button, they are correctly taken back to Page 2. But at that point, the referrer becomes Page 3 again. So if the user clicks back on Page 2, they are taken to Page 3—creating an infinite loop between Page 2 and Page 3.
Screenshoots
How should this be tested?
General Testing
Ensure testing is conducted for every available theme.
Test 1: Theme Colors
Test 2: Logo Upload
Test 3: Logo Small Upload
Test 4: Only one logo uploaded
Test 5: Logo Removal