Needs work
Project:
Drupal core
Version:
main
Component:
theme system
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 May 2019 at 08:10 UTC
Updated:
29 Jul 2021 at 12:58 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
huzookaComment #4
huzookaComment #5
huzookaComment #6
quironI reviewed and tested and looks good to me. I attach a new version with few new catches where the 'js-' class is missing
I'm wondering if https://git.drupalcode.org/project/drupal/blob/8.8.x/core/modules/langua... should be updated to the new one, as long is more functional than CSS, but not JS. I added it just in case.
Finally is not clear why in some tests is it updated to the prefixed class and some case the other one is kept. I don't change anything in tests as long looks they are passing right now.
Comment #7
wim leers🤓 Übernit: This seems out of scope to change.
✅
😨 This looks like a big BC break!— see next point 😅👍 This proves that there is no BC break: the old classes continues to exist, we're only adding new ones!
😲First reaction: wow, incredible that you thought of the selectors in tours! :D
🤔 Second reaction: The old class continues to exist, so why this change? Even if it's harmless, tours are config entities, and those are not updated automatically, so this opens a can of worms wrt updating tours that I'd rather avoid :)
All easy things to fix, once those are fixed, this will be an easy RTBC :) Nice work!
Comment #8
fhaeberleA reroll was needed to apply the patch from #6 because in the meanwhile there where some changes.
Applied all suggestions from #7. Thank you for the review! :)
Comment #9
wim leersI really wanted to RTBC this. The second point is so minor I could've RTBC'd, but the first one needs to be reverted or at least needs to be justified.
🤔 Why this change? That did not exist in #6.
🤓 Übernit: this change was probably applied by your IDE/text editor, but we should revert it nonetheless.
Comment #10
fhaeberleI corrected your suggestions! :)
The new line was introduced in #6, I also checked my IDE. Thanks for pointing that out!
Comment #11
wim leersPerfect! Ship it :) 🚢
Comment #12
alexpottI wonder if these changes are going to result in regressions for themes. It looks as some do override this markup - see http://codcontrib.hank.vps-private.net/search?text=dropbutton-wrapper&fi... - for example https://git.drupalcode.org/project/material_admin/blob/8.x-1.x/templates...
I think we need a change record here but maybe also we need to think about a different approach that is less disruptive? Going to ping @lauriii as a frontend framework manager.
Comment #13
wim leersComment #17
fhaeberleComment #19
sakthivel m commented#10 Patch Failed
Comment #20
sakthivel m commented#20 Please review the patch
Comment #22
sakthivel m commentedComment #23
andy-blumPatch #20 failed the tests and doesn't apply.
I am curious about the cost/benefit of this change. If it's such a huge potential source for BC-breaking changes, what benefits are we getting besides a separation of classes for styles & scripts? Is it still worth doing?
If the changes are still worth making, do we actually need to update the various test files that are contained in previous patches? Shouldn't xpath('//table//ul[@class="dropbutton"]/li/a') work just as well as xpath('//table//ul[@class="dropbutton js-dropbutton"]/li/a')?
Comment #24
ankithashettyJust re-rolled the patch in #20, thanks!
Comment #26
andy-blumI've never written tests, but it looks like this is failing because my assumption in #23 is incorrect.
After applying the patch in #24, line 649 fails. Line 648 is checking the dropbutton elements to count how many book pages exist and is using
xpath('//table//ul[@class="dropbutton"]/li/a')to do so. It looks like there is another instance we need to add js-dropbutton in line 659 as well.