Installing this module breaks styling of collapsible fieldsets

Created on 28 July 2023, over 1 year ago
Updated 6 March 2024, 9 months ago

Problem/Motivation

After install, both in the Gin admin theme and DXPR theme, styling of collapsible widgets such as fieldsets and collapsed filters break.

Steps to reproduce

Install the module.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡ΉπŸ‡­Thailand AlfTheCat

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @AlfTheCat
  • First commit to issue fork.
  • Merge request !1Resolve #3377646 "Installing this module" β†’ (Open) created by cecrs
  • Assigned to cecrs
  • Status changed to Needs review 9 months ago
  • πŸ‡ΊπŸ‡ΈUnited States cecrs

    I ran into this issue too, as well as needing to apply the accordion checkout to a custom checkout flow that my site uses. I've added module configuration for both.

    To configure: /admin/commerce/config/accordion

    NB: In order to solve the issue with the template, I added a configuration to use/not use the default template. If checked, the module will use the details.html.twig provided by the module. If unchecked, Drupal will determine which template to use in the usual way, and this modules template will NOT be used. If you use this configuration, you MUST provide a custom template in your theme, that checks for the new accordion attribute, and selects a template accordingly.

    It should look like so:

    {% if attributes.accordion is defined and attributes.accordion == true %}
      < This is an accordion details pane. Insert the template code provided by the module here, it is needed for the module to work correctly. >
    {% else %}
      {#
        For all other details elements, use the correct template. I copied the one from my base theme into my subtheme and renamed it to detailsDefault.html.twig to avoid namespace conflicts
      #}
      {% include '@mytheme/form/detailsDefault.html.twig' %}
    {% endif %}
Production build 0.71.5 2024