fix(frame): render iPhone chassis and cutouts correctly - #10
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
bezelAPI compatible. The frame rotates that geometry with the device and includes it inframeOuterSize. 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 (
44pxtop,48pxbottom and a30pxbutton) 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-typespnpm lintpnpm test(1,071 tests, 0 skipped)pnpm buildstatus-bar="hidden"Checklist
pnpm lintpasses with zero warningsCHANGELOG.mdupdated under## [Unreleased](if user-facing)