Replies: 12 comments 106 replies
-
Who said that? js module can contain ES5 code. But I agree, it will simplify core development (js part) in general. |
Beta Was this translation helpful? Give feedback.
-
It's not that easy. Attaching an attribute FWIW #31485 was attempt shipping modules and not breaking anything |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I think this above is a serious and valid concern from @krileon that deserves some thought:
We all want Joomla 4 to succeed and invert the Joomla 3's curve. A key point is to keep the developers' and users' excitement up. Joomla 4's PHP framework is modern and a huge step from Joomla 3, kudos dev-team! Let's also bring Javascript's framework into modernity too, specially that it looks like mainly being to remove the transpiling from ES6 to ES5 and adding a deprecated comment to jQuery. The drop of BS4 in favor of BS5 has generated some excitement and some big modernity hopes on the frontend too. It's imho worth dropping ES5 in favor of ES6, and while still including and using jQuery at release time (that's fine), just deprecating jQuery. So not a huge release-delayer, but a huge checkmark for Joomla 4's use. |
Beta Was this translation helpful? Give feedback.
-
I think we can delivery ES6 pretty safe. It does not affect extension developers, and no one will notice difference. But final decision need to be made not by me, well ... you know 😄 |
Beta Was this translation helpful? Give feedback.
-
@dgrammatiko First of all it's no longer possible to use Bootstrap components through jQuery. Moreover even if the regular Bootstrap bundle is loaded, the events system of jQuery is totally skipped, requiring to update the code to use for example: instead of: So what do we do? |
Beta Was this translation helpful? Give feedback.
-
I don't know... i've also tried to remove the loading of bootstrap.es5.min.js but nothing works. Now i have : <script src="/media/vendor/bootstrap/js/popover.es6.min.js?7a19a487669695576ab08be3e3201892" type="module"></script> <script src="/media/vendor/bootstrap/js/alert.es6.min.js?7a19a487669695576ab08be3e3201892" type="module"></script> <script src="/media/vendor/bootstrap/js/collapse.es6.min.js?7a19a487669695576ab08be3e3201892" type="module"></script> <script src="/media/vendor/bootstrap/js/modal.es6.min.js?7a19a487669695576ab08be3e3201892" type="module"></script> <script src="/media/vendor/bootstrap/js/tab.es6.min.js?7a19a487669695576ab08be3e3201892" type="module"></script>and only the first one jQuery('.selector').popover(); works without errors. |
Beta Was this translation helpful? Give feedback.
-
@dgrammatiko I've tried with a clean installation of the build that you sent me, Modified /Joomla40staging/administrator/components/com_content/src/View/Articles/HtmlView.php |
Beta Was this translation helpful? Give feedback.
-
If you have a solution why are you complaining, use your solution. Also for the record, I'm not part of the decision-makers, it just happens that I did a PR that was merged but you think is wrong or whatever. Cool. Let's keep it there. |
Beta Was this translation helpful? Give feedback.
-
So, I'm refactoring the build tools mainly because they're awfully slow. The questions here are:
|
Beta Was this translation helpful? Give feedback.
-
The Pr #32315 is introducing Please test |
Beta Was this translation helpful? Give feedback.
-
I think that this one was already implemented in a way that Joomla 4 delivers modern JS scripts for browsers that support it and keep the ES5 scripts for older browsers. The complete removal of the ES5 scripts from the package is a decision that the Production Team will have to make at some point that will serve best the project. fwiw the PRs that implemented this were:
|
Beta Was this translation helpful? Give feedback.
-
With the move to Bootstrap 5 IE support is gone (BS5 does not support IE) and the official stance on IE is that it isn't supported either. I don't think Joomla should be shipping with ES5 files and should be using ES6.
ES5 from ES6 generates larger files, can't use native module support, can't safely scope your code using let/const, can't use arrow functions, can't use native Promises, can't use fetch, and more. Shipping with ES6 would speed up Joomla even more just by dropping support for browsers that are already not supported. Is there still a reason Joomla 4 needs to still ship with ES5?
Beta Was this translation helpful? Give feedback.
All reactions