Remove dependency on jquery_ui_slider

Created on 27 April 2021, over 3 years ago
Updated 5 June 2024, 6 months ago

Problem/Motivation

Remove dependency on jquery_ui_slider

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

6.0

Component

Code

Created by

heddn Nicaragua

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States joegraduate Arizona, USA

    Rebased against 6.0.x

  • 🇮🇳India libbna New Delhi, India

    I have added this patch in my composer.json file and when I run this command `composer require 'drupal/jquery_ui_slider:^2.0'` it is still showing errors

    Problem 1
    - Root composer.json requires drupal/jquery_ui_slider ^2.0, found drupal/jquery_ui_slider[dev-2.x, 2.0.0, 2.x-dev] but these were not loaded, likely because it conflicts with another require.
    Problem 2
    - drupal/better_exposed_filters is locked to version 6.0.2 and an update of this package was not requested.
    - drupal/better_exposed_filters 6.0.2 requires drupal/jquery_ui_slider ^1.1 -> found drupal/jquery_ui_slider[dev-1.x, 1.1.0, 1.x-dev (alias of dev-1.x)] but it conflicts with your root composer.json require (^2.0).

    The BEF module is d10 compatible but I am not able to update the jquery_ui_slider module.

  • 🇬🇧United Kingdom pbattino Reading

    Why has patch #14 this line:
    "drupal/jquery_ui_slider": "*",
    Isn't the aim to remove the dependency altogether?

  • 🇬🇧United Kingdom pbattino Reading

    Thanks for the explanation Bedrir.
    At this point I don't understand what the reason is for using a tool like Composer. Shouldn't each package track its dependencies only?
    If it's to avoid this:
    " This might cause problems if other modules implicitly use without depending on it."
    then I would argue we are defeating the purpose of tracking dependencies. It's the other module that is not doing its job.

    Not to mention that we may make the life harder to users who have a conflict with the no-longer-needed dependency. See the case of the BEF module above. Yes, the * allows for some flexibility but it's still an unnecessary packages added on a fresh install.

    I'm not a Composer expert, perhaps I am missing something, please correct me if I'm wrong! Thanks!

  • 🇨🇭Switzerland berdir Switzerland

    The problem is that composer dependencies are stateless while Drupal is not.

    I never talked about other *modules* in my comment. I said sites, that's something else entirely.

    If you stop depending on another module with your module, then composer will remove that from sites when they update. However, if you just remove a module from Drupal that is currently installed, then Drupal gets very, very unhappy. and at the same time, you can't uninstall it before you update because then the module still depends on it. It's a chicken/egg problem. They would need to manually require that extra dependency after updating, then uninstall it, then remove it again.

    This is a temporary backwards compatibility thing so that sites can update, safely uninstall the module and then it will just be in the filesystem and not hurt anyone. And a future version (e.g. version 7) of this module can then remove that dependency entirely. That's all.

  • 🇬🇧United Kingdom pbattino Reading

    The quote was from the explanation in https://www.drupal.org/project/pathauto/releases/8.x-1.11 , linked from your comment.

    AH Yes! Now I understand, it's because the no-longer-needed dependency is a Drupal module, if it were a non-drupal package we would not have this problem, I get it.
    Thanks!

  • 🇨🇭Switzerland berdir Switzerland

    Ah, right. The thinking there was that pathauto is de-facto installed on every drupal site, which also resulted ctools being installed everywhere, so (custom) modules might have relied on stuff provided by ctools without being aware and properly depending on it.

  • First commit to issue fork.
  • 🇧🇪Belgium tim-diels Belgium 🇧🇪

    I added connect: true, to display colored bars between handles.

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.x + Environment: PHP 8.1 & MySQL 8
    last update over 1 year ago
    30 pass, 5 fail
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 8
    last update over 1 year ago
    37 pass
  • 🇺🇸United States caspervoogt

    BEF requires jquery_ui_slider 1.1 which is not D10-compatible. When I try to require the D10-compatible v 2.0.0 of jquery_ui_slider it causeds Composer conflicts. I think BEF's composer.json should require jquery_ui_slider 2.0.0 instead of 1.1, or remove the requirement entirely, because it is preventing updating to D10.

    Related issue at https://www.drupal.org/project/better_exposed_filters/issues/3317774#com... 🐛 Dependencies affecting upgrade to v6.0 Needs review

  • 🇭🇰Hong Kong yookoala

    Please remove the dependency.

    drupal/better_exposed_filters 6.0.2 requires drupal/jquery_ui_slider ^1.1, that is not compatible with Drupal 10. This dependency is now blocking my site upgrade. If the dependency is not necessary in the first place, it is only sensible to remove it.

  • Status changed to Postponed 8 months ago
  • 🇺🇸United States smustgrave

    Going to start a 7.0.x branch for D11 and D10 support think that would be a good time for dropping any dependencies .

  • Status changed to Needs work 8 months ago
  • 🇺🇸United States smustgrave

    Started a 7.0.x branch so this can continue

  • Merge request !72Resolve #3210947 "Remove slider attempt2" → (Merged) created by smustgrave
  • Status changed to Needs review 7 months ago
  • 🇺🇸United States smustgrave

    Updated for 6.0.x and added hook to use internal library if available

  • 🇮🇳India siddharthjain

    I have tested the functionality, there is one concern after switching to this Merge request !72 , the slider value changed to float, earlier with the jquery_ui_slider dependency it was taking the integer. I have added screenshots for reference. Other than this the functionality works fine.

  • 🇺🇸United States smustgrave

    Pushed a fix

  • 🇮🇳India siddharthjain

    The above changes looks good, the slider is also working fine. Attaching the screenshot for reference.

  • Status changed to Fixed 7 months ago
  • 🇺🇸United States smustgrave

    Thanks!

  • 🇺🇸United States smustgrave

    Also has been removed from 7.0.x

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024