Problem/Motivation
The Default Admin theme was forked from Gin and still contains implementation-facing gin and claro names. These occur in CSS classes and selectors, JavaScript files, behaviors and object identifiers, once() IDs, settings and local-storage keys, PHP and Twig output, comments, documentation, filenames, and test fixtures.
This issue is the canonical implementation issue for removing or deliberately retaining those references. This is not a blind text replacement: identifiers and selectors may be coupled to rendered markup, persisted browser state, contributed code, accessibility behavior, and compiled CSS.
Related work
- #3576494 remains the active tracking meta.
- #3576496 transfers its remaining Claro requirements here before becoming a duplicate.
- #3611446 transfers its top-bar, breadcrumb, accessibility, high-contrast, and visual-regression requirements here before becoming a duplicate.
- !14967, !15233, and !16340 are reference inventories and must not be cherry-picked wholesale.
Proposed resolution
Create a new MR from current main. Use the related issues and MRs as inventories of prior work, decisions, and contributors, then implement and test the cleanup against current code.
Adopt a consistent Default Admin namespace for theme-owned identifiers. Before renaming anything externally consumable or persisted in a browser, determine its compatibility surface and provide an appropriate transition. This may include a temporary alias, reading and migrating an old local-storage value, supporting an old settings key during a defined transition, or retaining an intentionally documented name.
Maintain an explicit reviewed allowlist of legitimate remaining Gin and Claro references. Every entry must state why it remains, such as an upstream project name or URL, historical attribution, compatibility identifier, or required external reference. Remove or rename every non-allowlisted implementation reference.
Remaining tasks
- ☑ Create a fresh branch and MR from current
main; do not cherry-pick !14967, !15233, or !16340 wholesale. - ☐ Preserve contribution credit for substantive investigation, design, review, and implementation from the related issues and MRs.
- ☑ Inventory
ginandclaroacross source, generated assets, tests, fixtures, comments, and documentation. - ☑ Add an allowlist with a rationale for every legitimate remaining reference.
- ☑ Audit and rename JavaScript files, behavior names,
Drupalobjects/classes,once()IDs, event identifiers, selectors, and comments that are Default Admin implementation details. - ☑ Audit JavaScript settings and local-storage keys; implement migration or compatibility behavior for persisted or externally consumed values.
- ☑ Update PHP preprocess output and Twig markup together with coupled JavaScript and CSS selectors.
- ☐ Preserve top-bar and breadcrumb presentation while replacing inherited implementation hooks with semantic or Default Admin hooks.
- ☑ Confirm correct landmark semantics and accessible names.
- ☐ Confirm breadcrumb labeling, keyboard behavior, focus treatment, and semantics.
- ☑ Update PCSS sources and compiled CSS together.
- ☑ Audit keyframes, custom properties, classes, attributes, selectors, and selectors used by PHP, Twig, or JavaScript.
- ☑ Update PHP classes/methods, settings labels, defaults, Twig templates, libraries, filenames, comments, and documentation where appropriate.
- ☑ Review public or semi-public names before changing them; document compatibility or intentional retention.
- ☐ Add or update tests for PHP, Twig, JavaScript behavior, settings, and migration/compatibility paths.
- ☐ Update VRT baselines only after confirming intended presentation is unchanged.
- ☐ Test high-contrast modes, focus indicators, borders, contrast, and top-bar/breadcrumb rendering.
- ☐ Test common administrative pages and interactions, including autocomplete, details, tableselect, tabledrag, media selection, sticky actions, navigation, top bar, and breadcrumbs.
- ☐ Verify landmarks, labels, focus order, keyboard operation, and contrast.
- ☐ Run relevant linting, unit/functional tests, JavaScript tests, and VRT.
User interface changes
No intentional visual regression is expected. Internal hooks may change, but presentation and interaction behavior must remain stable. Revised semantic markup or Default Admin hooks for the top bar and breadcrumbs must preserve their appearance, high-contrast support, and accessible navigation experience.
Introduced terminology
- Default Admin namespace: identifiers owned by the Default Admin theme rather than inherited Gin or Claro names.
- Allowlist: reviewed legitimate remaining Gin or Claro references and the reason each remains.
API changes
Potentially. JavaScript behaviors and objects, settings, local-storage keys, CSS classes, and Twig markup may be consumed externally. Assess each before renaming. Any externally consumable name that changes needs documented compatibility handling or an approved breaking-change decision.
Data model changes
None expected.
Browser local storage is persisted client-side state, not configuration. Renamed keys must be migrated, read compatibly, or intentionally reset with documented reasoning.
Release notes snippet
None expected.
| Comment | File | Size | Author |
|---|
Issue fork drupal-3605702
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:
Comments
Comment #2
quietone commentedComment #3
quietone commentedSorry, wrong parent
Comment #4
jurgenhaasI've updated the IS and will now start implementing this.
Comment #6
jurgenhaasThis is a massive MR with 173 changed files. But all within default_admin only. And a first manual test doesn't show any regressions. If anyone wants to cross-check, this is the time to get started. I'll continue with tests and the likes in the meantime.
Comment #7
mherchelI'm guessing this should be set to NR?
I'll be taking a quick look at this in a bit.
Comment #8
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 #9
jurgenhaasFixed the merge conflicts. Setting back to NR as @mherchel did before the bot switched it back. However, before you move this even further, there are still outstanding tasks in the IS that I'm going to address asap. Mainly tests and cleanup.
Comment #10
mherchelJust went through and left a bunch of comments. The gist is that in most of it, we can remove the
default-adminprefix.The reasoning is that Gin had to worry about namespace conflicts in places that we do not. I'd like to err on the side of simplicity.
Comment #11
jurgenhaas@mherchel I've implemented your suggested changes. I took your "the gist is that in most of it ..." was meant to not only your specific suggestions should be updated, but that there's a pattern to follow. That's what I've done. Please have another look.
After that, let's discuss the list of remaining tasks in the IS, and what part of the incomplete ones should be done here vs. in follow-ups.
Comment #12
mherchelDid another pass, and still needs some work. Haven't visually tested yet.
Comment #13
jurgenhaasHere is another round of cleanup.
Comment #14
mherchelSpent over an hour looking at this, and it's good. Although I don't want to RTBC (so I can commit).
Note there are some differences when running visual regression, but they actually fix the bugs!
The CSS had in it
#block-gin-content, but of course when Gin was renamed, this no longer applied. Now that the CSS is being changed to#block-default-admin-content, it now applies and removes some annoying spacing on some of it's sub-selectors.So, we need some other folks to take a look at this and RTBC.
Comment #15
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 #16
bernardm28 commentedLooks good, I could not find any issues with it. After comparing the before and after.
But if there is I'm sure a followup will be coming.
Comment #18
mherchelCommitted and pushed 35bbc4e3bdc to main. Thanks!
Comment #21
mherchelComment #24
godotislateReverted from 11.4.x because
Drupal\Tests\default_admin\Unit\ImplementationNameTestis failing: https://git.drupalcode.org/project/drupal/-/jobs/12022625It looks like it's at least partially because #3614955: Move library overrides for Toolbar from Claro and Default Admin to Toolbar was not backported to 11.4.x.
Comment #25
longwaveAs a refactoring I'm not sure this is worth backporting to a patch release? Maybe we just mark this fixed in 11.5/12.0 and be done?
Comment #26
godotislate+1 to #25.
Comment #27
mherchelmy thought process was
1) This is experimental
2) When people test their modules, they might want to use one of the CSS classes in their contrib modules
3) Keeping the codebase in sync makes things easier going forward (we have a number of other accessibility releases coming down the wire).
Thoughts?
Comment #28
godotislateI think a backport to 11.4.x is OK in theory, but given issues like #3614955: Move library overrides for Toolbar from Claro and Default Admin to Toolbar that won't go to 11.4.x, the codebases have already drifted. Also D12 beta is scheduled to be out in a couple weeks, before the next patch release window, so module maintainers could conceivably start testing using the beta soon.
Anyway, I think the options are:
Comment #29
mherchelThat makes sense. FYI, I'm OOO for most of the week. But will work on this as I can.
Comment #30
quietone commentedLooks like follow up work is neede because there are still instances of Claro
core/themes/default_admin/css/theme/accent.pcss.css - Should the be data-accent.pcss.css
core/themes/default_admin/images/core/README.md - This states the core/themes/default_admin/images/core can be deleted. Is that a followup?
Comment #31
quietone commentedAnd also instances of gin.
Comment #35
mherchelTests are passing. Code looks good for 11.4.x
Comment #36
godotislateAdded the follow-up per #30/31: #3623097: Remove remaining Gin and Claro implementation names from Default Admin theme, part 2
Comment #37
jurgenhaasI've reviewed this and found 3 noteable things:
ImplementationNameTestis deliberate and OKApart from that, I'd RTBC this.
Comment #38
mherchelPer #37
Comment #40
mherchelCommitted and pushed 7425089d862 to 11.4.x. Thanks!