-
Notifications
You must be signed in to change notification settings - Fork 85
Site Branding - Theme colors and logo config #486
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
base: main
Are you sure you want to change the base?
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part is removed when the theme's default color pallete is moved inside the theme folder
117ef24
to
acc9ea0
Compare
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 conversation history in vivo-project/VIVO#4040 for the details of my testing and subsequent changes.
ea22a1e
to
e3533cb
Compare
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:
Additional 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 3
when 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
Regular Color Settings
Advanced Color Settings
Reset Color Option
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