Problem/Motivation

There are thousands of references to "gin" in core/themes/admin:

$ rg '\Wgin' core/themes/admin|wc -l
3213

We chose not to ship the name "gin" with core, so we should remove all remnants of the name.

Given this affects things like CSS variables and class names this feels like a blocker for marking the theme as stable.

Steps to reproduce

Proposed resolution

Replace them with "admin" or something else. Make child issues to scope this work.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3576494

Command icon 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

longwave created an issue. See original summary.

longwave’s picture

Title: Remove references to Gin » [meta] Remove references to Gin
Category: Task » Plan

In fact given that there are thousands this can't be reviewed in a single patch, so let's make this a meta.

markconroy’s picture

Looking through the instances of gin in the core/themes/admin we have:

  • 3401 instances in total across 105 files
  • 3164 are in CSS files (across 45 files)
  • 75 are in JS files (across 13 files)
  • 110 are in Twig files (across 37 files)

I don't want to speak too soon, but _I think_ a simple find+replace would suffice from gin to admin

markconroy’s picture

Status: Active » Needs review

We might get lucky with this one!

longwave’s picture

Status: Needs review » Needs work

This might just work!

We add core/themes/admin/migration/css/base/admin.css but do not remove core/themes/admin/migration/css/base/gin.css, that needs fixing at least.

markconroy’s picture

Status: Needs work » Needs review

I was sure I renamed that file rather than duplicating it. It's removed now.

jurgenhaas’s picture

Status: Needs review » Needs work
Related issues: +#3576646: Rename Gin-based admin theme

We also have the issue #3576646: Rename Gin-based admin theme which changes 629 files - well, that mainly because of renaming the admin directory to default_admin which counts as a change for every contained file within that tree.

I suspect we will get merge conflict when we do that other one and this one in either sequence.

But that also makes me wonder if we should really replace gin with admin or if we should also use default_admin for e.g. class names and variables.

I'd suggest, that we first get the other issue reviewed and merged, and then come back to this one, doing the Gin reference cleanup based on that. But the decision on whether to use admin or default_admin could already take place.

quietone made their first commit to this issue’s fork.

quietone’s picture

Status: Needs work » Needs review

Rebased this. And made a child issue just for comments.

poker10’s picture

Added two child issues which does not seems to be covered here.

poker10’s picture

Status: Needs review » Needs work

Added another one.

Also this issue is affected by #3582826: Untangle gin.css, which already removed core/themes/admin/migration/css/base/gin.css, but created approx. 90 new gin- named files (so the folder core/themes/admin/migration/css/base/ is now full of another gin- prefixed files). And also there is core/themes/default_admin/templates/navigation/top-bar--gin.html.twig. So if we are going to rename files here as well, then we need to rename all of them.

Moving to Needs work based on this. Thanks!

quietone’s picture

Issue summary: View changes
Status: Needs work » Active

Changing to active while the work in the child issues is completed.

jurgenhaas’s picture

This remains the active tracking meta for removing inherited Gin references from the Default Admin theme.

Implementation is consolidated in #3605702: Remove remaining Gin and Claro implementation names from Default Admin theme, which now covers CSS/PCSS/generated CSS, JavaScript files and identifiers, behaviors, persisted browser state, settings, PHP, Twig, documentation, tests, accessibility, high contrast, VRT, compatibility, and the allowlist of legitimate Gin/Claro references.

#3576496: Remove references to Claro and #3611446: Migrate Gin CSS classes from default_admin twig overrides have been closed as duplicates after their requirements are transferred. MR!14967, !15233, and MR!16340 should remain reference inventories and be closed as superseded once the fresh #3605702: Remove remaining Gin and Claro implementation names from Default Admin theme MR exists. This meta remains open to track completion and any scoped follow-ups. Preserve contributor credit in the replacement work.