-
Notifications
You must be signed in to change notification settings - Fork 16
Settings screen redesigned #207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Completed Tasks: 1. Added new localization keys to all ARB files (English, Spanish, Italian) 2. Updated settings screen structure to match about screen styling 3. Implemented info dialog functionality for each card 4. Updated card icons and preserved existing functionality 5. Generated localization files with build_runner 6. Tested functionality - all tests passing 🎨 New Design Features: - 4 distinct cards with proper spacing and styling: - Language Card: Globe icon + info dialog - Currency Card: Dollar sign icon + info dialog - Relays Card: Radio icon + info dialog - Mostro Card: Lightning bolt icon + info dialog - Consistent styling with about screen: - Card background: AppTheme.backgroundCard - Border styling with transparency - Proper text colors and sizing - Consistent padding and spacing - Info dialogs with helpful explanations for each setting 🔧 Technical Implementation: - Added LucideIcons import for new icons - Removed dependency on CustomCard widget - Implemented proper card structure with Container decoration - Added info dialog method copied from about screen - Updated app bar styling to match new theme - Preserved all existing functionality (providers, form handling, etc.)
WalkthroughThe settings screen was refactored to use modular private methods for each settings section, replacing Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant SettingsScreen
participant InfoDialog
User->>SettingsScreen: Tap info icon in a section
SettingsScreen->>InfoDialog: Call _showInfoDialog with context and text
InfoDialog-->>User: Display localized info dialog
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
🧹 Nitpick comments (1)
lib/features/settings/settings_screen.dart (1)
253-253: Add const modifier to RelaySelectorIf RelaySelector has a const constructor, it should be instantiated as const for better performance.
- RelaySelector(), + const RelaySelector(),
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
lib/features/settings/settings_screen.dart(2 hunks)lib/l10n/intl_en.arb(1 hunks)lib/l10n/intl_es.arb(1 hunks)lib/l10n/intl_it.arb(1 hunks)test/mocks.mocks.dart(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.dart
Instructions used from:
Sources:
📄 CodeRabbit Inference Engine
- CLAUDE.md
test/**/*.dart
Instructions used from:
Sources:
📄 CodeRabbit Inference Engine
- CLAUDE.md
lib/l10n/intl_{en,es,it}.arb
Instructions used from:
Sources:
📄 CodeRabbit Inference Engine
- CLAUDE.md
🧠 Learnings (6)
📓 Common learnings
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Applies to lib/features/**/{screens,widgets}/*.dart : Always use localized strings: Replace hardcoded text with `S.of(context)!.keyName`
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Applies to lib/features/**/{screens,widgets}/*.dart : Use `S.of(context).yourKey` for all user-facing strings
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Applies to lib/features/**/{screens,widgets}/*.dart : Pass BuildContext to methods that need localization
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Applies to lib/features/**/{screens,widgets}/*.dart : Keep UI code declarative and side-effect free
test/mocks.mocks.dart (10)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Applies to test/mocks.dart : Mocks should be generated using Mockito in `test/mocks.dart`
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: All changes should pass `flutter analyze` before commit
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Applies to lib/features/**/{screens,widgets}/*.dart : Keep UI code declarative and side-effect free
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Applies to **/*.dart : Remove unused imports and dependencies
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Applies to integration_test/**/*.dart : Integration tests should be placed in the `integration_test/` directory
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Applies to **/*.dart : Always use latest APIs (e.g., `withValues()` instead of `withOpacity()`)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Applies to {lib/generated/**/*.dart,**/*.g.dart} : Do not manually edit files in `lib/generated/` or any `*.g.dart` files
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Applies to **/*.dart : Use `const` constructors where possible
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Applies to lib/features/**/{screens,widgets}/*.dart : Use post-frame callbacks for side effects like SnackBars/dialogs
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Applies to test/**/*.dart : Unit tests should be placed in the `test/` directory
lib/l10n/intl_it.arb (3)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Applies to lib/l10n/intl_{en,es,it}.arb : Add new localization keys to all three ARB files (en, es, it)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Applies to lib/l10n/intl_{en,es,it}.arb : Use proper ARB metadata for parameterized strings
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Test localization changes in all supported languages
lib/l10n/intl_es.arb (3)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Applies to lib/l10n/intl_{en,es,it}.arb : Add new localization keys to all three ARB files (en, es, it)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Applies to lib/l10n/intl_{en,es,it}.arb : Use proper ARB metadata for parameterized strings
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Test localization changes in all supported languages
lib/l10n/intl_en.arb (3)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Applies to lib/l10n/intl_{en,es,it}.arb : Add new localization keys to all three ARB files (en, es, it)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Applies to lib/l10n/intl_{en,es,it}.arb : Use proper ARB metadata for parameterized strings
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Test localization changes in all supported languages
lib/features/settings/settings_screen.dart (11)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Applies to lib/features/**/{screens,widgets}/*.dart : Always use localized strings: Replace hardcoded text with `S.of(context)!.keyName`
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Applies to lib/features/**/{screens,widgets}/*.dart : Keep UI code declarative and side-effect free
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Applies to lib/features/**/{screens,widgets}/*.dart : Use `S.of(context).yourKey` for all user-facing strings
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Applies to lib/features/**/{screens,widgets}/*.dart : Pass BuildContext to methods that need localization
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Applies to lib/features/**/{screens,widgets}/*.dart : Use post-frame callbacks for side effects like SnackBars/dialogs
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Applies to lib/features/**/*.{dart} : Use Riverpod for all state management
Learnt from: chebizarro
PR: MostroP2P/mobile#74
File: lib/services/mostro_service.dart:70-76
Timestamp: 2025-05-06T15:49:26.443Z
Learning: In the Mostro Mobile codebase, Riverpod code generation is used with `@Riverpod` annotations. Providers like `eventStorageProvider` are generated in `.g.dart` files from annotated functions in the main provider files. These providers are accessible by importing the main provider file (e.g., `mostro_service_provider.dart`), not by importing a separate provider file.
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Applies to **/*.dart : Remove unused imports and dependencies
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Applies to lib/main.dart : Locales for timeago package are configured in `main.dart` with `timeago.setLocaleMessages()`
Learnt from: chebizarro
PR: MostroP2P/mobile#74
File: lib/services/mostro_service.dart:70-76
Timestamp: 2025-05-06T15:49:26.443Z
Learning: In the Mostro Mobile codebase, `eventStorageProvider` is exported from `package:mostro_mobile/shared/providers/mostro_service_provider.dart` and not from a separate `event_storage_provider.dart` file.
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T20:24:34.836Z
Learning: Applies to lib/features/**/{screens,widgets}/*.dart : Always check `mounted` before using context after async operations
🪛 RuboCop (1.76.1)
lib/l10n/intl_it.arb
[warning] 672-672: Duplicated key in hash literal.
(Lint/DuplicateHashKey)
lib/l10n/intl_es.arb
[warning] 664-664: Duplicated key in hash literal.
(Lint/DuplicateHashKey)
lib/l10n/intl_en.arb
[warning] 632-632: Duplicated key in hash literal.
(Lint/DuplicateHashKey)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (5)
lib/l10n/intl_it.arb (1)
674-679: Good addition, but confirm parity across all localesThe four new
*InfoTextkeys are present inintl_en.arbandintl_it.arbbutintl_es.arbwasn’t part of this PR. The build will fail once the l10n tool detects the missing keys.Please add identical keys (with Spanish translations or placeholders) to
lib/l10n/intl_es.arb.lib/l10n/intl_en.arb (1)
634-639: Locale coverage checkSame note as for the Italian file – make sure the new
languageInfoText,currencyInfoText,relaysInfoText, andmostroInfoTextkeys are added tointl_es.arbbefore runningflutter gen-l10n.lib/l10n/intl_es.arb (1)
666-670: Localization keys verified across all ARB filesAll four new keys—
languageInfoText,currencyInfoText,relaysInfoText, andmostroInfoText—are present inlib/l10n/intl_en.arb,lib/l10n/intl_es.arb, andlib/l10n/intl_it.arb. No further changes needed.lib/features/settings/settings_screen.dart (2)
373-415: Well-implemented info dialog methodThe dialog implementation correctly uses the
dialogContextparameter for navigation and follows proper localization practices.
78-78: UsewithValues()instead of deprecatedwithOpacity()According to the coding guidelines, always use the latest APIs. The
withOpacity()method is deprecated in favor ofwithValues().- border: Border.all(color: Colors.white.withValues(alpha: 0.1)), + border: Border.all(color: Colors.white.withValues(alpha: 0.1)),Wait, I see the code is already using
withValues(). This is correct and follows the latest API.Also applies to: 138-138, 205-205, 291-291, 347-347, 381-381
✅ Completed Tasks:
🎨 New Design Features:
🔧 Technical Implementation:
Summary by CodeRabbit
New Features
Style
Documentation