As @sun notes on http://drupal.org/node/517688#comment-2029236 (in the overlay issue), some of the jQuery UI components are loaded, but not as a drupal_add_library(). The reason for that is that drupal_add_library() gets us CSS files which we would not need and would need to write lots of CSS override code (and get both downloaded to users) to make it look like we want. So we start fresh instead skipping the CSS. @sun thinks we'd be better off using the API, if the API is "fixed" to allow adding only parts of the library via drupal_add_library() in some way.

I'm not entirely sure about this (what we do is we use drupal_add_js() to add part of the library, and I don't think it is a disaster), but I'm opening this issue on his request to further discuss.

Comments

Gábor Hojtsy’s picture

Title: Libraries can only be added at once » Libraries can only be added in their entirety

Fixed title.

Gábor Hojtsy’s picture

Status: Active » Closed (won't fix)

This was discussed at many places, and we figured out that selectively adding library files causes problems when another component on the page is about to add the library again. That component would add all files, so would cause problems for the original component. So this is a won't fix. The overlay was fixed to load the whole library and override where needed.