Skip to content

feat(password-engine): service abstraction, animated generator UI#40

Merged
dhruvanbhalara merged 7 commits into
mainfrom
feat/password-engine-service-abstraction-pubdev
Mar 24, 2026
Merged

feat(password-engine): service abstraction, animated generator UI#40
dhruvanbhalara merged 7 commits into
mainfrom
feat/password-engine-service-abstraction-pubdev

Conversation

@dhruvanbhalara

@dhruvanbhalara dhruvanbhalara commented Mar 23, 2026

Copy link
Copy Markdown
Owner

Overview

Introduces a PasswordEngineService abstraction layer, migrates password_engine to pub.dev, refactors the generator UI with animations and a shared layout shell, and cleans up theme tokens throughout.


Changes

Dependencies

  • Switch password_engine from a git path to the official pub.dev package
  • Add flutter_animate and animations for UI motion primitives

Design System

  • New AppFeatureShell — shared scrollable-layout component with optional FAB overlay; eliminates duplicated Scaffold/CustomScrollView/PageHeader boilerplate across generator, strategy, and settings screens
  • New AppColors.white, AppColors.black, AppColors.transparent tokens; replace all direct Colors.black, Colors.white, Colors.transparent references across all theme presets (amoled, dark, light) and AppTheme

Password Engine — Domain & Service Layer

  • New PasswordEngineService abstract interface
  • New PasswordEngineServiceImpl — wraps the pub.dev package; registered via DI
  • New PasswordFeedback entity with strength, score, entropy, warning, and suggestions fields
  • Refactor EstimatePasswordStrengthUsecase and GeneratePasswordUsecase to depend on PasswordEngineService instead of the package directly

Generator Feature

  • Convert GeneratorScreen to StatefulWidget; track refresh tick for animated FAB icon
  • Animated FAB — rotating refresh icon using flutter_animate
  • Animated password display — PageTransitionSwitcher + SharedAxisTransition (vertical) + fade/slide/shimmer on password text change
  • New PasswordFeedbackView — displays warning and up to 3 suggestions from PasswordFeedback
  • New PasswordGenerationControlsCard — extracted to its own file, now handles both random and memorable strategies (word count + separator controls)
  • New LengthStepperButton + GeneratorToggleTile extracted to generator_control_widgets.dart
  • New GeneratorBloc events: GeneratorWordCountChanged, GeneratorSeparatorChanged

Settings Feature

  • strategy_screen, strategy_editor_screen, and strategy_editor migrated to use AppFeatureShell
  • New settings_screen_helpers.dart — extracts helper action methods out of settings_screen.dart
  • StrategyPreviewCard updated to reflect new PasswordFeedback entity shape
  • StrategyPreviewBloc/StrategyPreviewState updated to use PasswordFeedback

Add/Edit Password

  • New AddEditPasswordErrorCodes class
  • AddEditPasswordBloc and AddEditPasswordState updated for new service layer contracts

Localisation

  • New strings: wordCountLabel, separatorLabel, separatorNone, memorableStrategy, randomStrategy, randomStrategyTitle, randomStrategySubtitle, memorableStrategyTitle, memorableStrategySubtitle, strategyTypeSubtitle

Tests

  • New generator_control_widgets_test.dart
  • New password_engine_service_impl_test.dart
  • New settings_screen_helpers_test.dart
  • New import_export_bloc_actions_and_props_test.dart (split from import_export_bloc_test.dart)
  • New add_edit_password_error_codes_test.dart
  • Updated: generator_bloc_test, generator_screen_test, estimate_password_strength_usecase_test, generate_password_usecase_test, add_edit_password_bloc_test, strategy_preview_bloc_test, settings_screen_test, strategy_editor_test
  • All 400 tests pass

Stats

36 files changed · +1834 insertions · -737 deletions

📊 Code Coverage Report

Metric Value
Total Lines 4901
Lines Hit 3960
Overall Coverage 80.80%

Generated by PassVault CI

@dhruvanbhalara dhruvanbhalara added the enhancement New feature or request label Mar 23, 2026
@dhruvanbhalara dhruvanbhalara self-assigned this Mar 23, 2026
@dhruvanbhalara dhruvanbhalara changed the title feat(password-engine): service abstraction, pub.dev migration & UI refactor feat(password-engine): service abstraction, animated generator UI & pub.dev migration Mar 23, 2026
….dev

- Switch password_engine from git path to pub.dev (^1.0.0)
- Add flutter_animate and animations for UI motion primitives
- Add AppColors.white, AppColors.black, AppColors.transparent tokens
- Replace all Colors.black/white/transparent refs across amoled, dark, light presets
- Update AppTheme to use token-based colors for input borders, app bar, cards, switches
- Update AppIconBadge and AppListOption doc examples to use semantic tokens
… strategy screens

- Add AppFeatureShell: shared scrollable layout with optional FAB overlay
- Migrate GeneratorScreen to use AppFeatureShell (convert to StatefulWidget for refresh animation)
- Migrate StrategyScreen, StrategyEditorScreen, StrategyEditor to use AppFeatureShell
- Add animated FAB with rotating refresh icon using flutter_animate
- Move helper action methods from settings_screen.dart to settings_screen_helpers.dart
- Reduce settings_screen.dart complexity
…ntrol widgets

- Add PasswordFeedbackView: displays warning and suggestions from PasswordFeedback
- Extract PasswordGenerationControlsCard to own file with word count + separator support
- Extract LengthStepperButton + GeneratorToggleTile to generator_control_widgets.dart
- Add PageTransitionSwitcher + SharedAxisTransition for animated password display
- Add fade/slide/shimmer animations on password text change
- Update StrategyPreviewCard for new PasswordFeedback entity shape
…d UI refactor

- Add generator_control_widgets_test, settings_screen_helpers_test
- Add import_export_bloc_actions_and_props_test (split from import_export_bloc_test)
- Update generator_bloc_test, generator_screen_test for new PasswordFeedback shape
- Update add_edit_password_bloc_test, strategy_preview_bloc_test
- Update settings_screen_test, strategy_editor_test, main_shell_test
- Remove hardcoded UI literals from filter chips test
@dhruvanbhalara dhruvanbhalara force-pushed the feat/password-engine-service-abstraction-pubdev branch from 709f6fb to 34d2246 Compare March 23, 2026 16:33
@dhruvanbhalara dhruvanbhalara changed the title feat(password-engine): service abstraction, animated generator UI & pub.dev migration feat(password-engine): service abstraction, animated generator UI Mar 24, 2026
@dhruvanbhalara dhruvanbhalara merged commit e1bd34d into main Mar 24, 2026
3 checks passed
@dhruvanbhalara dhruvanbhalara deleted the feat/password-engine-service-abstraction-pubdev branch March 24, 2026 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant