In the future, we will very likely see multiple extensions which utilize jQuery UI.
Since jQ has been included in 3.1 (which saves us lots of headaches), the next problem we're going to face is likely jQuery UI conflicts.
How are we going to deal with extensions that each want to load the jQuery UI core + only a few objects/widgets/effects? Not only is it very inefficient to load jQ/UI multiple times, it can create all kinds of JS problems.
Extensions and jQuery UI
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.
If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.
If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Re: Extensions and jQuery UI
Some possibilities:
- Include full jQ UI in phpBB 3.1 core, but only load it if extensions are active that want to use it (extensions will need to have some kind of flag)
- Do nothing, and let the extension developers battle it out
- Have some JS logic in the core that detects multiple instances of jQ UI (even though the libraries itself are not included) and try to prevent conflicts and multiple includes
- Have an "official" jQ UI extension available for phpBB 3.1, which other extensions can rely on. The authors should specify that their extension requires the jQ UI extension to be active
- ...
Re: Extensions and jQuery UI
Ah good point, missed it completely.
This one can be locked
This one can be locked
Re: Extensions and jQuery UI
Well, in a perfect world, jQuery Ui would be included as separate modules, and the extensions could "turn on" the UI modules they need using flags or whatever for each module. jQuery's UI on github provides every module as a separate JS file here: https://github.com/jquery/jquery-ui/tree/master/ui
It's just a shame to either have to load the whole thing or not at all, as the full UI is rather large and bulky, and if any % is not being used, wasteful.
Of course UI themes are another issue.
It's just a shame to either have to load the whole thing or not at all, as the full UI is rather large and bulky, and if any % is not being used, wasteful.
Of course UI themes are another issue.
Has an irascible disposition.
Re: Extensions and jQuery UI
Should this be an extension then to allow a custom jQ UI css/modules build as an asset?
Re: Extensions and jQuery UI
PR is available. But if you have a better idea, I'm all ears.
https://github.com/phpbb/phpbb/pull/2531
https://github.com/phpbb/phpbb/pull/2531