Problem/Motivation
Unable to install modules: module 'js_example' is missing its dependency module jquery_ui_accordion.
Add "drupal/jquery_ui_accordion": "^1.0" to composer.json to make drupal ci running tests from js_example.
Proposed resolution
Adjust composer.json file's indention to 4 spaces, meanwhile.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | interdiff-7-8.txt | 3.74 KB | jungle |
| #8 | 3103593-8.patch | 8.7 KB | jungle |
| #8 | accordion-demo.gif | 705.72 KB | jungle |
Comments
Comment #2
jungleComment #3
valthebaldAdding a dependency to composer.json won't enable the module, should it be added to dependencies section of js_examples.info.yml?
Comment #4
mile23Relevant change record: https://www.drupal.org/node/3067969
The best change would be to not use jquery ui accordion to demonstrate adding a script depending on an asset library.
Comment #5
jungleYes, core/jquery.ui.accordion was removed from core. See the change recored in #4. The contrib module jquery_ui_accordion should be added as a dependency, not only should be added to .info file, but also the composer.json file. Or CI won't get the code of jquery_ui_accordion module ready for use by composer.
It's a brilliant idea to rewrite the example without jquery_ui_accordion.
Another option is to use a pure javascript/jQuery accordion implementation replacing the usage of the contrib module.
- Simple jQuery accordion: https://css-tricks.com/snippets/jquery/simple-jquery-accordion/
- Pure javascript accordion: https://codepen.io/sureshrkm/pen/ZbzBpr
Wait for the final decision from maintainers for what to do next.
Comment #6
valthebald@jungle: I also think that it's better to avoid including contrib dependency. I'm OK with including Simple jQuery accordion or pure javascript accordion - that would be also an example of adding a library to module itself
Comment #7
jungleUsed this one "Pure javascript accordion: https://codepen.io/sureshrkm/pen/ZbzBpr"
Comment #8
jungleAdjusted a little bit
Comment #10
jungleMissing a full stop. will correct it on committing.
Comment #12
jungle