WordPress / pattern-directory

The WordPress Block Pattern Directory
https://wordpress.org/patterns/
GNU General Public License v2.0
125 stars 35 forks source link

Patterns have a different viewport width than the default in core #683

Open richtabor opened 6 months ago

richtabor commented 6 months ago

Describe the bug

The default viewport width for patterns from the directory is a different value than the default in core.

The visual below is of the same pattern, one from the directory and the other duplicated from it. This test is with using the Assembler theme, but this occurs for any pattern served from the directory.

The scale of patterns served from the directory are zoomed in further, with a smaller viewport width, than the same patterns from on the site.

CleanShot 2024-04-23 at 10 38 25

To Reproduce Steps to reproduce the behavior:

  1. Add any of the curated patterns from the editor.
  2. Create a pattern from the same exact pattern.
  3. Compare the previews of both patterns.

Expected behavior The patterns should have the same default scaling, regardless of source.

Additional visual

Here's an example using a core pattern that is already served to WordPress sites:

CleanShot 2024-04-23 at 10 57 04 CleanShot 2024-04-23 at 10 56 08

richtabor commented 6 months ago

While it'd be nice to have to declare viewport width for patterns (https://github.com/WordPress/pattern-directory/issues/614), we need a consistent default first.

ryelle commented 6 months ago

I believe the one supplied by the pattern directory is 800px, which did match GB at some point. What is the current gutenberg default?

richtabor commented 6 months ago

Looks like 1200 (source).

richtabor commented 3 months ago

Is this something we can fix?

richtabor commented 2 months ago

We're about to kick up Twenty Twenty Five, which will likely use the directory to house patterns—but I consider this a blocker, as the patterns don't look great coming in with a different viewport width than any included in the theme.