Needs work
Project:
jQuery libraries
Component:
Miscellaneous
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
6 Apr 2010 at 13:46 UTC
Updated:
5 Jan 2012 at 13:40 UTC
Jump to comment: Most recent file
This issue means to provide steps and tasks needed to push the jQuery module forward.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | jquery.patch | 10.28 KB | robloach |
| #7 | jquery.make_.txt | 672 bytes | robloach |
Comments
Comment #1
robloachWe should have all versions of the jQuery module across all versions of Drupal (5, 6 and 7) accomplish the same thing. Replace the installed version of jQuery (and jQuery UI) with whatever version of jQuery that the Libraries API finds.
Since hook_library is pretty much what the jQ module was in Drupal 5/6, we should consider backporting it. jQP goes one step further and provides a user interface around it. Not sure we really need a user interface for the jQuery module though.
Comment #2
sunTBH, I wouldn't want to waste time on D6 and below. Those old "scenarios" either work or they don't. It's rather unlikely that users will switch from jquery_update or any other, as people usually use their API functions in custom code and themes. I'd say we rather have to deal with new users/installs, and people upgrading from earlier Drupal versions once D7 is out (who will have to redo their sites anyway).
Already mentioned over in #719896: Add a hook_libraries_info(): After hook_libraries_info() landed, one of the next steps for Libraries API is to expose a "widget" for integrating modules, which probably counts as UI. Aside from that, Libraries API should also provide helper functions for dealing with hook_requirements() and related scenarios, i.e. enforce properly supported libraries (versions) at Drupal installation time, module installation time, and informal status reporting at runtime.
Additionally, we discussed in IRC that Libraries API needs to be able to expose (or even override?) installed libraries to hook_library(). That's another follow-up issue to tackle, once hook_libraries_info() lands (and which doesn't exist yet).
Comment #3
klonosI agree on the 5.x as an 'old scenario', but for 6.x you'll need to rethink IMHO: http://drupal.org/node/763378
6.x: ~275.000 sites using it
7.x: only ~1.000 - ~1.250 sites using it
I like the new features coming with D7 too, but the upgrade_status module report still shows only 4 of my modules ready (actually in D7 core), ~40 of them do not even have a 7.x dev version yet.
As for the people that'll switch to D7 from D6... I wouldn't count on large crowds rushing to do so. How about a plan to go for the D7 version and then backport it to D6? I think it sounds reasonable + you'll get more beta testers in the 6.x version.
As I said... MHO.
Comment #4
robloachI'm on board with klonos in getting everything working very nicely in Drupal 7, and then backporting. We should make sure the Drupal 7 version is solid and does what it says it does very nicely, and then consider backporting it to the jQuery module for 6.x.
In Drupal 7, I see the Libraries API and jQuery module doing a couple of things:
Comment #5
sunExcellent considerations, Rob!
1) A first patch for #719896: Add a hook_libraries_info() has been committed already; but tstoeckler is working on a follow-up. I don't feel very comfortable with the idea of re-using hook_library(), primarily, because that would bind and limit us to the structure and format of the core hook. Also, the surrounding API functionality in core does not support all features and possible libraries that Libraries API does, so users may mistakenly expect that they could load a library through the usual API in Drupal core.
2) yup. :) Technically, 1) is more or less ready. If work was started on this, we'd get important implementation feedback for Libraries API.
3) That's an interesting point. Although the API also supports to register and auto-load version- or variant-specific integration files per module, it doesn't provide a one-shot function returning the installed version of a library yet.
Comment #6
klonosNow that we have issue summaries, how about updating this one's?
Comment #7
robloachWant #1143936: Downloading a single file breaks if the folder doesn't exist
Comment #8
robloachStill needs work though, since it should also replace jQuery UI.
Comment #9
sunYay, thanks!
Missing 'installed' check/condition for jquery_ui.
The version is only replaced for jquery, but not for jQuery UI components.
Some of the todos are not resolved yet and should be retained.
Minor: Let's write each component on a separate line, please.
This loop looks extremely complex and confusing, since $libraries refers to the hook_library() libraries, and $library refers to the Libraries API library. I wonder whether we can do anything about that to make it more readable. Potentially using clearer variable names leveraging references.
Why isn't the default directory_name the name (key) of the library?
We need to ask the jQuery team whether they can provide a jquery-latest-stable*.js symlink/download URL.
It is highly recommended to keep the info about old version strings, regardless of whether they may be outdated. (all of this may be backported to D6 at some point)
The recommended syntax for these comments is like the old (here removed) line: