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

Patterns: Consider a more streamlined way to convert sync status #53320

Closed
nosilver4u opened this issue Aug 4, 2023 · 15 comments
Closed

Patterns: Consider a more streamlined way to convert sync status #53320

nosilver4u opened this issue Aug 4, 2023 · 15 comments
Assignees
Labels
[Feature] Blocks Overall functionality of blocks [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement.

Comments

@nosilver4u
Copy link

nosilver4u commented Aug 4, 2023

What problem does this address?

Some folks have used Reusable Blocks as Patterns by inserting the Reusable Block into a new post/page and detaching it. This functionality is now provided by unsynced Patterns, yet there is no easy way to convert a synced pattern into an unsynced pattern. The process currently is to do the following:

  1. Edit the synced pattern or detach an instance of it
  2. Copy its blocks
  3. Create a new unsynced pattern and paste in the copied blocks

What is your proposed solution?

Enhance the duplication process:

One possibility to improve things a little is to enhance the duplication process in the Site Editor. Rather than immediately duplicating the existing pattern (including sync status), it would present a modal allowing for adjusting the duplicated pattern's name and sync status.

Consider adding in interface nudges:

Screen Shot 2023-08-30 at 9 56 34 AM

Other brilliant design ideas!

@jordesign jordesign added [Type] Enhancement A suggestion for improvement. [Feature] Blocks Overall functionality of blocks labels Aug 4, 2023
@skorasaurus skorasaurus added the [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) label Aug 4, 2023
@aaronrobertshaw aaronrobertshaw moved this to Todo in Patterns Aug 28, 2023
@aaronrobertshaw
Copy link
Contributor

There was a deliberate decision made to remove this feature due to the complications altering a pattern's synced status can cause. Given that, I'm not sure this will be reinstated any time soon given workarounds such as duplicating a synced pattern as an unsynced pattern, or the proposed partially synced patterns which will allow customizations per pattern instance.

You can find some history and context on the previous decision in #51920 (comment).

@nosilver4u
Copy link
Author

Yeah, I can definitely see how unsyncing a pattern would be tricky, but I have several friends in this boat with quite a lot of synced patterns that they utilized as reusable blocks. Could you clarify on the "workarounds such as duplicating a synced pattern as an unsynced pattern?
Or do you mean the (clunky) process that I described above?

@annezazu
Copy link
Contributor

There are a few ways to do this -- the way you described or duplicating the pattern in the Site Editor > Patterns section before changing sync status there. I am getting feedback though from the FSE Outreach program around this with folks not knowing how to accomplish this when presented with the task.

Mind if I update this issue a bit to make it something design might be able to consider?

@nosilver4u
Copy link
Author

When I was chatting with one of the folks affected by this, we tried the Site Editor > Patterns section, but that doesn't allow us to edit the sync status. From what @aaronrobertshaw said, it sounds like that ability was removed intentionally, but maybe I missed something there.
At any rate, I tried it again just now, and I can find no way to disable syncing for a pattern. My workaround isn't scalable for the folks I know, as they have way too many patterns they want unsynced. In their case, almost none of their synced patterns were actually intended to be synced, so any concerns about confusion in regards to what will happen to existing content are moot.
For consistency, it seems that if one "unsyncs" a pattern, it should apply to existing AND new uses of the pattern, but I suppose that's a bit more difficult to implement if the block editor is simply retaining a reference in the content rather than the actual contents of the pattern. Still, it would save a bunch of folks time in converting their reusable blocks to unsynced patterns.

@annezazu
Copy link
Contributor

I definitely recommend reading the linked convo as it goes into great detail around the technical limitations that would be much easier not to restate here: #51920 (comment)

I do think this feedback around sync status and changing it is worth adding some nudges around, perhaps in the detail view when hovering over sync status. I'd like to update this issue with some of those ideas but want your permission first :)

@nosilver4u
Copy link
Author

Ah yes, that is the one I read through, I was just a little fuzzy on the details. However, I've never seen or found any ability to change the sync state of a pattern, whether using an FSE theme (Twenty Twenty-Three) or I guess what is called a class theme (Twenty Twenty).

The idea of duplicating a pattern and being able to change it to unsynced would be great. However, even that isn't possible at this point. Feel free to share your other ideas here, because I definitely feel like there is room for improvement.

@aaronrobertshaw
Copy link
Contributor

Thank you for the continued discussion @nosilver4u and @annezazu 🙇

I can find no way to disable syncing for a pattern

I believe this is correct. There isn't currently an option available to desynchronize a synced source pattern, you can only detach or desynchronize an instance of such a pattern.

The idea of duplicating a pattern and being able to change it to unsynced would be great.

My understanding of the current workaround is:

  1. Edit the synced pattern or detach an instance of it
  2. Copy its blocks
  3. Create a new unsynced pattern and paste in the copied blocks

I certainly understand and appreciate that is an unwieldy and unsatisfactory process long term.

One possibility to improve things a little is to enhance the duplication process in the Site Editor. Rather than immediately duplicating the existing pattern (including sync status), it would present a modal allowing for adjusting the duplicated pattern's name and sync status.

This needs some extra design consideration before we can proceed with it. Any modal introduced for this purpose may also need to be reused to edit other aspects of a pattern. A pragmatic view here is that there might be some other higher-impact issues with patterns that we need to address before this, given there is an existing way to achieve the desired result, as clunky as that might be for now.

I'd like to restate, this is definitely something I'd like to see improved and it will be given some time. It may not happen before the next WordPress 6.4 release though.

@nosilver4u
Copy link
Author

I'd also like to clarify that the duplication option in the Site Editor doesn't help any of the folks I know, as we're all using classic themes. I only tested that method to see if one could create an unsynced pattern via the duplicate option.
So ideally, there would be a solution for the Pattern Manager also, but totally understand that's going to take some time.

@annezazu annezazu changed the title Provide a method to convert reusable blocks (synced patterns) into unsynced patterns. Patterns: Consider a more streamlined way to convert sync status Aug 30, 2023
@annezazu annezazu added the Needs Design Needs design efforts. label Aug 30, 2023
@annezazu annezazu moved this to Needs Design in WordPress 6.4 Editor Tasks Aug 30, 2023
@annezazu
Copy link
Contributor

I took the liberty of updating this issue, changing the title, adding it to the 6.4 board for design to consider, and now tagging design @WordPress/gutenberg-design for awareness.

@SaxonF
Copy link
Contributor

SaxonF commented Aug 30, 2023

adding it to the 6.4 board for design to consider

I would +1 @aaronrobertshaw comments that this is really a prioritisation question at this point. I'm not sure you should ever be able to change the sync status of a source (Figma also doesn't do this) but renaming and setting status on duplication seems like an improvement to the current workaround.

I'm moving this out of 6.4 but we can reconsider in future releases.

@aaronrobertshaw
Copy link
Contributor

A new flow for duplicating patterns has been implemented via #54764.

When duplicating a pattern, you'll now be presented with a modal allowing customization of the duplicated pattern's name, categories, and sync status. This should make the accepted workaround for not being able to change a pattern's sync status much easier.

There is also another PR in the works (#55292) that will allow pattern duplication via a command when viewing or editing a pattern in the site editor.

I'd then like to propose we close this issue as resolved. What do you all think?

@nosilver4u
Copy link
Author

That's great progress, but doesn't resolve the issue for all the folks using classic themes (without a site editor).

@aaronrobertshaw
Copy link
Contributor

That's great progress, but doesn't resolve the issue for all the folks using classic themes (without a site editor).

That's correct. Thanks for flagging that @nosilver4u 👍

Unfortunately, access to the site editor's patterns page for classic themes wasn't able to make it into 6.4 however it is slated for 6.5. You can find further info in #52150 (comment)

For classic themes, that leaves only the original workaround of copying blocks, creating a new pattern with the different sync status, and pasting the blocks.

The suggested nudge would only be available in the site editor as well.

As there is a dedicated issue for classic theme access to the patterns page, a core PR in progress for that, the new duplication flow implemented for the site editor, and an existing workaround (copying blocks and creating new patterns). My vote would still be to close this issue and focus further on the classic theme access.

I do appreciate the current functionality isn't the perfect outcome for classic themes but with #52150 and WordPress/wordpress-develop#5201 it will be fixed and not slip through the cracks.

@annezazu any suggestions on the best path forward?

@annezazu
Copy link
Contributor

When duplicating a pattern, you'll now be presented with a modal allowing customization of the duplicated pattern's name, categories, and sync status. This should make the accepted workaround for not being able to change a pattern's sync status much easier.

I agree with you. Thanks for acting quickly here and reducing the steps needed to make this happen.

As there is a #52150 for classic theme access to the patterns page, a WordPress/wordpress-develop#5201 in progress for that, the #54764 implemented for the site editor, and an existing workaround (copying blocks and creating new patterns). My vote would still be to close this issue and focus further on the classic theme access.

Agreed. I am bummed this didn't make it into 6.4 but adding anything now doesn't make much sense when this is coming up in 6.5. @t-hamano as another great example of why the work you've been doing matters so much!

@github-project-automation github-project-automation bot moved this from In Progress to Done in Patterns Oct 16, 2023
@askdesign
Copy link
Member

I was wondering how to convert an unsynced pattern into a synced one when I came across this conversation. Good to see this discussion and gain an understanding of the complications. I like the idea of the duplication modal and its "nudge". Thanks for all you do everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement.
Projects
No open projects
Status: Done
Development

No branches or pull requests

7 participants