Topic-icon SCLogin ignores bootstrap load wishes

10 years 10 months ago - 10 years 10 months ago #38270 by chramb1
Bad boy ;)

//if ($params->get('loadBootstrap'))
$document->addStyleSheet(JURI::base(true) . '/media/sourcecoast/css/sc_bootstrap.css');

The check for loadBootstrap is commented out. My template uses bootstrap already and a different version. I don't want modules stepping on that. This is the whole Bootstrap v2.3.2 CSS - not what I'm using.

You also include it without option in provider/facebook.php, line 406 ($doc->addStyleSheet(JURI::base(true) . '/media/sourcecoast/css/sc_bootstrap.css');) in onAfterDispatch(). I've had to comment it out, but it shouldn't be included if the "include bootstrap" is turned off and respected.

Many (most?) newer templates are going to bring in Bootstrap on their own. Any styling mismatches will be the user's problem if they turn off inclusion in your component/module, so you need not worry.

Can we get this respected in the next update?
Last edit: 10 years 10 months ago by chramb1.
The topic has been locked.
Support Specialist
10 years 10 months ago #38282 by alzander
Christopher,
It won't be respected in JFBConnect v5.2/SCLogin v3.2, unfortunately, but hopefully in a release after that. Hopefully, you'll be willing to just keep commenting it out until then.

The reason comes down to conflicts and your specific comment of "Any styling mismatches will be the user's problem if they turn off inclusion in your component/module, so you need not worry.". While we agree, with that, it's not really the case that all users feel that way or can resolve those conflicts/missing styles when they arise.

With v5.1.0 of JFBConnect, we moved to jQuery/Bootstrap, and ran into a ton of conflicts between many versions of jQuery installed (which can conflict) and multiple inclusions of the Bootstrap Javascript (which will conflict, even if the same version). JFBC v5.1.2/SCLogin v3.1.2 moved to a new jQuery/Bootstrap compatibility layer, which basically namespaced it specifically to JFBConnect/SCLogin. That means that it can't conflict with anything else. We also have a fallback where, if our Javascript isn't included, we will rely on the user to have a decent jQuery/Bootstrap config on their site. It's worked *splendidly* so far, and cleared up a ton of support an issues.

Our CSS is the next on the plate for a lot of fixes. Frankly, our front-end could use some CSS/styling love, and that's coming. Right now, the bootstrap.css file only targets bootstrap styles in a "sourcecoast" class. That means it shouldn't cause conflicts with your existing styles and also means a consistent look for our extensions and a good 'out of the box' experience.

We will be re-adding/fixing the option to include the CSS, in likely the v5.3 release. Unfortunately, we can't do it right now, as, although it's called bootstrap.css, there are other styles for jQuery UI and other things we've added into it which are required for some features of JFBConnect. Those are also things that many templates don't include by default. So, we'll be working on something that allows either selective inclusion of CSS features, or a better breakout of Bootstrap vs JFBConnect-specific styles in the next (v5.3) release.

I hope that explains. As always though, feedback, rotten eggs, or anything else is welcome.

Thanks,
Alex
The topic has been locked.