rails/jquery-rails — Issue #46: Move jquery-ui.js into jquery-ui-rails gem
Author: joliss
Created: 2012-02-20 11:04:34+00:00
State: open

Hey guys,

I just packaged up jQuery UI for the asset pipeline: http://www.solitr.com/blog/2012/02/jquery-ui-rails-gem-for-the-asset-pipeline/

I was wondering what you thought about moving the jquery-ui.js that's currently shipping with jquery-rails into the jquery-ui-rails gem?

Right now we can't add a "jquery-ui.js" asset to jquery-ui-rails, because it would conflict with jquery-rails's version. (Which of the two gets picked up by Sprockets would be undefined, so that's asking for trouble.) So here's my suggestion:

* In jquery-rails:

1. Make one last 2.x release with jquery-ui.js 1.8.17
2. Remove jquery-ui.js and jquery-ui.min.js from jquery-rails
3. Bump the major version to 3.0.0-beta1 and release
4. Put a note in the README that people might need to add the jquery-ui-rails gem with the 3.0.0 beta release if they want to use jquery-ui[1]

* In jquery-ui-rails:

1. Add jquery-ui.js (copy of current jquery.ui.all.js file)
2. Depend on jquery-rails >= 3.0.0-beta1 to avoid conflicts
3. Bump the version to 1.0.0-beta1 and release

What do you think?

[1] I was thinking whether jquery-rails should depend on jquery-ui-rails so people get jquery-ui automatically. But since jquery-ui-rails adds a bunch of files (like "jquery.ui.datepicker.js") into the asset space that might conceivably conflict with user-supplied jQuery UI assets, I think it's best not to force it onto people, and instead require them to add jquery-ui-rails to their Gemfile if they want it.