WordPress / WordPress/pattern-directory
Support viewport width
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 134
- Forks
- 46
- Avg merge
- 9h 4m
- Merged PRs (30d)
- 19
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how pattern previews are rendered in the inserter and how patterns registered through theme.json are represented. Confirm where an optional integer viewportWidth can be read and applied; done means registered patterns can use it to produce a scaled preview at the intended width.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100