-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Patterns: Prevent exception if a pattern with overrides is nested in another pattern #58359
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
glendaviesnz
added
[Type] Bug
An existing feature does not function as intended
[Feature] Patterns
A collection of blocks that can be synced (previously reusable blocks) or unsynced
labels
Jan 28, 2024
Size Change: +54 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
This was referenced Jan 28, 2024
Flaky tests detected in e0c8dca. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7703951913
|
…can't nest, as the nested patterns do display ok in frontend
glendaviesnz
force-pushed
the
fix/bug-with-nested-pattern-overrides
branch
from
January 31, 2024 23:02
0909d9f
to
2c6eeb5
Compare
closing in favour of #58541 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[Feature] Patterns
A collection of blocks that can be synced (previously reusable blocks) or unsynced
[Type] Bug
An existing feature does not function as intended
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
Shows a warning if a synced pattern with overrides is nested within another pattern.
This is just one approach to fix this and is probably the simplest for 6.5, but we should also explore what might be involved in supporting the nesting of patterns with overrides.
Why?
Currently, an exception is thrown if a pattern with overrides is nested within another pattern.
Fixes: #58291
How?
Checks for a parent that is a pattern for patterns that have overrides set.
Testing Instructions
Screenshots or screencast
Before:
After:
nested-after2.mp4