feat: #3591908 Support the Drupal 12 Default Admin (Gin-in-core) theme styling
Fixes the styling of the Autocomplete Deluxe widget on the Gin-based core Default Admin (default_admin) theme that ships in Drupal 12, while keeping the Gin contrib theme working on Drupal 10/11. Issue [#3591908].
What this does
- Theme detection: recognise
default_admin(Gin-in-core) alongsidegin(and their sub-themes), extracted into a pure, unit-testedAutocompleteDeluxeElement::themeStylingLibraries()helper. - Resilient Gin CSS: every
--gin-*custom property now carries a fallback value (the core theme renames these during its CSS refactor) and a self-contained throbber animation is added. - Drupal 12 readiness:
core_version_requirement/composer bumped to^10.3 || ^11 || ^12; the field widget plugin moved from the@FieldWidgetannotation to the#[FieldWidget]attribute. - Testing: a cross-version PHPUnit unit test for the theme-detection helper
(
tests/src/Unit/ThemeStylingLibrariesTest.php), asserting the right stylesheet library per theme on Drupal 10, 11 and 12.
The browser suite, the hidden test recipe and the CI pipeline that were originally bundled here have been split out, so this issue carries only the styling change and its unit test: the suite is in [#3619108] and the pipeline is in [#3551487]. One issue, one change.
Verified
Tested on Drupal 10 with Gin, Drupal 11 with Gin, and Drupal 12 with Default Admin: the widget renders, no JavaScript errors, and the correct Claro/Gin stylesheet is attached for each theme. The unit test covers the same matrix.
Closes #3591908
Checkpoints:
- File an issue
- Addition/Change/Update/Fix
- Testing to ensure no regression
- Automated unit testing coverage
- Automated functional testing coverage
- UX/UI designer responsibilities
- Readability
- Accessibility
- Performance
- Security
- Developer Documentation
- User Guide Documentation
- Reviewed by human
- Code review by maintainers
- Full testing and approval
- Credit contributors
- Review with the product owner
- Release notes snippet
- Release
AI-Generated: Yes (Claude Code assisted with the implementation, tests and CI; reviewed and verified by the contributor on Drupal 10, 11 and 12).