Postponed on #3115223: Remove Stable as a base theme of core themes
Problem/Motivation
The issue #2402165: #theme => 'links' renders <li class="_"> when the #links array is not associative removed the ability to add classes to list items in #links via the array key. This is detailed in the change record. This had some unwanted side effects that weren't apparent until the BC layer in Stable was no longer available to core themes in #3115223: Remove Stable as a base theme of core themes
The issue focused on a bug that occurred when #links items were not associative: the list item would include class="_". However, the issue did not take into account that core has existing code that relied on this functionality.
At least one use case is clearly impacted by this, which was discovered in #3115223, and discovered while manually testing System Tray. Core has several CSS rules including the selector #drupal-off-canvas td .dropbutton-single li.edit (and children of this selector). The .edit class in this selector is added via the keys-become-classes functionality that was removed in #2402165. This is an item added to #links in \Drupal\menu_ui\MenuForm::buildOverviewTreeForm as '#links' => $operations. There is an $operations['edit'] and there is styling that assumes an .edit class will be added.
The result is you get this weirdness:

Instead of the nice pencils:

The BC layer was labeled as deprecated, but it shouldn't have been because there is still core functionality that depends on it.
Proposed resolution
Remove the BC workarounds added to the .theme files of Bartik, Claro, Seven and Umami in #3115223: Remove Stable as a base theme of core themes.
To fully address, it may require finding everywhere an associative array is used for #links and make sure those array keys are added as classes instead. It's also possible it can only be changed as needed.
Remaining tasks
Implement the proposed resolution
Address the @todo items referencing this issue.
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | interdiff_8-9.txt | 727 bytes | ranjith_kumar_k_u |
| #9 | 3120962-9.patch | 4.14 KB | ranjith_kumar_k_u |
| #8 | 3120962-8.patch | 3.73 KB | longwave |
Comments
Comment #2
xjmThis isn't actually posptoned on anything, right?
I'm guessing this would be a minor-only change. Since 8.9.x and 9.0.x are now in beta, I'm moving this to 9.1.x. Thanks!
Comment #3
mherchelComment #4
mherchelComment #8
longwaveDifficult to know if anything will break without manually testing everything, but if we can't remove this now, when can we?
Comment #9
ranjith_kumar_k_u commented