WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.32k stars 4.12k forks source link

Pattern Shuffle: Add Editor setting to disable shuffling #63900

Open ndiego opened 1 month ago

ndiego commented 1 month ago

Pattern shuffling is a neat new feature introduced in WordPress 6.6. While many will find this useful, there are scenarios where providing users with the ability to shuffle may not be desired. Furthermore, a great shuffling experience requires a robust and, in my opinion, well-organized pattern library. This will not always be the case.

One of these things is not like the others
image

As noted in https://github.com/WordPress/gutenberg/issues/62288, the ability to shuffle after a user has already edited the pattern can also be confusing. I can imagine a developer, especially in an environment with many content creators of varying skill levels, such as a university setting, would want to avoid this confusion altogether.

A simple solution that would give users and developers full control would be to introduce an Editor setting that disables pattern shuffling. If pattern shuffling does not make sense in a specific environment, it can easily be turned off, which is in keeping with previous Editor curation methods that have been implemented.

cc @richtabor @scruffian

timsinc commented 1 month ago

This is needed badly. I'm already having issues with the pattern shuffle feature causing confusion for my clients.

carolinan commented 1 month ago

I would also like the ability to disable it per pattern.

daviedR commented 4 weeks ago

"Shuffle" will give a random pattern within the same category. Like in the @ndiego screenshot, the patterns inside the same category might have different purposes which doesn't make sense to switch to.

I am also not sure that users would like the idea of "give me random content or design or layout".

Instead of the "Shuffle" button, I would prefer a "Replace" button, which will open the Pattern inserter panel and expand the pattern category of the current selected pattern.

This way, the user can manually choose a similar pattern to switch to.

MadtownLems commented 3 weeks ago

Just stumbled on this while doing some final 6.6 testing and my first thought was: "oh god, please tell me we can disable this 🙏"

If anyone has a code snippet to do it until the ability is in core, we'd much appreciate it.

richtabor commented 2 weeks ago

Related, what do you think about shuffle being a tool only available when zoomed out? That way the intent is much clearer as a pattern-level editing tool?

ndiego commented 2 weeks ago

Related, what do you think about shuffle being a tool only available when zoomed out? That way the intent is much clearer as a pattern-level editing tool?

Yeah, I like that approach.

Related, I'm not a huge fan of the term "zoom out" mode since it's far more specific than simply zooming out. I wonder if something like a "Compose" mode would be more accurate and could sit alongside the Edit and Select modes. The primary editing mechanism in this mode is composing page layouts via patterns, which would include shuffling designs. 🤔

richtabor commented 2 weeks ago

Related, I'm not a huge fan of the term "zoom out" mode since it's far more specific than simply zooming out. I wonder if something like a "Compose" mode would be more accurate and could sit alongside the Edit and Select modes. The primary editing mechanism in this mode is composing page layouts via patterns, which would include shuffling designs. 🤔

Maybe so. There's a bit of flux in figuring out the ideal "modes", but there's something there.

Mamaduka commented 1 week ago

Created PR to remove Shuffle from the main block toolbar. It will still be available in Zoom Out view. See #64954.

colorful-tones commented 3 days ago

Love that we got Shuffle removed unless in Zoom Out mode, but I would still advocate that we need a hook for extenders to disable altogether.

Regardless, I'm not clear whether this issue should be closed based on #64954 being merged. Based on the title I would say that we should leave it open.

Mamaduka commented 2 days ago

We can keep this one open but probably remove it from the WP 6.7 project. The Zoom out mode is still experimental; we can revise this setting once it's stable.

ndiego commented 2 days ago

We can keep this one open but probably remove it from the WP 6.7 project.

Sounds good. I just removed it from the project.