Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
CRM-18792, dev/core#378 - Create CSS theming subsystem #12929
This PR formalizes the "theming" construct. Key links:
This is an updated version of #8523 which addresses conflicts, emits a theme-selection hook, and displays the new settings in the admin UI.
(Nothing to show)
On Drupal and Backdrop, the administration screen "Display Preferences" presents an option "Theme":
On WordPress and Joomla, the administration screen "Display Preferences" presents two options for the "Backend Theme" and "Frontend Theme":
Key programmatic interfaces:
Functionally, this should be a superset of #12872: to prevent loading of Civi's CSS on frontend pages, set
The draft documentation could use some more work, but hopefully it gets the key things across.
@totten given the amount of discussion that has already taken place (on the previous PR & here at the sprint) I'm feeling pretty good about this. It has unit tests so the hook signatures are looked in & where different approaches have been suggested I don't think anything has been clearly better so this seems like a great step forwards.
If we merge now we have 6 weeks before it goes live so we can iterate if need be - but of course most iterations will come later because we would only need a 'quick' iteration if we wanted to change the hook signature or contract in another way.
The minor changes I requested are
@totten my understanding is that this has been superceded & you have a functional extension (org.civicrm.themex) that can used as a dependency for anyone wanting to do theming & this https://github.com/totten/civicrm-dev-docs/blob/master-theme/docs/framework/theme.md is the current WIP documentation....
Should we close this? I would like to get the piece of work you started to a usable point if not perfect (remember that enemy of good :-)
@totten I've rebased this so it's no longer stale but my understanding is perhaps it's superceded by https://github.com/totten/civicrm-dev-docs/blob/master-theme/docs/framework/theme.md and we are thinking to close it - I think we should resolve this one & also resolve making sure the docs point people in the right direction
added this to requires more work to be reviewable
in Product maintenance
Feb 24, 2019
moved this from needs work to be reviewable
to needs agreement on tech approach
in review board
Feb 25, 2019
Is this PR going anywhere? The proposal seems a really good one: to let the users select front-end and back-end themes. So you could chose a Bootstrap or UIKit front-end theme developed to work for all CMSs and a Wordpress or Joomla-specific backend theme. And the interface proposal seems very intuitive.
I've added merge on pass - we looked at this at the sprint and there was agreement this takes us forwards without potentially solving everything.
There is a docs PR & a civix PR and I'm also hoping @mattwire will get his head around the steps involved to add PRs to the listing & update themes he is involved in to adapt.
From discussions etc this is greenfields & non breaking and has been considered extensively over a long time. There is also enthusiasm to work with it & iterate if need be