Generated with the help of an LLM.

Problem/Motivation

The Rivet theme contains several local overrides and compatibility shims associated with older Rivet Core versions, upstream Rivet issues, Drupal core limitations, and browser behavior.

Steps to reproduce

1. Search the theme for explicit TODOs, temporary fixes, compatibility shims, and removal notes:

rg -n -i \
  '@todo|workaround|temporary|legacy|backward compat|compatibility|deprecated|remove when|delete as part of' \
  --glob '!node_modules/**' \
  --glob '!vendor/**' \
  --glob '!css/compiled/**' \
  --glob '!*.map' \
  --glob '!package-lock.json'

2. Search for dependency-version-specific code that may not have been updated with the dependency declarations:

rg -n \
  'rivet-core@|starterkit_theme:|core_version_requirement|Drupal 10|2\.5\.1|2\.9\.1' \
  --glob '!node_modules/**' \
  --glob '!vendor/**' \
  --glob '!css/compiled/**' \
  --glob '!*.map' \
  --glob '!package-lock.json'

3. Compare each workaround with the currently configured dependency versions in:

  • - package.json
  • - rivet.libraries.yml
  • - rivet.info.yml

4. For each TODO that references an upstream issue:

  • - Open the linked Rivet or Drupal issue.
  • - Check its current status and most recent comments.
  • - Determine which upstream release contains the fix.
  • - Compare that release with the project’s currently supported versions.
  • - Do not assume that a closed issue makes the workaround removable if the project still supports older dependency versions.

5. Trace each candidate through the theme to find all related files and registrations. For example:

rg -n 'rvt-select|rivet_css_alter|StarterKit|rvt-c-steps|rvt-c-region' \
  --glob '!node_modules/**' \
  --glob '!vendor/**'

6. This review should reveal examples such as:

  • - A select override referencing fixed upstream Rivet issue #734.
  • - A CSS alter hook hardcoded to Rivet Core 2.5.1 even though the theme now loads 2.9.1.
  • - Starterkit fallback code tied to a Drupal core issue fixed in 10.3, while the theme still declares support for earlier Drupal 10 releases.
  • - Additional workarounds whose upstream issues remain open and therefore should be retained.

7. Remove only workarounds confirmed to be obsolete, then rebuild the styles:

ddev npm run build

8. Review the resulting changes to confirm that only the expected source, library, and compiled CSS files changed:

git diff --stat
git diff

9. Perform targeted regression testing for every removed workaround, including selects, generated subthemes, layout breakout regions, empty/lazy regions, Webform progress indicators, and <details> elements as applicable.

Expected result: The theme contains only compatibility workarounds still required by its supported Rivet, Drupal, Webform, and browser versions. Obsolete code, related asset declarations, and stale TODO comments are removed.

Actual result: The scan finds a mixture of obsolete, conditionally removable, and still-required workarounds that need to be classified before removal.

Proposed resolution

Following the dependency upgrades in #3636600: Update Rivet dependencies and CSS build tooling, review these workarounds against the currently supported Rivet and Drupal versions. Remove code that is demonstrably obsolete, retain workarounds whose upstream blockers remain unresolved, and update stale TODO comments with their current status.

Out of scope
- The CKEditor PostCSS TODO is an unfinished build enhancement, not obsolete code.
- Documentation TODOs copied from Drupal templates.
- Generic Drupal compatibility styling without an upstream removal condition.

Acceptance criteria
- Every reviewed workaround is classified as removed, retained, or deferred with supporting dependency/upstream evidence.
- Confirmed obsolete code and related library declarations or compiled assets are removed.
- Retained workarounds have accurate comments and live upstream references.
- Selects are tested across supported browsers, including disabled, multiple, and long-option variants.
- Region visibility, Webform progress steps, and behavior are regression-tested if their fallbacks change.
- Generated subthemes are tested if starterkit processing changes.
- Drupal 10 and Drupal 11 checks pass while both remain supported.
- Sass compilation and Stylelint complete cleanly.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork rivet-3636602

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

jwilson3 created an issue. See original summary.

jwilson3’s picture

Issue summary: View changes
jwilson3’s picture

Assigned: Unassigned » jwilson3
jwilson3’s picture

TODO and compatibility workaround audit

The source links below reference the immutable Rivet 1.2.0 release. Change links reference commits on the #3636602 issue-fork branch.

Code in 1.2.0 Analysis Disposition Current branch change
rvt-select.scss The line-height override was added for rivet-source #734. That upstream fix is included in the upgraded Rivet Core dependency, so the local override and its compiled asset are obsolete. Removed 2c84b0f: Remove obsolete rvt-select line-height override
rivet_css_alter() The workaround is still needed because Drupal core #3046636 remains unresolved. However, the 1.2.0 implementation is hardcoded to Rivet Core 2.5.1 and no longer affects the upgraded dependency. Retained and corrected 4ed67cb: Resolve the asset dynamically and add regression coverage
details.css The regression comment was inherited from the older core Starterkit. Current core no longer carries it, and its reference to browsers without native &lt;details&gt; support is stale. The CSS itself remains useful and was not removed. Stale TODO removed 002becf: Remove obsolete details.css TODO
checkboxes.html.twig Drupal core #1819284 remains active, but the local comment is inaccurate. Rivet's template is not identical to core's container template; it renders the checkboxes as a customized Rivet &lt;ul&gt;. The template must remain. Template retained; stale comments corrected 5cc4318: Simplify checkboxes.html.twig docblock
StarterKit.php

rivet.starterkit.yml
Drupal core #3364885 landed in Drupal 10.3, but the final API uses ignore, not the provisional delete key retained by Rivet. Modernizing this safely requires defining the generated file set, deciding the Drupal minimum version, and adding generation tests. Deferred to #3636630 03ea149: Link to the starterkit cleanup issue
ckeditor.css This is a valid unfinished enhancement rather than obsolete code. Drupal loads the stylesheet into CKEditor but does not rewrite Rivet's .rvt-prose selectors to target .ck.ck-content. Retained; separate follow-up needed Out of scope for #3636602.
rvt-drupal-compatibility.css rivet-source #755 remains open. Rivet Core 2.9.1 still contains the breakout and feature-slot margins that cause overflow inside .rvt-container-xl. Retained No change required.
rivet_preprocess_image_widget() The same preview-access workaround and TODO references remain in Drupal 11.4 core. Drupal core #953034 remains Needs work and #3114318 remains Active. Retained No change required.
rivet_preprocess_table()

rivet_preprocess_views_view_table()
The same inactive-sort-link workaround remains in Drupal 11.4's Claro and Default Admin themes. Drupal core #3025726 remains Needs work and #1973418 remains Active. Retained No change required.
search-result.html.twig This TODO is copied verbatim from Drupal 11.4's Starterkit and Search module templates. It documents an upstream template-variable limitation and is not a Rivet compatibility workaround. Retained as upstream documentation Out of scope for #3636602.
field--node--created.html.twig

field--node--uid.html.twig
Drupal core still supplies these templates and carries the same TODO. Drupal core #3015623 remains Postponed. Rivet also customizes the templates with its own field classes. Retained No change required.
views-view-list.html.twig The incomplete list variable documentation is copied verbatim from Drupal 11.4's Starterkit template. It is not a Rivet workaround. Retained as upstream documentation Out of scope for #3636602.

  • jwilson3 committed 66a6df42 on 1.2.x
    Issue #3636602 by jwilson3: Remove obsolete Rivet compatibility...
jwilson3’s picture

Assigned: jwilson3 » Unassigned
Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

jwilson3’s picture

Released in 1.2.1

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.