Problem/Motivation
In 1.x we could organize our patterns in subdirectories. When converting them to components using the drush script, this structure is lost. On projects with a lot of patterns/components, it can be very tedious to reorganize them all.
Steps to reproduce
- Create a pattern in a subdirectory of
templates/patterns(eg:templates/patterns/atoms) - Run the drush script
Expected: the component is created in an "atom" directory
Current: the component is created in the "components" directory directly
Proposed resolution
Keep the directory structure when creating components.
| Comment | File | Size | Author |
|---|
Issue fork ui_patterns-3525566
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
duaelfrThere you go.
Patch attached for composer users.
Comment #4
pdureau commentedGreat find! We can merge this ASAP.
However, would it be possible to not hardcode
/templates/patterns/UI Patterns 1.x components can be found in other places.
Comment #5
duaelfr@pdureau Thanks for the review.
Do you have some examples of other locations where patterns can be found? How can this be dynamically determined?
Comment #6
g4mbiniThose one are already SDC but can give ideas maybe ?
Comment #7
duaelfrNew attempt to fix the issue.
Patch for composer attached.
Comment #8
pdureau commentedLooks good to me. I will ask another maintainer to review.
But before, little cspells fix expected: https://git.drupalcode.org/project/ui_patterns/-/jobs/5325802
Comment #9
duaelfrDone (no need for a new patch as it's only a typo in a comment).
Comment #11
pdureau commentedthanks