Why html5-shiv.js and respond.js is not provided via assets system?

Permalink
These scripts are hard-coded in header_required....

hissy
 
MrKDilkington replied on at Permalink Best Answer Reply
MrKDilkington
Hi hissy,

This might be helpful.

https://github.com/concrete5/concrete5-5.7.0/issues/1500...

"FYI: we will be moving html5-shiv and respond.js from out of header_required.php and into Elemental in 5.7.4. This means that third party themes will have to start including it in their headers as well. Just a heads up to keep your theme updated so that they don't break when 5.7.4 is installed."
hissy replied on at Permalink Reply
hissy
Great answer! Thanks a lot.
pilipala replied on at Permalink Reply
pilipala
Thanks for the answer!

Just wondering if there should be some kind of prompt or message for people when downloading 5.7.4 to update their marketplace themes?

At the moment, if we develop a theme for the marketplace and put html5-shiv.js and respond.js in our theme header, the js files will be duplicated. So I am assuming the idea is that we hold off adding those js files into our themes until 5.7.4 is available.

I am imagining the situation where a user updates their concrete5 core to 5.7.4, but not their marketplace theme, and then find problems with their site and wonders why :)
MichaelG replied on at Permalink Reply
MichaelG
people should stay up to date with their packages regardless. That's kind of the responsibility of owning a website: keeping your stuff up to date, and knowing what to do otherwise.

Just my two cents.

It's kind of like driving. You own the responsibility of maintaining your car, whether you do it, or a mechanic does it.
ramonleenders replied on at Permalink Reply
ramonleenders
Developers can check for the concrete5 version number in a theme, and if version is lower/higher than version 7.x.x do this, otherwise do that (or do nothing). So you can already prepare for this if you have one or multiple themes in the store. You just have to include some if/else for all version compatibility!
pilipala replied on at Permalink Reply
pilipala
Thanks, Ramonleenders, that's an idea. I guess we won't know for sure before 5.7.4 is out whether it will in fact have the js files removed, so I suppose we will have to wait to see.

I know that people should update their themes, but sometimes people don't as they may not think there is any special need to do so. Just thought a prompt could be helpful in this case....
ramonleenders replied on at Permalink Reply
ramonleenders
I've recently read about this and saw an issue on Github. As it seems, it will be in the new version, see the commit here:

https://github.com/concrete5/concrete5-5.7.0/commit/0971447ce11de35a...

You can see the page_theme.php change too!
MrKDilkington replied on at Permalink Reply
MrKDilkington
Html5-shiv.js and respond.js will become assets that come with concrete5 and can be required in page_theme.php.
$this->requireAsset('javascript-conditional', 'html5-shiv');
$this->requireAsset('javascript-conditional', 'respond');
pilipala replied on at Permalink Reply
pilipala
Thanks ramonleenders and MrKDilkington, that's good to hear!