Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an admin UI for control over which libraries (& versions of) are in use #462

Closed
jenlampton opened this issue Dec 16, 2014 · 8 comments
Closed

Comments

@jenlampton
Copy link
Member

As a follow-up from #159

It would be handy if we could build an admin UI that listed all available libraries, and the versions that are both available and in use. We could have something like the modules page that provides admins the ability to toggle them each on and off.

We could either start from porting the libraries module from Drupal to Backdrop, build something that works like the jQuery Update Drupal module, or start fresh with our own admin UI for managing these things.

Whatever approach we take, I'd like to see the solution mature in contrib before it gets moved into core. I'm going to mark this issue as postponed for now, but please add a comment linking to the backdrop contrib project and remove the tag when we're ready to consider this module for inclusion in core.

@klonos
Copy link
Member

klonos commented Apr 3, 2015

Related: jQuery Update provided an admin UI for selecting which version of jQuery would be used for the website and at some point they've added the option to select a different version of the jQuery for the admin pages in the backend (because some pages/elements/features would break when using specific versions of jQuery). Here's how their 2.x config UI looks like:

jquery_update-2 x_settings

With their latest 3.x version, they still allow to set a site-wide version, but the fallback to a different version was converted to a theme-specific option to account for other installed themes as well:

jquery_update-3 x_settings

Given the fact that our version of jQuery is updated and we fixed any known issues or will fix any issues that come up (because they'll be core bugs), what are our intentions with regards to this specific library?...

  1. Do we intent to provide CDN support and/or compression options? Some people use these for increased speed.
  2. Do we promise to keep up to date with the latest version (and fix any UI issues that updating may cause)? I mean, being in core and all.
  3. What is our policy with regards to contrib themes that use this library? I mean, if updating the version that we ship with core breaks them, how do we handle that? Do we consider this a contrib issue and let the project deal with it, or do we ship a few (latest minor) versions back and provide a UI similar to the one that jQuery Update provides (so that users of these themes can select to fall back to them)?

@klonos
Copy link
Member

klonos commented Apr 3, 2015

...with regards to point 2 above, we do have "Updated jQuery and jQuery UI" listed as an improvement over D7 in our home page.

@quicksketch
Copy link
Member

Do we intent to provide CDN support and/or compression options? Some people use these for increased speed.

Not in core I don't think. Shared CDN library loading is a bit of a double-edged sword.

Do we promise to keep up to date with the latest version (and fix any UI issues that updating may cause)?

We'll update jQuery within the current main branch (1.x) of jQuery to accommodate for bug fixes, yes. We have yet to see what the next versions of jQuery will bring. Now that they have adopted semantic versioning, the next version of jQuery will be 3.0. It's not clear how significant the changes in the next version will be.

if updating the version that we ship with core breaks them, how do we handle that?

If possible, I'd like to keep core up-to-date and use a contrib module to provide the old versions. So instead of jQuery Update, we'd have a jQuery Downgrade contrib project.


For this entire proposal, I'm not sure a UI for this is a good fit for core. Modifying your library versions is something that's very likely to break modules or themes. It shouldn't be up to the end-user to figure out which library versions to use (or be allowed to change them). The core and contributed modules using the libraries should ensure they have compatible versions or refuse to function entirely.

@klonos
Copy link
Member

klonos commented Apr 11, 2015

Fair enough. Now that I thought this over and after your remarks, a UI for jQuery + CDN support + older versions does seem more fitting in contrib land. I think jQuery Legacy sounds better than Downgrade though 😉

@klonos
Copy link
Member

klonos commented Apr 11, 2015

...does this though mean that this whole issue is a won't-fix?

@jenlampton
Copy link
Member Author

I think so. If we get a UI proven in contrib we can open a new issue to move that into core :)

@klonos
Copy link
Member

klonos commented Apr 12, 2015

Once again, fair enough.

@mikemccaffrey
Copy link

I created #1593 to discuss the issue of whether there should be a UI in core to allow libraries to be served from CDNs if desired, which might also include the ability to select different versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants