Extensions and jQuery UI

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The current feature release of phpBB 3 is 3.3/Proteus.
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.
Post Reply
User avatar
PayBas
Registered User
Posts: 305
Joined: Tue Jul 29, 2008 6:08 pm
Contact:

Extensions and jQuery UI

Post by PayBas »

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.

User avatar
PayBas
Registered User
Posts: 305
Joined: Tue Jul 29, 2008 6:08 pm
Contact:

Re: Extensions and jQuery UI

Post by PayBas »

Some possibilities:
  1. 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)
  2. Do nothing, and let the extension developers battle it out
  3. 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
  4. 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
  5. ...

User avatar
Pico88
Registered User
Posts: 73
Joined: Tue Apr 12, 2011 2:32 pm

Re: Extensions and jQuery UI

Post by Pico88 »

https://area51.phpbb.com/phpBB/viewtopi ... 08&t=44923
There was already the topic about that ;)

User avatar
PayBas
Registered User
Posts: 305
Joined: Tue Jul 29, 2008 6:08 pm
Contact:

Re: Extensions and jQuery UI

Post by PayBas »

Ah good point, missed it completely.

This one can be locked

User avatar
Pico88
Registered User
Posts: 73
Joined: Tue Apr 12, 2011 2:32 pm

Re: Extensions and jQuery UI

Post by Pico88 »

Or merged ;)

User avatar
MattF
Extension Customisations
Extension Customisations
Posts: 675
Joined: Mon Mar 08, 2010 9:18 am

Re: Extensions and jQuery UI

Post by MattF »

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.
Has an irascible disposition.

aleha
Registered User
Posts: 143
Joined: Tue Mar 26, 2013 2:19 am

Re: Extensions and jQuery UI

Post by aleha »

Should this be an extension then to allow a custom jQ UI css/modules build as an asset?

User avatar
PayBas
Registered User
Posts: 305
Joined: Tue Jul 29, 2008 6:08 pm
Contact:

Re: Extensions and jQuery UI

Post by PayBas »

PR is available. But if you have a better idea, I'm all ears.
https://github.com/phpbb/phpbb/pull/2531

Post Reply