feat(data): point empty wallet at the scan-QR button - #680
feat(data): point empty wallet at the scan-QR button#680dobby-coder[bot] wants to merge 1 commit into
Conversation
Refocus the empty wallet on scanning a Yivi QR code as the primary call to action. The empty-state copy (data_tab.empty.title/subtitle, nl/en/de) now tells users to scan a Yivi QR code, and the pointing graphic in _NoCredentialsYet points at the scan-QR button instead of the "+" button. The "+" button stays available as a secondary way to obtain data. The scan-QR button lives in HomeScreen, so its key is created there and passed down into the data tab; HomeScreen becomes stateful to hold a page-scoped key (a truly global key would clash while GoRouter keeps multiple HomeScreen instances alive during transitions). Closes #649 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
🎬 Recorded 1 changed integration test(s) on iOS simulator (
Download the videos from the Artifacts section of the run: https://github.com/privacybydesign/irmamobile/actions/runs/30138570318 |
There was a problem hiding this comment.
VERDICT: approve
Rules Dobby 2 — sign-off (cycle 1)
Rule sweep + review pass complete on this self-authored PR. No blocking issues.
Correctness (verified against the diff):
- GlobalKey rework is sound:
_scanButtonKeyis owned by_HomeScreenState, wrapped around the scan FAB viaKeyedSubtree, and threaded downDataTab → _AllCredentialsList → _NoCredentialsYet → _ToScanButtonPointingImage. Scoping it to the State (not a top-level global) is the right call given GoRouter keeps twoHomeScreeninstances alive across transitions. - The
StatelessWidget → StatefulWidgetconversion drops no needed const constructor; the rotation math is untouched and null-guards the render boxes. - Integration-test key rename (
to_add_data_button_pointing_image→to_scan_button_pointing_image) matches the widget'sTransformkey. Consistent.
i18n: title/subtitle changed symmetrically in nl, en and de; copy is plain and instructional in all three.
Closing ref: closingIssuesReferences correctly resolves to issue #649 (the intended issue) — auto-close on merge is wired.
No conventional-commit workflow in this repo, and the title is conventional anyway.
One non-blocking nit inline (already flagged by the author) — not merge-blocking.
| children: [ | ||
| SizedBox(height: theme.defaultSpacing), | ||
| _ToAddDataButtonPointingImage(addDataButtonKey: addDataButtonKey), | ||
| _ToScanButtonPointingImage(scanButtonKey: scanButtonKey), |
There was a problem hiding this comment.
Non-blocking (nit): in portrait the pointing graphic sits at the top of the column while the scan FAB is center-docked at the bottom, so the arrow points across the whole screen (through the title/subtitle) rather than at a nearby target — a weaker affordance than the old short up-point to the app-bar "+". You already flagged this in the "Note for review"; repositioning the graphic lower in the column would give a shorter, clearer point. Not blocking sign-off.
What
Refocuses the empty wallet on scanning a Yivi QR code as the primary call to action, following the direction that supersedes the earlier attempts in #614 and #615 (both since closed).
data_tab.empty.title/data_tab.empty.subtitle(nl, en and de) to tell users to scan a Yivi QR code, with the "+" button mentioned as a secondary way to obtain data._NoCredentialsYetfrom the "+" button onto the scan-QR button (IrmaQrScanButton). The "+" button stays in place, just no longer the thing the graphic points at.How
The scan-QR button lives in
HomeScreen(as the floating action button), while the graphic lives in the data tab's subtree. To let the graphic find the button's location,HomeScreennow owns the button'sGlobalKeyand passes it down intoDataTab.HomeScreenbecomes aStatefulWidgetso the key is stable across rebuilds; it stays scoped to theStaterather than a top-level global, because a truly global key would clash while GoRouter keeps twoHomeScreeninstances alive during a transition (the same reason the old code passed the "+" key down the tree).The pointing widget's rotation math is unchanged: it already aims at whatever render box it is handed, so retargeting the key is enough.
Testing
flutter analyzeclean on the changed files (one pre-existingonReorderdeprecation is untouched).flutter testinyivi_corepasses (168 tests), includinglocale_completeness_testwhich checks the three locale files stay in sync.empty-app-shows-imagestill asserts the graphic is present; its key was renamed fromto_add_data_button_pointing_imagetoto_scan_button_pointing_imageto match.Note for review
The graphic now points down at the scan button at the bottom of the screen rather than up at the "+" in the app bar. The layout of the empty state is unchanged, so let me know if you'd like the graphic repositioned within the column for a shorter, clearer point.
Closes #649