-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
AngularJS - Remove UI-Utils library #23749
Conversation
(Standard links)
|
test this please |
@colemanw test fail relates |
Note that |
The [UI-Utils Libary](https://github.com/angular-ui/ui-utils/tree/v0.1.1) was introduced in 2014, but never used for much of anything. It remains very underutilized, and is the source of a major bug (see https://lab.civicrm.org/dev/core/-/issues/2688). Since it's abandonware, it seems best to stop using it rather than try to patch it. Fixes dev/core#2688
Have given a brief run but on drupal whereas the lab ticket was about wordpress. If somebody just wants to give a wordpress run I'd say it's mergeable. |
@colemanw I can recreate the error and this PR does fix the dropdowns. I do get some console errors as an anonymous user: |
@kcristiano I'm not seeing those errors when I test it. How about we merge this & then follow-up once we have steps to reproduce those. @civicrm-builder retest this please |
@colemanw I am OK with merging and then following up in testing/RC phase as this targets master |
…rom karama conf
[REF] Follow on from #23749 and remove refernece to ui-utils from kar…
Prior to civicrm#23749 this had been passing an object around as a string. During the refactoring it was treated as an object but still left as a string param. Now it's passed as an object.
Prior to civicrm#23749 this had been passing an object around as a string. During the refactoring it was treated as an object but still left as a string param. Now it's passed as an object.
Prior to civicrm#23749 this had been passing an object around as a string. During the refactoring it was treated as an object but still left as a string param. Now it's passed as an object.
As part of civicrm#23749 select elements using ui-jq were switched to crm-ui-select, which should have been a drop-in replacement, but it turns out it broke for widgets using ngOptions. This fixes it. Fixes dev/core#3797
As part of civicrm#23749 select elements using ui-jq were switched to crm-ui-select, which should have been a drop-in replacement, but it turns out it broke for widgets using ngOptions. This fixes it. Fixes dev/core#3797
As part of civicrm#23749 select elements using ui-jq were switched to crm-ui-select, which should have been a drop-in replacement, but it turns out it broke for widgets using ngOptions. This fixes it. Fixes dev/core#3797
Overview
Fixes the bug reported in https://lab.civicrm.org/dev/core/-/issues/2688 by removing the problematic Angular library, which turned out to be unneeded.
Before
See bug report: https://lab.civicrm.org/dev/core/-/issues/2688
After
UI-Utils removed, which fixes the bug.
Technical Details
The UI-Utils Library is a large collection of utilities. It was added to CiviCRM during the experimental phase of trying out AngularJS, but never used for much of anything, and never upgraded when new releases came out. We've only used one of it's utils (
ui-jq
, which is a simple wrapper for jQuery) and for trivial purposes that I've refactored out in this PR.The library was breaking jQuery widgets (notably Select2) by attempting to insert jqLite shims into jQuery, based on faulty logic to check if
window.jQuery
is present (which it's not since CiviCRM usesnoConflict()
mode). This bug was masked in most cases by the presence of the CMS's copy of jQuery. But the bug was manifesting on any page that lacked jQuery, such as front-end WP pages.Comments
Since it's abandonware and not needed, it seems best to remove the library rather than try to patch it.