Problem/Motivation
Discovered while converting Unit and Kernel tests to use Default Admin. #3582093: Convert Unit and Kernel tests that use Claro to Admin
In default_admin.libraries.yml there is
# Custom CSS
admin_custom_css:
css:
theme:
public://admin-custom.css: { preprocess: false, minified: false, weight: 50 }
I don't think core should do this.
Steps to reproduce
Proposed resolution
Remove the feature
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3621981_updated_library_list_for_default_admin.patch | 512 bytes | hoxton |
Issue fork drupal-3621981
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3621981-remove-admin-custom.css-
compare
- main
changes, plain diff MR !17058
Comments
Comment #2
hoxton commentedComment #3
hoxton commentedIt sounds right thing to do. The file does not even exists first place.
Comment #4
hoxton commentedComment #5
daffie commented@hoxton: Could you create an issue fork with the changes. See: https://www.drupal.org/docs/develop/git/using-gitlab-to-contribute-to-dr...
Comment #6
quietone commentedYes, the file in question does not exist in core nor would core provide files in the public directory.
@hoxton, Drupal core no longer uses a patch workflow. I suggest you read the Contributor Guide. In particular, Create a merge request for an issue.
Comment #8
hoxton commentedthanks @daffie and @quietone for pointing out the patch file concern. I have raised a PR for same.
Comment #9
daffie commentedLooks good to me.
Comment #10
godotislateDoing some archaelogy, this functionality was introduced to Gin in https://git.drupalcode.org/project/gin/-/work_items/3179676. A similar idea was proposed for Claro in #3169297: Provide an easy method for supplying a custom css file to Claro, but that's Closed (won't fix).
We also need to remove:
Drupal\default_admin\Hook\ThemeHooks::cssAlter(): https://git.drupalcode.org/project/drupal/-/blob/main/core/themes/defaul...ThemeHooks::pageAttachmentsAlter(): https://git.drupalcode.org/project/drupal/-/blob/main/core/themes/defaul...Comment #11
hoxton commentedthanks @godotislate for pointing out the redundant use in default_admin's hook definitions.
Have updated the PR with requested changes.
Comment #12
hoxton commentedComment #13
godotislatelgtm
Comment #16
mstrelan commentedCommitted and pushed 1ed8ef5ddcd to main and 3913d9cfd2a to 11.x. Thanks!
Comment #18
quietone commentedCorrecting the related issue