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

Creating unsynced pattern from pattern editor results in empty pattern #53319

Closed
nosilver4u opened this issue Aug 4, 2023 · 3 comments · Fixed by #53562
Closed

Creating unsynced pattern from pattern editor results in empty pattern #53319

nosilver4u opened this issue Aug 4, 2023 · 3 comments · Fixed by #53562
Assignees
Labels
[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@nosilver4u
Copy link

Description

If one wants to create an unsynced pattern from an existing reusable block (now a synced pattern), there seem to be a couple (cumbersome) ways to do so. One of the ways we tried is to edit a synced pattern from the pattern manager, and then create a new unsynced pattern from the top-level group. This successfully creates a new unsynced pattern, but the new pattern has no content at all.

Step-by-step reproduction instructions

  1. Create a re-usable block. In my test, I created one that was a group block containing a heading and an image block.
  2. From the re-usable block, choose Manage patterns.
  3. This takes you to the pattern editor, in the List View, click the dotted menu icon for the top-level group block, and create a new unsynced block.
  4. Go back to the pattern manager and edit the new block, there is no content. Likewise, one could insert the new unsynced block in a post to see that no content is added.

Screenshots, screen recording, code snippet

No response

Environment info

WP 6.3 RC3, Chrome (latest), Mac OS X 13.4.1

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@jordesign jordesign added [Type] Bug An existing feature does not function as intended Needs Testing Needs further testing to be confirmed. [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced labels Aug 4, 2023
@stacimc
Copy link
Contributor

stacimc commented Aug 4, 2023

I was able to reproduce this according to the instructions. The newly created pattern was empty regardless of whether I tried to create a synced or unsynced pattern from a reusable block:

reusable-block-patterns-test.mov

This only happened for me if the source pattern was a synced pattern/reusable block. If the pattern was unsynced, I was able to create new synced and unsynced patterns from it without the inner blocks disappearing.

@glendaviesnz glendaviesnz removed the Needs Testing Needs further testing to be confirmed. label Aug 7, 2023
@glendaviesnz
Copy link
Contributor

I was able to replicate this. It should not be possible to create a pattern from a synced pattern. In the post editor the Synced pattern will only show the manage patterns or detach patterns option, but for some reason in some circumstances the the create pattern menu is shown in the list view:

create-pattern-bug.mp4

@glendaviesnz glendaviesnz moved this to Todo in Patterns Aug 7, 2023
@nosilver4u
Copy link
Author

nosilver4u commented Aug 9, 2023

@glendaviesnz Do note, that the issue I reported is specifically about what happens when one is editing a pattern after having clicked "Manage patterns". What you showed in your video is very odd though, and I think should also be addressed.

I could see the potential for Create pattern in that menu being used to create an unsynced pattern as a clone of the original synced pattern (related to something I requested in a separate issue). But in this context, I think it would cause more confusion than anything else, and Create pattern should not be displayed in the menu for a synced pattern.

@kevin940726 kevin940726 self-assigned this Aug 9, 2023
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Aug 11, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in Patterns Aug 15, 2023
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 [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants