How can I resolve conflict with Gutenberg USWDS?

Created on 29 September 2023, about 1 year ago
Updated 4 October 2023, about 1 year ago

I'm using USWDS (with a subtheme) on a Drupal 10.1.4 site, and I also installed the contrib Gutenberg USWDS module and enabled its Gutenberg - USWDS Accordion submodule.

When I add an accordion to a Gutenberg page and save the page, the accordion doesn't expand or collapse.

When I change the theme to Olivero, the accordion works, so I assume there's some sort of conflict with the USWDS theme. Does anyone know how to resolve this conflict?

I see that the module and my subtheme each has the USWDS library in its own assets folder.

If I install the USWDS Ckeditor Integration module and add a USWDS accordion to a non-Gutenberg page, *that* works in my USWDS subtheme. USWDS Ckeditor Integration has the js and css folders directly in the module folder, not in an assets folder.

[Updated title to make it more clear that this is a request for help.]

πŸ’¬ Support request
Status

Closed: works as designed

Version

2.7

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States brianbrarian

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

Comments & Activities

  • Issue created by @brianbrarian
  • πŸ‡ΊπŸ‡ΈUnited States brianbrarian
  • Status changed to Closed: works as designed about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States brianbrarian

    Okay, I think I found the solution.

    I patched the uswds.libraries.yml file on my site to use /modules/contrib/gutenberg_uswds/assets/js/uswds.min.js instead of the js that was placed in the uswds theme's assets folder, and that seems to have done the trick.

    I'm changing this issue as "Closed (works as designed)", because in this case the theme does.

Production build 0.71.5 2024