Problem/Motivation
Two broken references around the accordion component. Verified against 1.0.x at commit 6e974b0.
vartheme_bs5_rightup.libraries.ymldeclares the libraryaccordion-scriptswithjs/components/accordion-init.js. That file does not exist, and neither does thejs/components/directory. It is the only declared JS in the whole theme that is missing on disk. The library is attached twelve times, fromaccordion-block.stories.twigandaccordion-container.stories.twigonly, never from a component or a live template, so all nine accordion stories request a 404.components/molecules/accordion-block/accordion-block.component.ymldeclares a dependency onvartheme_bs5_rightup/accordion-styles, which is not defined anywhere invartheme_bs5_rightup.libraries.yml. It is the only undefined theme library referenced by any component.
Neither affects accordion behaviour. The components themselves declare vartheme_bs5_rightup/bs-collapse-script, which exists as js/bootstrap/collapse.js, and accordion-container has its own accordion-container.js. SDC auto-attaches those.
Steps to reproduce
- Open any accordion story in Storybook and watch the network panel:
js/components/accordion-init.jsreturns 404. - Search
vartheme_bs5_rightup.libraries.ymlforaccordion-styles. There is no such library.
Proposed resolution
Remove the twelve attach_library('vartheme_bs5_rightup/accordion-scripts') calls from the two story files, remove the accordion-scripts library block, and remove the undefined accordion-styles dependency.
Verified afterwards: the libraries file parses with 34 entries, zero declared JS files are missing on disk, and zero components reference an undefined theme library.
A merge request will follow.
Remaining tasks
- ✅ File an issue
- ❌ Addition/Change/Update/Fix
- ❌ Testing to ensure no regression
- ➖ Automated unit/functional testing coverage
- ➖ Developer Documentation support
- ➖ User Guide Documentation support
- ➖ UX/UI designer responsibilities
- ➖ Accessibility and Readability
- ❌ Reviewed by a human
- ❌ Code review by maintainers
- ❌ Full testing and approval
- ❌ Credit contributors
- ❌ Review with the product owner
- ❌ Update Release Notes
- ❌ Release
User interface changes
- N/A
API changes
- The
accordion-scriptslibrary is removed. Nothing outside the two story files attaches it.
Data model changes
- N/A
Release notes snippet
- Removed a library pointing at a missing accordion-init.js and an undefined accordion-styles dependency.
Issue fork vartheme_bs5_rightup-3627274
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
Comment #3
rajab natshahComment #5
rajab natshah