So I originally wanted to try to figure out how support for external libraries/variants should ideally work, but in trying to do so, I ran against many little walls in the current API:
http://drupalcode.org/viewvc/drupal/contributions/modules/jquery/
The only/main code is in jquery.module and is mostly a quick hack only. However, I've added plenty of @todos in the process.
As most of those issues are revealing fundamental problems in the current API, it would be wise to focus on them first; i.e., before trying to add new features to the API.
It's possible that some @todo issues are covered by other issues/patches in the queue already. We'll have to figure out the order of @todos to tackle, and which of them should be tackled in a separate issue.
Comments
Comment #1
tstoecklerSimply copying the todos from jquery.module here for reference. I'm not sure they all are related to Libraries API, but since it's not THAT many, that shouldn't be a problem.
I hope to catch you on Skype this week, in which case the numbering here will makes things a bit easier...
Comment #2
sunThanks! I've slightly edited your comment + removed the @todos which aren't relevant for Libraries API
Comment #3
suninto
before any other function is invoked.
Comment #4
tstoecklerAll right, thanks for the explanation.
1. Should be relatively easy, let's move that to #958162: Allow groups of callbacks to be applied to libraries.
2. Is an "oversight" (how could we... :) ) in our current API, I think that deserves its own issue: #964986: Support version- and variant-dependent filenames
3. Is pretty much trivial to fix, let's also move that to #958162: Allow groups of callbacks to be applied to libraries.
4. I had thought about the following before in #864376: Loading of external libraries, but had previously disregarded the thought for complexity: Maybe it is time to introduce a 'detection callback', which defaults to libraries_get_path(), and then we provide a useful default function for libraries that are also available externally to provide the alternate locations and define priorities or something. I also think this should be moved to #864376: Loading of external libraries.
5. Is definitely a bug, but I'm pretty sure that at least one test in #864376: Loading of external libraries would fail if that's still the case over there. We should definitely investigate that, though, but it makes sense to do that over there, since we're changing the "marking variants installed"-logic over there anyway.
Let's leave this open, though and mark it fixed, once jQuery.module is able to consume our API cleanly and hack-less.
Comment #5
ohnobinki CreditAttribution: ohnobinki commentedsub
Comment #6
sunComment #7
tstoecklerLet's mark this fixed.
The issues this spawned off have been fixed, or are being debated.
One of those, that is not linked above, is #1224838: Fix the inconsistency between filenames as array keys and array values.
Let's try for better jquery.module support in 3.x :-)
Comment #8
tstoecklerfail