Feature graphic fits the phone: shots.feature.fit 'contain' (default) sizes the device so its rotated box stays inside 1024x500 with a 24 px margin in both templates, 'bleed' keeps the crop, scale 0.5-1.5, config validated; shots render records measured device boxes (report.json devices) and shots check fails a feature graphic whose device leaves the canvas (warns for a screenshot's front device off a side or the top); tests/feature-fit.test.ts (rotated-box geometry, both templates rendered at 1024x500, bleeding fixture) (pitfall 55)
This commit is contained in:
parent
6e2dbf03cc
commit
19d34286d5
15 changed files with 239 additions and 12 deletions
|
|
@ -641,3 +641,11 @@ that fails without the fix (see CONTRIBUTING.md).
|
|||
names the culprit. Never install or `brew link` a global tool as a side effect on a shared machine.
|
||||
- **Guard:** `xcodePath`, `foreignRsync`, `distributionErrors` (`cli/lib/xcode.ts`), doctor, `publishSteps`
|
||||
(`tools/desktop-release.ts`, rsync by absolute path).
|
||||
|
||||
## 55. The feature graphic cut the phone off at the bottom
|
||||
- **Do:** nothing by default: `shots.feature.fit` 'contain' sizes the (rotated) phone so its outline stays inside the
|
||||
1024 x 500 canvas with a 24 px margin. `fit: 'bleed'` keeps the larger, cropped phone on purpose; `scale` (0.5-1.5)
|
||||
resizes it. `shots check` fails a feature graphic whose device leaves the canvas (measured from the page's layout
|
||||
at render time, `devices` in report.json), and warns when a screenshot's front device runs off a side or the top.
|
||||
- **Guard:** `featureLayout`, `rotatedBox` (`cli/shots/lib.ts`), `deviceIssues` (`cli/shots/report.ts`),
|
||||
`tests/feature-fit.test.ts` (geometry, both templates rendered at 1024 x 500, a bleeding fixture).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue