-
-
Notifications
You must be signed in to change notification settings - Fork 825
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 in bootstrap button classes to CiviMail interface #12013
Add in bootstrap button classes to CiviMail interface #12013
Conversation
ping @colemanw Coleman you may want to have a look at this too and there is this PR from me in shoreditch civicrm/org.civicrm.shoreditch#223 which uses these new classes and makes the buttons look good in a traditional new mailing |
@seamuslee001 the CiviCRM markup does not generally include these classes, but Shoreditch is nonetheless able to style them. Why is it necessary to add those classes in this one place specifically? |
@colemanw the reason was otherwise they were all coming out as blue by default in shoreditch and there needed some extra styling in shoreditch to make them look good on initial load. The classes i picked aimed to make it as close to the Moasico style as possible https://github.com/veda-consulting/uk.co.vedaconsulting.mosaico/blob/2.x/ang/crmMosaico/EditMailingCtrl/mosaico.html#L47 https://github.com/veda-consulting/uk.co.vedaconsulting.mosaico/blob/2.x/ang/crmMosaico/BlockPreview.html#L11 |
@seamuslee001 I like the idea of making it easier to theme with Bootstrap, but adhoc additions of BootstrapCSS aren't a good idea. Specifically:
But I agree we need a clearer way to manage the styling transition. There's some more work in this area... let me see if I can find it... |
See also:
But perhaps the topic really deserves its own issue or wiki page? (It's a little hard to read/reference that recap in Mattermost.) |
@totten i just stumbled on that as well and i notice that even in the crm.* files like https://github.com/veda-consulting/uk.co.vedaconsulting.mosaico/pull/236/files#diff-abc34f8fca591a33d5542a8d4e166308R14 i can see that your still using btn classes. Also https://github.com/veda-consulting/uk.co.vedaconsulting.mosaico/pull/236/files#diff-7b4adde1160e4928bf27ff71a1781b6eR8 Perhaps that is intentional but i would also suggest whatever markup is there for the crm.* in Mosaico should be synced to core right? that way then at least people might get a standard approach |
Oh, you're right about veda-consulting-company/uk.co.vedaconsulting.mosaico#236 using The The IIRC, in developing veda-consulting-company/uk.co.vedaconsulting.mosaico#236, I started out with a pretty messy split between Bootstrap and crmstar content, and it took a while to get a clean separation of the folders. But now that they are separated, I think it'd be easy to rename |
4eaef91
to
9f4bf5e
Compare
@totten @colemanw i have altered this now to be more namespaced classes, This would mean anyone adding a bootstrap theme onto it wouldn't get any issues as these classes aren't in the standard bootstrap markup. further more as with the crm-ui-icon directive adding crm-button class onto everything the only ones before this that are different in class style is the submit button ones, Everything else gets the same styling when delete and save draft are different to that of the submit, this allows themes like shoreditch to style them differently as needed |
test this please |
Jenkins re test this please |
@guanhuan can you maybe get someone to take a look - unless @totten or @colemanw feel they can make a call on @seamuslee001 last update |
…e themed up independantly by themes Further remove bootstrap class infavor of namespaced class
9f4bf5e
to
f097283
Compare
OK, the last update addressed my Once the tests pass, it should be mergeable. (To be safe, I'd suggest opening the autobuild test site and glancing at the "New Mailing" screen -- but that's a really small barrier.) |
@eileenmcnaughton i have busted caches locally on an AUG test box opened up dev tools confirmed the page loaded confirmed the new markup was there and confirmed no ui changes occurred because of the new markup. |
Per most recent comments - adding merge-on-pass |
Merging as per the tag |
Overview
This adds in bootstrap button classes to CiviMail Buttons to allow them to be themed up by bootstrap based themes
ping @mukeshcompucorp you may have an interest in this