trackslash
VAULT-116 P2 For an agent

Lock screen: centre the vault door horizontally on the display, not the safe area (iPhone Duo unfolded)

0
All issues

Description

Bug

On the iPhone Duo, unfolded, with Vault locked, the vault door on the lock screen isn't centred on the display. The unfolded screen's safe area is wider on one side than the other, and the door is centred in the safe area, not on the screen, so it sits off to one side. The lock screen is a full-screen moment, so the door should sit in the true horizontal centre of the display, whatever the safe areas.

Cause

AppLockBackdrop (Vault/Sources/VaultiOS/Views/AppLock/AppLockBackdrop.swift) lays the door out in a GeometryReader that respects the safe area. The door and the details are in a VStack with .frame(maxWidth: .infinity), so they centre in the safe area's width. Only the background ignores the safe area.

The same backdrop is used by:

  • the lock screen (AppLockView);
  • the privacy cover (AppPrivacyCoverView);
  • the screen-capture cover (AppScreenCaptureCoverView).

So all three are off-centre in the same way. That at least means they still swap without the door moving.

Change

  • The door: centre it horizontally on the full display, ignoring the leading and trailing safe-area insets. Do it in AppLockBackdrop, so the lock screen and both covers stay in the same place and still swap without the door moving.
  • Its height is unchanged: the door's centre stays a third of the way down the safe area. Every iPhone's top and bottom insets differ (the Dynamic Island against the home indicator), so measuring from the full screen would move the door on every device. That's a separate design choice, if it's ever wanted.
  • The details and action: "Vault Locked", the message, and the password field and Unlock button stay readable and tappable. They're centred under the door where that fits, but never under a camera housing or rounded corner. Keep them inside the safe area, or inset them from the unsafe edge, whichever looks right on the unfolded screen.
  • Other devices are unchanged: any device whose safe area is symmetric left to right, which is every current iPhone in portrait and landscape, and the iPad, should look exactly as it does now.

Done when

  • On the iPhone Duo, unfolded, the door's centre is the screen's horizontal centre, on the lock screen and both covers.
  • A snapshot or layout test with unequal leading and trailing safe-area insets shows the door centred on the full width. Existing snapshots of symmetric devices don't change.
  • The text and controls never sit under the camera housing.

Sub-issues

0

Linked issues

0

GitHub

0

No branches or pull requests linked.

Comments

1
Bradley

Fixed in https://github.com/badbundle/vault-app/pull/727 (merged as f7f3675b).

  • AppLockBackdrop centres the door on the whole screen rather than its safe area, so the lock screen and the privacy and screen-capture covers all move together, and still swap without the door moving. Its height is unchanged.
  • The words and buttons beneath the door move across to be under it, as far as they can while staying inside the safe area: all the way where they fit, less where they're too wide. Nothing sits under a camera housing.
  • On screens with an even safe area (every current iPhone and the iPad), nothing changes, and every existing snapshot is the same.
  • New snapshots: the locked screen and its password with a safe area 96 points wider on one side, in light and dark, at medium and accessibility text sizes. CHANGELOG.md has it under Fixed.
  • Validated with the Mac UI tests skipped (VAULT_SKIP_MAC_UI_TESTS=1), as the Mac locked during the full run. The change is iOS-only.