From 832350f7a039860d87919957fb2af8bccbe8298f Mon Sep 17 00:00:00 2001 From: Ryszard Schossler <51096731+LynxLynxx@users.noreply.github.com> Date: Mon, 4 Nov 2024 15:12:34 +0100 Subject: [PATCH] refactor(cat-voices): choose other wallet clarification (#1116) * refactor: move uikit_example into utilities dir * fix: exclude example packages from melos bootstrap * refactor: move poc_local_storage into catalyst_voices/utilities * refactor: move catalyst_voices_remote_widgets package to catalyst_voices/utilities dir * refactor: move scripts into catalyst_voices dir * refactor: move catalyst_voices/packages into catalyst_voices/packages/internal * refactor: move catalyst_voices_packages into catalyst_voices/packages/external * refactor: move melos.yaml into catalyst_voices * refactor: move app into apps/voices dir * refactor: rename packages/external to packages/libs * docs: update README * fix: builder target * fix: update paths in Earthfile * fix: uikit_example pubspec + libs examples deps override * chore: test * fix: update cspell and check markdown rules * fix: README formatting * fix: build-web target path * fix: remove build-web target suffix separator * fix: wallet-automation tests target path * fix: wallet-automation builder target * fix: voices automation tests target * fix: code-generator target path * fix: vscode launch.recommended paths * feat: catalyst_voices justfile * refactor: rename catalyst_voices_remote_widgets to remote_widgets * fix: remote_widget spelling and licence checks * fix: remote_widget analyzer * refactor: move repo-catalyst-voices from root Earthfile to catalyst_voices/Earthfile * fix: file drop * fix: force downgraded version of flutter_dropzone * chore: update repository links + codeowners paths * fix: deploy uikit workflow * fix: uikit_example earthly build target * fix: uikit deploy workflow path * chore: integration tests docs readme paths * chore: remote widget readme path * chore: markdown ignore macos pods path fix * chore: add 'connectDifferentWallet' label for wallet connection in localization file * chore: integration test scripts * refactor: Replace button text "Back" with "Connect a different wallet" on the "wallet detection summary". Change layout from row to column * chore: build_runner assets * refactor: remove VoicesTextButton from RolesChooserPanel and clean up imports in wallet_link registration panel * fix: correct spelling of 'Registration' in wallet_details_panel.dart for consistency in widget names * chore: document flutter_dropzone issue * fix: correct spelling of 'Registration' in wallet_details_panel.dart for consistency in widget names * fix: remove unnecessary SizedBox in RolesChooserPanel --------- Co-authored-by: Damian Molinski Co-authored-by: Dominik Toton --- .../stage/roles_chooser_panel.dart | 10 ------- .../stage/wallet_details_panel.dart | 26 +++++++++++++++++-- .../catalyst_voices_localizations.dart | 6 +++++ .../catalyst_voices_localizations_en.dart | 3 +++ .../catalyst_voices_localizations_es.dart | 3 +++ .../lib/l10n/intl_en.arb | 6 ++++- 6 files changed, 41 insertions(+), 13 deletions(-) diff --git a/catalyst_voices/apps/voices/lib/pages/registration/wallet_link/stage/roles_chooser_panel.dart b/catalyst_voices/apps/voices/lib/pages/registration/wallet_link/stage/roles_chooser_panel.dart index 09fdde6561..3b2ffce09e 100644 --- a/catalyst_voices/apps/voices/lib/pages/registration/wallet_link/stage/roles_chooser_panel.dart +++ b/catalyst_voices/apps/voices/lib/pages/registration/wallet_link/stage/roles_chooser_panel.dart @@ -2,9 +2,7 @@ import 'package:catalyst_voices/pages/registration/wallet_link/account_role_dial import 'package:catalyst_voices/pages/registration/wallet_link/bloc_wallet_link_builder.dart'; import 'package:catalyst_voices/pages/registration/widgets/registration_stage_message.dart'; import 'package:catalyst_voices/pages/registration/widgets/registration_stage_navigation.dart'; -import 'package:catalyst_voices/widgets/buttons/voices_text_button.dart'; import 'package:catalyst_voices/widgets/containers/roles_chooser_container.dart'; -import 'package:catalyst_voices_assets/catalyst_voices_assets.dart'; import 'package:catalyst_voices_blocs/catalyst_voices_blocs.dart'; import 'package:catalyst_voices_localization/catalyst_voices_localization.dart'; import 'package:catalyst_voices_models/catalyst_voices_models.dart'; @@ -30,14 +28,6 @@ class RolesChooserPanel extends StatelessWidget { const _BlocRolesChooserContainer(), const Spacer(), const RegistrationBackNextNavigation(), - const SizedBox(height: 10), - VoicesTextButton( - leading: VoicesAssets.icons.wallet.buildIcon(), - onTap: () { - RegistrationCubit.of(context).chooseOtherWallet(); - }, - child: Text(context.l10n.chooseOtherWallet), - ), ], ); } diff --git a/catalyst_voices/apps/voices/lib/pages/registration/wallet_link/stage/wallet_details_panel.dart b/catalyst_voices/apps/voices/lib/pages/registration/wallet_link/stage/wallet_details_panel.dart index 0f665f30e5..9901f2be65 100644 --- a/catalyst_voices/apps/voices/lib/pages/registration/wallet_link/stage/wallet_details_panel.dart +++ b/catalyst_voices/apps/voices/lib/pages/registration/wallet_link/stage/wallet_details_panel.dart @@ -1,5 +1,4 @@ import 'package:catalyst_voices/pages/registration/wallet_link/bloc_wallet_link_builder.dart'; -import 'package:catalyst_voices/pages/registration/widgets/registration_stage_navigation.dart'; import 'package:catalyst_voices/pages/registration/widgets/wallet_connection_status.dart'; import 'package:catalyst_voices/pages/registration/widgets/wallet_summary.dart'; import 'package:catalyst_voices/widgets/widgets.dart'; @@ -104,7 +103,7 @@ class _BlocNavigation extends StatelessWidget { selector: (state) => state.hasEnoughBalance, builder: (context, state) { if (state) { - return const RegistrationBackNextNavigation(); + return const _RegistrationTextBackNextNavigation(); } else { return const _NotEnoughBalanceNavigation(); } @@ -125,3 +124,26 @@ class _NotEnoughBalanceNavigation extends StatelessWidget { ); } } + +class _RegistrationTextBackNextNavigation extends StatelessWidget { + const _RegistrationTextBackNextNavigation(); + + @override + Widget build(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + VoicesNextButton( + onTap: () => RegistrationCubit.of(context).nextStep(), + ), + const SizedBox(height: 10), + VoicesOutlinedButton( + onTap: () => RegistrationCubit.of(context).previousStep(), + child: Text( + context.l10n.connectDifferentWallet, + ), + ), + ], + ); + } +} diff --git a/catalyst_voices/packages/internal/catalyst_voices_localization/lib/generated/catalyst_voices_localizations.dart b/catalyst_voices/packages/internal/catalyst_voices_localization/lib/generated/catalyst_voices_localizations.dart index fff902da79..97407e607c 100644 --- a/catalyst_voices/packages/internal/catalyst_voices_localization/lib/generated/catalyst_voices_localizations.dart +++ b/catalyst_voices/packages/internal/catalyst_voices_localization/lib/generated/catalyst_voices_localizations.dart @@ -1899,6 +1899,12 @@ abstract class VoicesLocalizations { /// In en, this message translates to: /// **'Finish account creation'** String get finishAccountCreation; + + /// A button label to connect a different wallet in wallet detail panel. + /// + /// In en, this message translates to: + /// **'Connect a different wallet'** + String get connectDifferentWallet; } class _VoicesLocalizationsDelegate extends LocalizationsDelegate { diff --git a/catalyst_voices/packages/internal/catalyst_voices_localization/lib/generated/catalyst_voices_localizations_en.dart b/catalyst_voices/packages/internal/catalyst_voices_localization/lib/generated/catalyst_voices_localizations_en.dart index abdb807ee3..b35c281e55 100644 --- a/catalyst_voices/packages/internal/catalyst_voices_localization/lib/generated/catalyst_voices_localizations_en.dart +++ b/catalyst_voices/packages/internal/catalyst_voices_localization/lib/generated/catalyst_voices_localizations_en.dart @@ -994,4 +994,7 @@ class VoicesLocalizationsEn extends VoicesLocalizations { @override String get finishAccountCreation => 'Finish account creation'; + + @override + String get connectDifferentWallet => 'Connect a different wallet'; } diff --git a/catalyst_voices/packages/internal/catalyst_voices_localization/lib/generated/catalyst_voices_localizations_es.dart b/catalyst_voices/packages/internal/catalyst_voices_localization/lib/generated/catalyst_voices_localizations_es.dart index 4599a36cd3..fb7b6d9584 100644 --- a/catalyst_voices/packages/internal/catalyst_voices_localization/lib/generated/catalyst_voices_localizations_es.dart +++ b/catalyst_voices/packages/internal/catalyst_voices_localization/lib/generated/catalyst_voices_localizations_es.dart @@ -994,4 +994,7 @@ class VoicesLocalizationsEs extends VoicesLocalizations { @override String get finishAccountCreation => 'Finish account creation'; + + @override + String get connectDifferentWallet => 'Connect a different wallet'; } diff --git a/catalyst_voices/packages/internal/catalyst_voices_localization/lib/l10n/intl_en.arb b/catalyst_voices/packages/internal/catalyst_voices_localization/lib/l10n/intl_en.arb index f8617677cb..5c8841c526 100644 --- a/catalyst_voices/packages/internal/catalyst_voices_localization/lib/l10n/intl_en.arb +++ b/catalyst_voices/packages/internal/catalyst_voices_localization/lib/l10n/intl_en.arb @@ -971,5 +971,9 @@ "incorrectUploadDialogSubtitle": "CATALYST KEY INCORRECT", "incorrectUploadDialogContent": "The Catalyst keychain that you entered or uploaded is incorrect, please try again.", "incorrectUploadDialogTryAgainButton": "Try again", - "finishAccountCreation": "Finish account creation" + "finishAccountCreation": "Finish account creation", + "connectDifferentWallet": "Connect a different wallet", + "@connectDifferentWallet": { + "description": "A button label to connect a different wallet in wallet detail panel." + } } \ No newline at end of file