Repository navigation
Conversation
…ern is loaded in the start template screen
|
Size Change: +9.95 kB (+1%) Total Size: 1.63 MB
ℹ️ View Unchanged
|
This was referenced Sep 19, 2023
| ( select ) => select( coreStore ).getCurrentTheme().stylesheet | ||
| ); | ||
|
|
||
| // Duplicated from packages/block-library/src/pattern/edit.js. |
Contributor
There was a problem hiding this comment.
should we make a similar comment in that file so any future changes get ported to this function too?
Contributor
Contributor
|
yep, still happens to me without a symlink |
MaggieCabrera
approved these changes
Sep 21, 2023
MaggieCabrera
left a comment
Contributor
There was a problem hiding this comment.
Sorry, my environment wasn't working correctly, this works as expected, thank you for the fix
scruffian
enabled auto-merge (squash)
September 21, 2023 18:30
Contributor
|
I tagged this for backport since we are going to need it for TT4 and it's best if it makes it to beta @mikachan |
mikachan
pushed a commit
that referenced
this pull request
Sep 22, 2023
* Patterns: Inject the theme name into the block attributes when a pattern is loaded in the start template screen * Add a comment to make it clear what code is duplicated
Member
|
I just cherry-picked this PR to the release/16.7 branch to get it included in the next release: f452d03 |
This was referenced Jan 7, 2024
Closed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?
Inject the theme name into the block attributes when a pattern is loaded in the start template screen.
Why?
This means that themes can live in any directory and the templates will still work. Fix here: #53194
How?
Reusing the approach from #53423. We might want to refactor this so that these two instances use the same code, but I'm hesitant because I'm not sure we want to expose this as an API.
Testing Instructions
Screenshots or screencast