-
Notifications
You must be signed in to change notification settings - Fork 91
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
Ensure light mode is forced in backoffice on Drupal 7 builds #901
Conversation
Thanks @seamuslee001 This looks like a needed patch. I think it should be merged. |
Thanks @seamuslee001 just r-running now |
@@ -645,6 +645,9 @@ function civicrm_enable_riverlea_theme() { | |||
if civicrm_check_ver '>' 5.80.alpha1 ; then | |||
cv en --ignore-missing riverlea | |||
cv vset theme_backend=minetta | |||
if [[ "$CIVI_UF" == "Drupal" ] || [ "$CIVI_UF" == "WordPress" ]]; then |
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 needed to change to this:
diff --git a/src/civibuild.lib.sh b/src/civibuild.lib.sh
index 8ccd4fb..e44a931 100644
--- a/src/civibuild.lib.sh
+++ b/src/civibuild.lib.sh
@@ -645,8 +645,11 @@ function civicrm_enable_riverlea_theme() {
if civicrm_check_ver '>' 5.80.alpha1 ; then
cv en --ignore-missing riverlea
cv vset theme_backend=minetta
- if [[ "$CIVI_UF" == "Drupal" ] || [ "$CIVI_UF" == "WordPress" ]]; then
+ if [ "$CIVI_UF" == "Drupal" ] ; then
+ cv vset riverlea_dark_mode_backend=light
+ elif [ "$CIVI_UF" == "WordPress" ] ; then
cv vset riverlea_dark_mode_backend=light
+ cv vset riverlea_dark_mode_frontend=light
fi
fi
}
I was getting errors using the ||
syntax
updated to do front end on WP
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.
with this setup - the back end setting is updated properly
should we also set front end here?
Yeah, it regularly confuses me when I activate Riverlea locally. The impact is a bit bigger than civibuild, though, right? Like... anyone who installs Civi on top of CMS can have the issue of (mis)matching light-dark mode? I guess I don't keep track of all themes in the CMS's, so I don't know what's statistically common... but I feel like it's more common for CMS themes to have a static color palette. What about this policy (cc @vingle):
(Or, if we can't do that, then we go to the next level -- update the web-installer to show a prompt.) |
@totten I agree - it's definitely bigger than buildkit. Just yesterday had a client whose front-end Civi pages I've flipped to RiverLea commenting that they looked odd, and their screengrab showed it was their browser's dark-mode clashing with a front-end non-dark theme. So 100% yes to For backend, across the other CMS, afaict:
Joomla 5, D10 Gin/BS5, Backdrop at some point soon - def not the majority… So maybe it's safe to set them all to light by default and just be a bit more noisy about the darkmode and how to turn it on, and then revisit this if WordPress or Drupal default admin theme add it? |
that list certainly suggests then leaves open the possibility of setting |
Yes - and then if/when Backdrop merges the darkmode PR, and when Joomla5 becomes 90% of Joomlas, could include them too? But never for frontend (unlike Standalone which has the same theme environment front & back). |
I think this isn't needed now civicrm/civicrm-core#31611 and civicrm/civicrm-core#31633 are merged. dmaster and smaster both looking good today |
@ufundo @totten