-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Shuffle contentOnly
pattern blocks
#47594
Conversation
c72f87a
to
fbf75eb
Compare
Size Change: +3.58 kB (0%) Total Size: 1.31 MB
ℹ️ View Unchanged
|
Thanks for continuing to iterate on the shuffling behaviour @kevin940726 👍 It is testing as advertised for me. I don't have extensive history or context on these efforts but this PR feels like a good step towards an MVP from the discussion on the original PR (#45618). I'm also not clear on our plans for the What are the next steps to move this forward? |
I added a callback to "opt-out" of Kapture.2023-02-02.at.22.46.46.mp4This isn't ideal though, with some obvious drawbacks:
I'm not sure what the next steps are. I could use some recommendations to build the next MVP/draft PR to test other alternatives out. Perhaps someone with more knowledge of how the pattern block and |
Flaky tests detected in d056cc6. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4076273009
|
What?
Alternative to #45618. This PR adds
templateLock
to the pattern block, and allows shuffling patterns forcontentOnly
pattern blocks.Why?
See #44581.
How?
This PR does a couple of things:
templateLock
to the pattern block. There is currently no way to edit this attribute in the user interface though, one will need to go to the code editor to manually add the"templateLock": "contentOnly"
attribute to the pattern block.contentOnly
. The logic looks for all the patterns with the samecategories
and replaces the full content of the pattern.Testing Instructions
"templateLock": "contentOnly"
to the pattern block. (Reload the page if there isn't a pattern block)Shuffle
button available in the block toolbar (if there are matched candidates to shuffle to).Testing Instructions for Keyboard
"templateLock": "contentOnly"
to the pattern block. (Reload the page if there isn't a pattern block)Screenshots or screencast
Kapture.2023-01-31.at.14.58.24.mp4