-
Notifications
You must be signed in to change notification settings - Fork 56
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
Unable to detect a pattern from default theme having same id as the pattern in the base theme #304
Comments
+1 on this! By looking at the code, it looks like this behavior was done on purpose. And the logic could be simplified to:
Same logic as |
I made an interesting observation: With the patch, both the yml definition and the template from the sub-theme are used. After removing the yml in the sub-theme, the yml from the base theme and the template from the sub-theme are used - which is good, I assume. |
Module-provided patterns vs theme-provided patternsThe solution proposed here fixes the order of base theme vs sub-theme. Pattern inheritance compatibility validation?Also, I wonder if there should be any validation to check the compatibility of the theme-provided pattern vs the module-provided pattern. |
Moved to Drupal.org https://www.drupal.org/project/ui_patterns/issues/3311471 |
Steps to reproduce:
Create a pattern in your base theme.
Copy the previously created pattern to your sub theme (default theme).
ui patterns library detects the pattern defined in your base theme instead of the one in the default theme.
I think a pattern defined in the default theme (having same id as a pattern in the base theme) should be the one detected. As it overrides the pattern in the base theme!
The text was updated successfully, but these errors were encountered: