Closed (fixed)
Project:
Drupal core
Version:
10.3.x-dev
Component:
javascript
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
15 Jul 2022 at 05:05 UTC
Updated:
1 May 2024 at 15:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
catchComment #5
andypostComment #6
catchI think this is causing #3420713: Nightwatch tests fail with "unsupported pseudo: tabbable" after jQuery 4 update and hence blocking jQuery 4, bumping to critical.
Comment #7
catch#6 is wrong, maybe the last :tabbable usage got fixed in the meantime.
pretty sure the nightwatch error on jQuery 4 is the shim itself, so we should close this in favour of removing the shim. Marking as outdated.
Comment #8
catchNope #6, is right... MR coming up.
Comment #10
catchComment #11
andypostlinting failed
Comment #12
catchYeah I've messed something up between copying the method over/tabbable conversion/linting fixes.
Comment #15
finnsky commentedIt was easier for me to start from scratch. Please review
Comment #16
finnsky commentedSomething wrong happends with off-canvas
https://gyazo.com/b264ef37eb621d29a8ffb47807817494
Comment #17
finnsky commentedThis Fix doesn't look like `hot` anymore
https://jqueryui.com/upgrade-guide/1.12/#deprecated-dialogclass-in-favor...
Pushed fix for off-canvas. But dialog.js still has this option
* @prop {string} [dialogClass='']
Probably better to test it
Comment #18
finnsky commentedComment #19
gábor hojtsyIf the class placement changes are good, the
Drupal\Tests\system\Functional\Ajax\OffCanvasDialogTesttest also need the same fix you already did incore/tests/Drupal/Tests/Core/Ajax/OpenOffCanvasDialogCommandTest.Comment #21
finnsky commenteddialogClass
is attached in ignored code:
https://git.drupalcode.org/project/drupal/-/blob/11.x/core/assets/vendor...
so probably all places with deprecated dialogClass should be rewritten(checked at least)
Comment #22
finnsky commentedI've replaced dialogClass usage. We also need to deprecate it in dialog.js somehow.
Some dialogs works wierd. Good testing required here.
Comment #23
catchDown to a single fail in the pipeline in workspaces now, but it looks like workspaces is already updated in the MR?
I think we should probably go ahead here with a CR once that is fixed? The changes look fine, the main issue is notifying contrib about the dialogClass change, but breaking contrib with 11.x alphas because we updated to jQuery 4, is more notification for contrib than we currently have which is nothing. We can even grep contrib and open individual issues or open a rector/project update bot issue to look for it..
Comment #24
finnsky commentedI've checked. Test is correct. Workspace module not attaches class. And broken now
Class appears in inline dialog options. but seems not rendered well.
https://gyazo.com/a701b6f34ee13beb41bfe61794dc63f2
Seems error in off canvas backend.
Comment #25
catchI think we should commit this to unblock the jQuery 4 update, and then open a follow-up to figure out what to do with dialogClass. It seems to me that we should remove it from our 11.x fork altogether, and trigger a deprecation (if possible) when it's used in 10.3.x - but not sure how feasible that actually is between jQuery UI and our JavaScript deprecation support.
Comment #26
smustgrave commentedSeems @catch has done the review
Opened #3440676: [backport] Trigger a JavaScript deprecation error for dialogClass in forked dialog.js per #25.
Will go ahead and mark.
Comment #27
catchLooked at this a bit more and the PHP-level deprecation should be straightforward, I've pushed a commit for this.
Assuming that's OK, after 11.x commit, we'll want a 10.3.x MR here with the changes to the dialog command, without any of the js changes.
I think we can keep #3440676: [backport] Trigger a JavaScript deprecation error for dialogClass in forked dialog.js open for what to do with dialogClass in the forked dialog js itself.
Comment #29
catchThe 10.3.x bc/deprecation layer is working, in that tests pass - apart from a couple of test failures due to the new deprecation being triggered.
So if we clean up the dialogClass usages in the 10.3.x branch the same as the 11.x branch, we should get to green on 10.3.x too. Waiting for a full run to finish that only has those deprecation failures before doing that though.
Comment #30
catchJust realised after doing all that, there is probably no harm in backporting the dialog.js changes to 11.x, given that the deprecation/bc layer works. However we can maybe go ahead with the current approach then open a js backport issue, since that's less urgent.
Comment #31
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #32
catchComment #33
nod_couple of questions in the 10.3 branch, the 11.x is good to go IMO
Comment #34
amateescu commentedPosted a few comments on the 11.x MR. Otherwise this looks good to me :)
Comment #35
smustgrave commentedFeedback from @nod_ appears to be addressed.
Updated the CR slightly to include a before/after snippet, I find it helpful but feel free to remove if it's clutter.
Comment #40
nod_Committed 66c3914 and pushed to 11.x. Thanks!
Feels weird to commit 2 different patch for 2 branches that's what it is :)