Problem/Motivation
We deprecated most jQuery UI library definitions, and removed these from Drupal 9.x
Some library definitions were not deprecated though, because they're dependencies of core JavaScript - drupal.dialog, drupal.autocomplete etc. which have not been refactored yet. This includes jquery.ui.button jquery.ui.mouse jquery.ui.resizable jquery.ui.widget, and jquery.ui itself.
However, those core libraries like drupal.autocomplete don't have to depend on jQuery UI libraries specified in core.libraries.yml, they could instead depend directly on the components themselves, essentially merging the library definitions together.
The big advantage of this is it allows us to avoid adding to the skipped deprecation list, see #3098489: Remove deprecated jQuery UI library definitions which is where this idea developed.
This doesn't reduce our dependency on the components themselves, but it prevents new dependencies on them being added in contributed and custom modules during the 9.x cycle.
Proposed resolution
1. Where an actual core library like drupal.autocomplete depends on jQuery UI components, add the components as direct javascript and CSS file dependencies, removing the dependency on the library definition.
2. Deprecate all of the remaining jquery.ui library definitions in core, ensuring that contrib replacements exist (true for most but not all as I type this).
Remaining tasks
1. Should we do a late deprecation for 9.x removal in 8.8 and 8.9? An argument in favour is that jQuery UI is already abandoned, and we already made a big announcement about this, we're just adding more to the same change record. If not, we'd need to decide whether to add an early 10.x deprecation (since we actively want to discourage dependencies on jQuery UI) or wait until 9.1.x
2. Views UI uses jquery.ui.dialog directly, instead of drupal.dialog. This makes it harder to deprecate jquery.ui.dialog. One option is to have Views UI declare its own views.jquery.ui.dialog library that's a clone of the jquery.ui.dialog definition. Another is to rely on the skipped deprecation list for jquery.ui.dialog
User interface changes
None.
API changes
Yes, more jquery.ui library definitions deprecated.
Data model changes
Release notes snippet
The following core library definitions have been deprecated:
jquery.uijquery.ui.autocompletejquery.ui.dialogjquery.ui.draggablejquery.ui.menujquery.ui.mousejquery.ui.positionjquery.ui.resizablejquery.ui.widget
In the short term, contributed or custom modules with a dependency on these library definitions should use the contributed module versions of the libraries. However, note that jQuery UI is end-of-life, so it is strongly recommended to replace these libraries with a different solution in the longer term.
Modules that override these library definitions, or the definitions of libraries that depend on them (such as drupal.autocomplete, drupal.dialog, and drupal.tabbingmanager) may need to update their overrides to ensure the same changes to the resulting JavaScript and CSS are applied.
| Comment | File | Size | Author |
|---|---|---|---|
| #105 | 3113400-105.patch | 69.38 KB | alexpott |
| #105 | 104-105-interdiff.txt | 3.61 KB | alexpott |
| #104 | 3113400-103.patch | 71.19 KB | alexpott |
| #104 | 101-103-interdiff.txt | 1.04 KB | alexpott |
| #101 | 3113400-101.patch | 71.06 KB | alexpott |
Comments
Comment #2
catchComment #3
bnjmnmCreated contrib modules for the libraries that were not already covered by a dedicated contrib module or included in drupal.org/project/jquery_ui (mouse, widget, position, form-reset)
Added:
https://www.drupal.org/project/jquery_ui_autocomplete
https://www.drupal.org/project/jquery_ui_dialog
https://www.drupal.org/project/jquery_ui_resizable
Currently dev releases, after review and manual testing I can move to stable/promoted.
Comment #4
damienmckennaFor #2 this is already partly underway in #2158943: Add a native dialog element to deprecate the jQuery UI dialog.
Comment #5
damienmckennaThere's also #3079748: Deprecate jquery.ui.draggable.
Comment #6
bnjmnmIt's not possible to deprecate dialog or autocomplete yet as there are not replacements for those libraries. However, the libraries they depend on can be deprecated by using the approach described in the issue summary. This makes it possible to deprecate widget, mouse, button, draggable, menu, position, and resizable. All of these either have contrib modules or - in the case of position, widget and mouse - are part of the main jquery_ui contrib module.
it is also not possible to deprecate
core/jquery.uibecausedrupal.tabbingmanagerhas a dependency on it. According to a comment, this dependency is only for# Supplies the ':tabbable' pseudo selector., so this could potentially be replaced without too much headache. Tagging with "needs issue summary" for thedrupal.tabbingmanagerfollowup, and a second followup to deprecatecore/jquery.uionce tabbingmanager is taken care of.Comment #7
bnjmnmI realize I was incorrect about autocomplete and dialog -- of course those can be deprecated by using the same approach with drupal.dialog and drupal.autocomplete. It's possible drupal.tabbingmanager can even get away with using a subset of jquery.ui's assets. I'll provide an updated patch soon.
Comment #8
lauriiiCrediting @DamienMcKenna for his work on #3113250: Deprecate jquery.ui.button.
Comment #9
bnjmnmWent the route of skipped deprecation list for jquery.ui.dialog as this is the approach being used for other deprecated jqueryui libraries.
The approach of loading assets directly was also used for jquery.ui.datepicker, a library that is already in the skipped deprecation list. This makes it possible for it to not depend on core/jquery.ui -- allowing core/jquery.ui to be deprecated and not have to be added to the skipped list.
Comment #10
lauriiiI think we should limit the scope of this issue to just deprecating libraries. The deprecation warning could be backported to 8.9.x, if we get approval from release manager. The part where assets are being moved from library to another should be only committed to 9.0.x.
Comment #11
bnjmnmNo interdiff as this isn't really building off the previous patches.
Comment #12
catchIMO we should really try to avoid adding to this list in 9.0.x, it means we haven't stopped using the thing we're deprecating yet.
We could commit a deprecation-only patch to 8.8.x/8.9.x if we wanted to.
Comment #13
bnjmnmI agree with #12, which I saw just before uploading this 9.X patch that makes the asset changes so it's not necessary to add anything to the skip list.
Comment #14
lauriiiCan this be removed too?
Comment #15
bnjmnmRe: #14
core/jquery.ui.dialogis in the skip list due to a direct call to that library in\Drupal\views_ui\ViewEditForm:$form['#attached']['library'][] = 'core/jquery.ui.dialog';The issue summary mentions two different approaches to addressing this. I saw pros and cons to both approaches, but adding the skip-list option to the patch seemed like a quick way to surface it for discussion. I'm also curious if changing the views form to use
core/drupal.dialogwould work of if it may conflict with dialog.views.js, and that's why the jQueryUI library was attached directly.Comment #16
catch#3113556: Change Views UI to use drupal.dialog instead of jquery.ui.dialog is open to try to shift Views to core dialog.
Comment #17
bnjmnmThis patch removes jquery.ui.dialog from the skip list since #3113556: Change Views UI to use drupal.dialog instead of jquery.ui.dialog has landed. Also realized that it was neccessary to refactor some library overrides in Claro and Seven as they are preventing the loading of CSS assets that now come from different libraries.
Also removing needs followup - created the tabbingmanager issue a few weeks back #3113649: Remove drupal.tabbingmanager's jQueryUI dependency
Comment #18
xjmSo, overall, this seems like a good idea and is probably what we should have done in the first place.
The one thing I'm not totally sure of though is removing the library definitions from Drupal 9 so late relative to when they're being deprecated. Maybe we should deprecate them for Drupal 10 instead? We could still backport it to 8.9.x (like we are doing for theme functions) to make noise at people if they do use them, but without actually having a last-minute BC break.
I'm somewhat on the fence; there's also obvious value in doing this before 9.0. Just not sure we should given that 8.8 should have been the cutoff (and furthermore already was for 3/4 the libraries).
Comment #19
lauriiiSomething to take into account here might be that solving these deprecations is quite easy. Modules relying on jQuery UI only have to define dependency on the contrib modules and change their libraries to depend on the contrib project libraries instead of core.
Comment #20
catchThe contrib modules also already exist and have done for a month or more, so I think we can remove in 9.x if we want to be more aggressive, it's just a case of which trade-off we choose.
Comment #21
xjmIt's beta deadline if it's 9.0.x.
I'm still leaning toward just changing the deprecation to Drupal 10 though.
Comment #22
jedgar1mx commentedIt makes sense to move the library dependency to the modules and out of core. My only concern would be with people that relatively new to Drupal theming and require jQuery from Core on their libraries.yml file. It might be difficult to debug sudden breaks.
Comment #23
xjmMoving to 9.1.x since this was beta-deadline. We'll deprecate these in D9 for D10 removal. :)
@jedgar1mx, agreed! That was my feeling too. The goal of the continuous upgrade path is to give people at least one minor release to prepare for the BC breaks that come with the major release.
Comment #24
catchHere's a re-roll for 9.1.x. Had to re-roll the seven.info.yml bit (doesn't show in interdiff) and also updated the deprecation message.
Comment #26
catchBumping to critical, this needs to happen during Drupal 9 so we can remove the definitions in Drupal 10 once it's open.
Comment #27
bnjmnmWorking on the test fails, which exposed the need to provide additional asset loading weights now that the order for some assets are no longer enforced via
dependencies:Comment #28
bnjmnmHad to add several explicit asset weights which had previously not been needed since
dependencies:always load first in a library.Comment #29
catchDo we want to leave a gap between these weights just in case someone wanted to alter the definition to add a file in-between?
Comment #30
bnjmnm#29
That crossed my mind as well. My thought was adjacent weight values would best reproduce the behavior that was present when these assets were loaded as dependencies, where weight-specific flexibility was not available, just a guarantee that the dependency would be available before the library assets. This also best replicates how jQuery UI works when used with AMD instead of splitting it into Drupal libraries, which doesn't offer this level of control.
If this doesn't seem like a problem and would be considered in-scope/commitable, I certainly have no objection to providing users more flexibility.
Comment #31
catchThat's a good point, if we're not losing anything I think we could leave it as-is.
Comment #32
catchGiven #30 I think this is RTBC.
Comment #33
catchI originally added the need release manager review tag to try to squeeze this in during Drupal 9.0.x beta, but now we're back to a regular minor schedule it's more of a normal patch.
Comment #34
lauriiiWould be good to have a change record explaining the implications of this change including changes needed for library override implementations.
Comment #35
catchAdded a change record.
Comment #36
lauriiiI have some concerns that this could cause regressions to sites that are explicitly overriding or extending libraries that will no longer be loaded. Based on the tests in #3064017: Create a means to mark an asset library as deprecated in a *.libraries.yml file, I'm not sure if we display a warning in the case where deprecated library is being overridden or extended without it being loaded. Fixing that could be a separate issue, but we should probably try to take these use cases into account on the change record and release notes. I'm not sure if that issue should be blocker to this.
Comment #37
catchhttps://www.drupal.org/node/3156376/revisions/view/11974190/12017012
Comment #38
catchI've updated both the change record and the release note to try to make this issue more explicit.
Comment #39
lauriiiThe change record looks better. Can we still get a follow-up for the runtime deprecation warning?
Comment #40
catchOpened the follow-up #3163500: Detect when libraries-override or libraries-extend is used on deprecated library. I think that means this can go back to RTBC.
Comment #41
lauriiicore/jquery.uiwhich is not being loaded anymore because it's not dependency of the autocomplete or dialog libraries. As a result, styles for both of these are broken in both themes. This is something we were not able to catch with our testing because we don't show deprecation warnings for libraries-override and libraries-extend. After this, I'm pretty convinced we should postpone this issue on #3163500: Detect when libraries-override or libraries-extend is used on deprecated library.Could we add this type of documentation to all libraries that have jQuery UI libraries added.
Why are we changing the weight of this asset?
Nit: extra space before weight property
Comment #42
catchGiven #1, let's postpone this on #3163500: Detect when libraries-override or libraries-extend is used on deprecated library. #2-4 are still actionable here if someone wants to update the patch too.
Comment #43
catchJust committed #3163500: Detect when libraries-override or libraries-extend is used on deprecated library. @lauriii's review points from #41 still need addressing.
Comment #44
catchComment #45
sarvjeetsingh commentedI have just fixed the extra spaces before the weight property as suggested in #41.
The other points of #41 still needs to be addressed.
Comment #46
ayushmishra206 commentedTriggering the test bots for review.
Comment #47
ayushmishra206 commentedBack to NW for changes suggested in #41
Comment #48
lauriiiComment #49
ankithashettyRe-rolled the patch in #45... Retaining the status as "Needs work" for the changes suggested in #41. Thanks!
Comment #50
bnjmnm#41.1 Once #3163500: Detect when libraries-override or libraries-extend is used on deprecated library landed, errors were exposed. These have been addressed by having the themes extend non-deprecated libraries that include assets that the extension is indended to be paired with.
#41.2 Good call, added explanatory docs to all non-jquery/UI libraries importing jqueryUI assets
#41.3 The asset weight is changed because the assets with -11 weights require it to be present to work properly, confirmed by seeing the
define()calls in a given asset. Some tests were failing until the weight was changed in some libraries. Not every library needed this weight adjustment for the tests to pass, but they were all changed for consistency and the code itself expecting it to be available.Comment #51
lauriiiI started looking at the asset weights and there are still some instances where a dependency doesn't have lower weight. I think we should go through all of the weights and ensure that weights always have lower weight. We should also ensure that the weights are consistent across different libraries because each file is only loaded once. Based on
Drupal\Core\Asset\AssetResolver::getJsAssetsthe assets are sorted after duplicates are removed.Comment #52
bnjmnmI charted it out and used that to determine the dependency relationships

There are six groups
The weights relative to one another should be fine now. It's possible the overall weights can be moved closer to 0, I don't recall why those specific high/low weights were chosen when the patch was added 6mos ago. There may have been a good reason, but I'm not sure.
Comment #53
lauriiiThank you for creating that chart @bnjmnm! It clarifies the weights a lot. We should probably also apply weights on CSS files. Some elements could receive rules from multiple files, and in those scenarios the weight could have an impact how the element is rendered.
Comment #54
bnjmnmWeights are now applied to CSS as well.
Comment #56
lauriiiI can’t help but feel that we need some tests here because the only way to test that the patch is correct would be to write some test code to load different variations of the libraries and ensure that they are loaded in correct order. Automating that would be more reliable and would at the same time ensure there aren't regressions.
Comment #57
bnjmnmAgree with #56 that tests are needed, so I added some.
Comment #59
anmolgoyal74 commentedUpdated CS issues.
Comment #60
catchShould probably have a test-only version of #57 to show it passes without the changes here too, since it's testing that nothing changes.
Comment #61
bnjmnmThe current set of tests won’t work without the other changes in the patch, but I see the value in an additional test that confirms consistent losing before/after. I can add that in a day or two. If anyone is eager to see it sooner and wants to work on it, it’ll help if they can assign the issue to themselves so there isn’t overlap.
Comment #63
bnjmnmComment #64
bnjmnmAdded a new test within the new test Class -
testAssetLoadingUnchanged, this is the only test that the test-only patch runs. It checks to make sure the same assets are loaded before and after the refactoring in this issue. The before/after tests do not include load order as there's not a 1:1 relationship. With the dependency approach, files are present within that dependency before any tasks begin, so the load order of individual files is less important. With the individual file approach here, weights have to be assigned more deliberately, based on the findings in #52.testLibraryAssetLoadingOrder()and
testSameAssetSameWeight()cover the explicitly set weights that were previously unnecessary due to dependencies dictating load order.Comment #65
lauriiiNit: I think the correct spelling is jQuery UI.
Is this testing something that isn't covered by
::testAssetLoadingUnchanged()?Couldn't this be simplified to
$this->assertSame($js_loaded_by_page, $expected_js);?Comment #66
bnjmnm#65(1) nit squashed
#65(2-3) These are both due to that specific test being designed to work in a test-only patch, as the other tests in the class will not work without the changes here. This makes it possible to confirm the same assets load before/after the changes. The assets load in a different order so
assertSame()can't be used. The orders won't be identical as prior to the changes here, individual jQuery UI assets didn't need to have weights assigned to them as declaring their library as a dependency provided availability assurances that aren't there when loading every file individually.I revised+added some comments in hopes of making this a little clearer.
Comment #67
lauriiiI'm wondering if should split this into two issues: one where we add weights that result with the same loading order (this issue) and another issue where we make changes to the loading order based on on #52.
Comment #68
bnjmnmSeparating these would result in functionality-breaking JavaScript errors until the second issue was completed. This is why changes to the weights were introduced in #28. Among other things, every js asset in
core/jquery.ui:has a weight of -11, yet every js asset requiresersion-min.jsto work properly. This is not an issue whencore/jquery.ui:is declared as a dependency of another jquery ui library. When a library that previously depended oncore/jquery.ui:loads those assets as individual files, the weights become necessary to avoid "version is not defined" errors.Comment #69
bnjmnmDiscussed this with @lauriii and clarified why this can't be broken into separate issues.
Currently
core/jquery.uihas all JavaScript assets configured with a weight of -11. Despite all being confgured with the same weight, some of these assets depend on other ones within the library to function. Giving them all the same weight is not a problem whencore/jquery.uiis loaded as a dependency, the assets are not invoked until the full library loads. When the files ofcore/jquery.uiare added directly, specific weights have to be assigned, or else errors will occur due to files such as the invoking of widget-min.js before version-min.js (which it depends on) has loaded.This patch adds an additional test which will be explained in this summary of all tests added.
testProperlySetWeightsCompares the asset weights configured in core.libraries.yml to the loading order requirements identified in #52testSameAssetSameWeight()Is necessary since multiple libraries now include the same jQueryUI files. This confirms that each file inclusion is set to the same weight.testLibraryAssetLoadingOrderConfirms that the configured weights of assets result in the expected loading order on an actual page, regardless of the library/libraries loaded on the page.testAssetLoadingUnchanged() is the one test that can be run as a test-only patch. It confirms that the changes in this issue did not alter the files loaded for a given library/libraries. It only checks for the presence of these assets as the order they are loaded in can't be compared due to the need to add more specific weights when loading assets directly instead of within a library dependency.Comment #70
nod_we can also use floats for weights, keeping all the files weights between -12 (excluded) and -11. That way other scripts can still work based on the assumption the library has a -11 weight.
I'm not too happy about adding that many weights, we tried to get rid of them as much as possible before #1945262: Replace custom weights with dependencies in library declarations; introduce "before" and "after" for conditional ordering
Comment #71
catchUsing floats per #70 is a good idea, less likely to break something else.
While the weights are ugly, this is all code we can remove as soon as we drop depending on jQuery UI.
Comment #72
bnjmnmGood call on the floats! This implements it.
Comment #73
zrpnrIt's so nice to finally see that deprecated message on all those jQuery UI libraries.
Amazing work tracing out the weights and mapping the dependencies @bnjmnm!
The chart you made helped me understand how you picked the various weights: 11.9, 11.8 etc.
This reminds me of the detailed dives in #2926155: Follow-up to #2809427: update from jQuery UI 1.11.4 to 1.12.1 forgot to list some new JS files in *.libraries.yml.
The load order on a page is now changed from 9.2.x, but I didn't notice any changes in how autocomplete or dialog functioned.
I think this is related to what you are saying in #66 and #68.
In the network panel I can see
version-minloading first now.+1 to this, I also think the use of floats really helps here to "group" all these assets.
Why did you inline all the dependencies for
core/jquery.ui.dialogbut not do the same for other libraries that usecore/jquery.ui.widgetorcore/jquery.ui.position?Dependencies were left unchanged in jquery.ui.autocomplete and jquery.ui.menu.
I guess it doesn't make a difference since those libraries are no longer dependents of anything else in core?
Checked over drupal.autocomplete and drupal.dialog and they include all the files from all the previous dependencies.
I just found a couple small nits, this looks great otherwise.
Since you're using a js file here for the override, for consistency the path should be changed from
my_theme/csstomy_theme/jsas well.Both in the test and in
test_theme.info.yml.spelling: should be "pseudo"
Comment #74
bnjmnmAddresses #73
Comment #75
nod_Looking good.
One minor thing is that the order or files is "upside down" compared to the loading order on the page.
-11.9is "lighter" than-11.4so -11.9 should be at the top of the list and -11.4 should be at the bottom of the list.On the page the order is correct, it's just for maintenance sake. Given that the next time we touch those lines it's to remove them I'm not worried about it.
Patch will conflict with #3113649: Remove drupal.tabbingmanager's jQueryUI dependency.
Comment #76
alexpottDo we not need to leave a deprecated library in to be removed in Drupal 10? The issue summary says it is deprecated but AFAICS we're now removing it. Also shouldn't jquery.ui.draggable be part of the tests.
Can be protected - not part of any public test API.
Dataprovider in a BrowserTestBase - I've checked locally how long this takes for me 1.75 minutes... I guess that's okay.
cire = core?
Spelling: necessary
Comment #77
bnjmnmAddresses #76
Item #1 correctly pointed out that draggable shouldn't be removed. I could see how that snuck by based on what accompanied it in the dfiff, but that was unintentional and has been taken care of.
Comment #78
alexpottI think
jquery.ui.draggableneeds to be added to JqueryUiLibraryAssetsTest - no?Comment #79
bnjmnmDraggable doesn’t need to be added to the test as it didn’t require converting library its dependencies to direct file inclusion. The dependencies-to-files refactoring is only necessary for libraries still used by core so they could avoid declaring deprecated libraries as dependencies.
The test does cover libraries that previously depended on core/jquery.ui.draggable that now consume that library via direct file requests. The library itself is now unused as a result, so it only require a deprecation message.
Comment #80
alexpott@bnjmnm but then we have no test to prove we've not removed it be accident. And with the changes here if we break it in some subtle way we'll never know.
Comment #81
bnjmnm#80 makes a good point why those other libraries need coverage. They don't need tests as extensive as the ones in
JqueryUiLibraryAssetsTestsince they aren't being refactored, just deprecated, so those were put in a lower-overhead Kernel test. I also moved theJqueryUiLibraryAssetsTestout of system so it was in the same neighborhood as the added test.Comment #82
alexpottThis looks like it got deleted accidentally.
Comment #83
suresh prabhu parkala commentedPlease review!
Comment #84
bnjmnmAddressing #82 and working from #81
Comment #85
zrpnrThis was RTBC in #75, the problems pointed out in #76 are now fixed:
The actual changes from #77 to #81 are:
moving
core/modules/system/tests/src/Functional/Libraries/JqueryUiLibraryAssetsTest.phptocore/tests/Drupal/FunctionalTests/Libraries/JqueryUiLibraryAssetsTest.php(no code changes in
JqueryUiLibraryAssetsTestexcept for updating the namespace)and adding
core/tests/Drupal/KernelTests/Core/Asset/DeprecatedJqueryUiAssetsTest.phpThis new test has hashes for all 10 jQuery UI library definitions so a change to any of those will cause it to fail.
#82 caught a mistakenly removed file, #84 restored it.
looks good to me!
Comment #86
lauriiiWe should make supported releases on the replacement modules. That allows people to start updating their code to rely on those modules after this has been committed. We should also update all of the module descriptions and https://www.drupal.org/node/3067969 to include the libraries deprecated here.
Nit: the name should be written consistently as jQuery UI
Comment #87
bnjmnmPatch addresses #86.2
I created supported releases of the new modules, and updated the related modules list on every module other than jquery_ui and jquery_ui_datepicker, which I'm not a maintainer of. For those I created issues for them to update the list:
https://www.drupal.org/project/jquery_ui_datepicker/issues/3186323
https://www.drupal.org/project/jquery_ui/issues/3186319
Comment #88
zrpnrUpdated those two project pages and added you as a maintainer @bnjmnm
Comment #89
zrpnrThese 2 lines are still not showing the correct capitalization asked for in #86
found one more.
Patch still applies cleanly to 8.2.x, should be good to RTBC after these small nits are addressed.
Comment #90
bnjmnmThanks @zrpnr!
Once the pandemic is over I'll look into getting professional help for my bad jQuery UI capitalization habits 🙂
Comment #91
bnjmnmMy name is @bnjmnm and I have a problem with correctly capitalizing the letters in jQuery UI.
Comment #92
zrpnrDon't be too hard on yourself @bnjmnm ! Those are tough to search for :)
I looked again and those last 2 you fixed in #91 were the only ones I noticed.
I think this is good to RTBC but I'll wait for the tests to finish.
Comment #93
zrpnrPutting back to RTBC
Comment #94
alexpottCommitted 42da50d and pushed to 9.2.x. Thanks!
Comment #96
alexpottUnfortunately I have to revert because this has broken HEAD - see https://dispatcher.drupalci.org/job/drupal8_core_regression_tests/32220/... for example.
It appears that something about the library info is non-determinate so that different systems can generate different hashes... unfortunately I've not managed to reproduce this fail locally on any environment (php 7.3, 7.4. or 8.0 and sqlite or mysql) so I've got no choice but to revert :(
Comment #98
alexpottI've also tried with and without the pecl yaml extension.
Comment #99
alexpottLet's see what drupalci can show us...
Comment #100
alexpottDiDn't get that right... should have checked the docs first.
Comment #101
alexpottThird time lucky lol
Comment #102
alexpottSo it's the floats... locally for me they look something like this in the serialize string
d:188.2... but on DrupalCI they look like...d:188.19999999999998863131622783839702606201171875Comment #103
lauriiiThe problem is probably that locally you have
serialize_precisionset to the default value of-1whereas DrupalCI has it set to100.Comment #104
alexpottGreat catch @lauriii
We can set this in the test to fix this. Also we probably want to find out why CI has that set to 100. But that can take place separately.
Comment #105
alexpottAttaching services to test classes has caused enough issues for it to be bad practice. If a container rebuild happens during the test they get out of date.
Fixed this in the attached patch.
Comment #106
lauriiiChecked interdiffs in #104 and #105 and both look good for me. ✌️
Comment #107
alexpottCommitted 1c20159 and pushed to 9.2.x. Thanks!
Second time lucky.
Comment #110
xjmHad a chat with @lauriii earlier today about this issue and other jQuery UI deprecations, and it sounds like we might have underestimated the disruption a bit. Reopening and tagging so I can follow up with @catch about this. Thanks!
Comment #111
xjmThis also definitely needs to be in the release notes, so tagging accordingly. Also updating the release note to make it clear that the contrib modules are only a temporary fix.
Comment #113
gábor hojtsyThis was released in the 9.2.0-beta so would be too late to revert I think either way.
Comment #115
codebymikey commentedThe
1c20159commit/update seems to have broken integration with Gutenberg #3219569: Stuck loading Gutenberg (JS errors) when using Gutenberg with Drupal 9.2, I tried to isolate the bug into a repeatable test module, but I'm not as familiar with the Drupal library/weight architecture and code.From my investigation into the issue, the bug is definitely related to the weight/asset order of the library, and is only made apparent because the Gutenberg module introduces a lot of JavaScript files in its dependency tree which causes the weight of the
AssetResolver::getJsAssets()to shift significantly in some manner becausecount($javascript)is much larger than what is typically expected from core Drupal site installs.