trackslash
VAULT-80 P2

QR import: headline under the camera and animate each code as it's scanned

0
Sub-issue of VAULT-77 P2 Make the import flow look like the other backup screens

Description

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.

Linked issues

0

GitHub

0

No branches or pull requests linked.

Comments

1
Bradley

Done in https://github.com/badbundle/vault-app/pull/692, merged as 612725e4.

  • Camera in snapshots: the camera could be stubbed. In the simulator, the scanner package shows its own simulator view, so BackupImportCodeScannerViewSnapshotTests shows the part-scanned state (3 of 8 codes). The PNGs are about 580 KB each because of the gradient, so only that state is recorded. If a package update changes that view's text, they'll need recording again.
  • Beyond the ticket: codes that can't be put together play the error haptic.