Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patternlab and D10 / Twig 3 #1496

Closed
rbomhof opened this issue Nov 6, 2023 · 3 comments · Fixed by #1499
Closed

Patternlab and D10 / Twig 3 #1496

rbomhof opened this issue Nov 6, 2023 · 3 comments · Fixed by #1499

Comments

@rbomhof
Copy link

rbomhof commented Nov 6, 2023

Apologies if this is not the correct spot to submit this question, it looks like the support channel is not available. We are running D10 with a much older version of Patternlab with Gulp that needs to be updated. We decided to start fresh, but it looks like this latest version of Patternlab - we are using 6.0.1 - still relies on an earlier 2.x version of Twig. Is there a preferred / recommended approach for Drupal 10 sites that rely on Patternlab for the frontend?

@JosefBredereck
Copy link
Contributor

To be honest, at this point, I would not recommend relying on pattern lab for new or refreshed projects.
It would be better to use storybook which is much better supported.
There are tons of tutorials on how to get it running with twig, twing and whatever you can imagine.

@lquessenberry
Copy link

lquessenberry commented Nov 29, 2023

Hello @JosefBredereck, for posterity I am trying to patch up our Patternlab at https://protiviti.com which is now on Drupal 10. It's an uphill climb. I was successful in salvaging our patterns but I had to do a lot of "find and replace" just to suppress the nested patterns warnings. The Twig Engine seemed to work okay on my local with Node, but I also spent a few days refactoring and reorganizing the pattern library to work without warnings. Unfortunately I have also spent a considerable amount of time considering Storybook.js and Single Directory Components module for Drupal.

Currently our site is using Components module to extend Drupal's theme system by using our Patternlab directly as a component library in Twig. I have been advised by a few other folks to explore the Single Directory Components module as a potential approach.

There's also a module UI Patterns Pattern Lab (Mouthful!) https://www.drupal.org/docs/contributed-modules/ui-patterns-pattern-lab which seems promising.

@hadl
Copy link
Contributor

hadl commented Dec 7, 2023

@lquessenberry
We are also heavily relying on Patternlab an use it the same way you do.

Regarding Twig 3 see: #1474 (comment)

hadl added a commit to hadl/patternlab-node that referenced this issue Dec 10, 2023
hadl added a commit to hadl/patternlab-node that referenced this issue Dec 10, 2023
JosefBredereck pushed a commit that referenced this issue Dec 21, 2023
…wig v3.7.1 (#1499)

* feat(engine-twig-php): update @basalt/twig-renderer to v3.0.1 using Twig v3.7.1

Closes: #1496

* feat(edition-twig): alter-twig.php using Twig v3 namespaces

Refs: #1496

* fix(edition-twig): deprecation message "hiding by underscore prefix"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants