Skip to content

fix(frame): render iPhone chassis and cutouts correctly - #10

Merged
lbb00 merged 2 commits into
mainfrom
fix/legacy-iphone-shell
Sep 8, 2026
Merged

fix(frame): render iPhone chassis and cutouts correctly#10
lbb00 merged 2 commits into
mainfrom
fix/legacy-iphone-shell

Conversation

@lbb00

@lbb00 lbb00 commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

Home-button iPhones currently put a square screen inside a uniformly thin rounded body, leaving black wedges at all four corners and no physical Home button. Hosts that set status-bar="hidden" also lose the Dynamic Island or notch even though those are physical screen cutouts, not status-bar content.

This adds optional per-edge shell insets and Home button geometry while keeping the existing uniform bezel API compatible. The frame rotates that geometry with the device and includes it in frameOuterSize. Status-bar text, icons and background can now be hidden without removing the physical cutout; embedded and landscape frames retain their existing behavior. The public shell fields and reflected bezel variables are documented in both English and Chinese.

The shared legacy shell values (44px top, 48px bottom and a 30px button) are presentation geometry in DeviceKit's CSS coordinate system, chosen and visually checked in the frame demo. They are not measurements of the physical hardware.

How was this verified?

  • pnpm check-types
  • pnpm lint
  • pnpm test (1,071 tests, 0 skipped)
  • pnpm build
  • Chrome rendering in the frame demo for iPhone SE, iPhone 7 Plus, landscape iPhone SE, and iPhone 17 Pro Max with status-bar="hidden"

Checklist

  • Tests added or updated (bug fixes include a test that failed before the fix)
  • pnpm lint passes with zero warnings
  • CHANGELOG.md updated under ## [Unreleased] (if user-facing)

@lbb00
lbb00 merged commit a84d7e7 into main Sep 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant