Skip to content

Commit 260966d

Browse files
author
Rob
committed
Merge branch 'demo-fixes' into 'main'
Demo fixes See merge request wallet/nl-wallet!868
2 parents 3eaeccd + 070dac4 commit 260966d

File tree

5 files changed

+19
-18
lines changed

5 files changed

+19
-18
lines changed

wallet_app/lib/l10n/intl_en.arb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"@@locale": "en",
3-
"@@last_modified": "2024-04-25T11:06:00+02:00",
3+
"@@last_modified": "2024-04-30T09:41:14+02:00",
44
"aboutScreenDescription": "This demo is realized by a collaboration of multiple organizations and was commissioned by the dutch government. For more information please refer to the website {url}.",
55
"aboutScreenDescriptionLink": "edi.pleio.nl",
66
"@aboutScreenDescriptionLink": {
@@ -953,7 +953,7 @@
953953
"organizationDetailScreenTitle": "About {name}",
954954
"organizationDetailScreenViewTerms": "View the general",
955955
"organizationDetailScreenWebsiteInfo": "Website",
956-
"pageIndicatorSemanticsLabel": "Step {current} of {total}",
956+
"pageIndicatorSemanticsLabel": "Step {current} out of {total}",
957957
"pidAddressCardTitle": "Residential address",
958958
"pidIdCardTitle": "Personal data",
959959
"pinBlockedScreenDescription": "You have entered your PIN code incorrectly too many times.\n\nDo you want to use the Wallet again? Then you have to start again. Clear the Wallet and choose a new PIN code.",
@@ -972,7 +972,7 @@
972972
}
973973
}
974974
},
975-
"pinErrorDialogForgotCodeCta": "FOTGOT PIN CODE?",
975+
"pinErrorDialogForgotCodeCta": "FORGOT PIN CODE?",
976976
"pinErrorDialogNonFinalRoundFinalAttempt": "You can try 1 more time. If the following PIN code is invalid, the app will be temporary blocked.",
977977
"pinErrorDialogNonFinalRoundInitialAttempt": "PIN code incorrect, try again.",
978978
"pinErrorDialogNonFinalRoundNonFinalAttempt": "You can try {count} more times.",

wallet_app/lib/l10n/intl_nl.arb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"@@locale": "nl",
3-
"@@last_modified": "2024-04-25T11:06:00+02:00",
3+
"@@last_modified": "2024-04-30T09:41:14+02:00",
44
"aboutScreenDescription": "Deze demo app is tot stand gekomen door een samenwerking van verschillende organisaties in opdracht van de Nederlandse Overheid. Voor meer informatie over deze app verwijzen we naar de website {url}.",
55
"aboutScreenPrivacyCta": "Privacybeleid",
66
"aboutScreenTermsCta": "Gebruiksvoorwaarden",
@@ -565,7 +565,7 @@
565565
"generalWCAGOpenLink": "Open link",
566566
"generalWCAGQr": "Scan QR code",
567567
"generalWCAGSeeAllActivities": "Bekijk alle activiteiten",
568-
"generalWCAGStepper": "Stap {current} of {total}.",
568+
"generalWCAGStepper": "Stap {current} van {total}.",
569569
"helpSheetCloseCta": "Sluiten",
570570
"helpSheetDescription": "Neem contact op met de helpdesk. De volgende gegevens kunnen nodig zijn.",
571571
"helpSheetErrorCode": "Foutcode: {code}",
@@ -997,7 +997,7 @@
997997
},
998998
"pinKeyboardWCAGBackspaceLabel": "Verwijder",
999999
"pinKeyboardWCAGBackspaceLongPressHint": "Alles te verwijderen",
1000-
"pinKeyboardWCAGDigitKeyTapHint": "invoer",
1000+
"pinKeyboardWCAGDigitKeyTapHint": "kiezen",
10011001
"pinScreenAboutAppTooltip": "Over de app",
10021002
"pinScreenAttemptsCount": "{count, plural, one {Je hebt nog {count} poging} other {Je hebt nog {count} pogingen}}",
10031003
"@pinScreenAttemptsCount": {

wallet_app/lib/src/util/helper/semantics_helper.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ class SemanticsHelper {
22
SemanticsHelper._();
33

44
/// If the input solely consists of positive digits, this method
5-
/// will return a comma separated list of those digits. Useful to
5+
/// will return a space separated list of those digits. Useful to
66
/// make a screen-reader read out the digits separately.
77
/// Otherwise it returns the original input.
88
static String splitNumberString(String input) {
99
if (input.trim().length != input.length) return input;
1010
final isPositiveInt = int.tryParse(input)?.isNegative == false;
11-
if (isPositiveInt) return input.split('').join(',');
11+
if (isPositiveInt) return input.split('').join(' ');
1212
return input;
1313
}
1414
}

wallet_app/lib/src/wallet_core/typed/typed_wallet_core.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,12 @@ class TypedWalletCore {
6868
}
6969

7070
void _setupCardsStream() async {
71-
_cards.onListen = () async {
72-
await _isInitialized.future;
73-
_walletCore.setCardsStream().listen((event) => _cards.add(event));
74-
};
75-
_cards.onCancel = () => _walletCore.clearCardsStream();
71+
//FIXME: Ideally we don't set the card stream until we start observing it (i.e. in onListen())
72+
//FIXME: but since the cards are not persisted yet that means we might miss events, so observing
73+
//FIXME: the wallet_core cards stream through the complete lifecycle of the app for now.
74+
//To reproduce issue: 1. Start clean, 2. Setup Wallet, 3. Kill app, 4. Continue Setup, 5. Cards don't show up on success page
75+
await _isInitialized.future;
76+
_walletCore.setCardsStream().listen((event) => _cards.add(event));
7677
}
7778

7879
void _setupRecentHistoryStream() {

wallet_app/test/src/util/helper/semantics_helper_test.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ void main() {
55
group('valid number strings', () {
66
test('number starting with 0 is split correctly', () {
77
String input = '01234';
8-
String expectedOutput = '0,1,2,3,4';
8+
String expectedOutput = '0 1 2 3 4';
99
expect(SemanticsHelper.splitNumberString(input), expectedOutput);
1010
});
1111
test('number starting with 1 is split correctly', () {
1212
String input = '1234';
13-
String expectedOutput = '1,2,3,4';
13+
String expectedOutput = '1 2 3 4';
1414
expect(SemanticsHelper.splitNumberString(input), expectedOutput);
1515
});
1616
test('single digit number is split correctly', () {
@@ -20,17 +20,17 @@ void main() {
2020
});
2121
test('two digit number is split correctly', () {
2222
String input = '34';
23-
String expectedOutput = '3,4';
23+
String expectedOutput = '3 4';
2424
expect(SemanticsHelper.splitNumberString(input), expectedOutput);
2525
});
2626
test('8 digit number is split correctly', () {
2727
String input = '12345678';
28-
String expectedOutput = '1,2,3,4,5,6,7,8';
28+
String expectedOutput = '1 2 3 4 5 6 7 8';
2929
expect(SemanticsHelper.splitNumberString(input), expectedOutput);
3030
});
3131
test('9 digit number is split correctly', () {
3232
String input = '123456789';
33-
String expectedOutput = '1,2,3,4,5,6,7,8,9';
33+
String expectedOutput = '1 2 3 4 5 6 7 8 9';
3434
expect(SemanticsHelper.splitNumberString(input), expectedOutput);
3535
});
3636
});

0 commit comments

Comments
 (0)