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

Support viewport width #614

Open
richtabor opened this issue Nov 8, 2023 · 3 comments
Open

Support viewport width #614

richtabor opened this issue Nov 8, 2023 · 3 comments
Labels
[Component] Pattern Creator Anything related to the pattern front end editor or preview [Type] Enhancement New feature or request

Comments

@richtabor
Copy link
Member

I'd expect to be able to assign a viewport width for patterns to display better for themes that register patterns via theme.json, like Twenty Twenty-Four. Even a text control with a number attribute would do fine.

viewportWidth (optional): An integer specifying the intended width of the pattern to allow for a scaled preview of the pattern in the inserter.

@ryelle ryelle added [Component] Pattern Creator Anything related to the pattern front end editor or preview [Type] Enhancement New feature or request labels Apr 18, 2024
@richtabor
Copy link
Member Author

What would it take to add viewport width support to patterns? I'm finding this more and more important, as I explore updating the curated patterns on within the patterns directory.

viewportWidth (optional): An integer specifying the intended width of the pattern to allow for a scaled preview of the pattern in the inserter.

CleanShot 2024-04-23 at 10 34 09

You can see the variances between the preview scale (modified with viewport width) and the inserted pattern. It feels unexpected having a different visual representation of the pattern between the preview and the actual inserted pattern:

CleanShot 2024-04-23 at 10 38 19

@richtabor
Copy link
Member Author

richtabor commented Aug 15, 2024

@ryelle what do we need to do to have this here, and #683?

@ryelle
Copy link
Contributor

ryelle commented Aug 26, 2024

I can set this manually from my sandbox for any patterns that exist right now, if you can give me URLs or IDs. To create a UI for this isn't hard, it's all just a matter of priority. PRs are welcome though, I'd be happy to review 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] Pattern Creator Anything related to the pattern front end editor or preview [Type] Enhancement New feature or request
Projects
Status: 📋 To do
Development

No branches or pull requests

2 participants