Part of VAULT-77. This is BackupImportCodeScannerView and BackupImportCodeStateVisualizerView.
Now
- The title is "Import Vault". The sheet behind it says "Import", and the Restore page says Restore.
- Before the first code, the camera sits in the section header above a
PlaceholderView card: "Scan a QR code to start", "Face your camera at the codes located on your Vault export document."
- After the first code, the card becomes two
LabeledContent rows, "Total Codes" and "Scanned Codes", above a grid of qrcode glyphs. A scanned glyph drops to 5% opacity and a green checkmark appears over it.
- None of this animates, and there's no haptic when a code is scanned.
Change
- Match the title to the rest of the sheet, for example "Scan Backup".
- Replace the placeholder card with a centred headline under the camera, in the
BackupHeroHeader style but more compact: the camera is the real hero here, so drop the big symbol or make it small. For example, "Scan the QR codes" with the subtitle "From a PDF backup, or the Export screen on another device. Any order works."
- Replace the two
LabeledContent rows with one progress line, such as "3 of 8 scanned", using .contentTransition(.numericText()) as AutoBackupProgressView does. An optional ProgressView(value:) bar can go under it.
- When a code is scanned:
- its tile animates, for example the
qrcode glyph replaced by a checkmark with a bounce;
- a light impact haptic plays;
- scanning a code that's already been scanned does neither.
- When the last code arrives, play a success haptic before the sheet moves on to decrypting.
- With Reduce Motion, use crossfades only and no bounce.
Done when
- Scanning feels alive: every new code visibly ticks off, with a light haptic, and the count animates.
- The screen's headline and title match the rest of the import sheet.
BackupImportCodeStateVisualizerViewSnapshotTests is re-recorded. Add a snapshot for the scanner's partly-scanned state if the camera can be stubbed; if it can't, note that on this issue.