Skip to content

UI enhancements#19

Merged
Eoic merged 6 commits into
masterfrom
feature/ui-enhancements
Jul 14, 2026
Merged

UI enhancements#19
Eoic merged 6 commits into
masterfrom
feature/ui-enhancements

Conversation

@Eoic

@Eoic Eoic commented Jul 14, 2026

Copy link
Copy Markdown
Member

This pull request focuses on two main improvements to the add-book workflow: preserving the modal backdrop when transitioning from the add-book choice sheet to the digital import UI, and unifying the shapes of the action buttons in the import success state. It also introduces new and enhanced widget tests to ensure these UI behaviors remain robust and verifiable.

Modal Backdrop Continuity and UI Consistency Enhancements:

Add-book modal and import flow:

  • Refactored AddBookChoiceSheet from a StatelessWidget to a StatefulWidget, allowing it to swap its content between the choice options and the ImportBookSheet without closing the modal. This ensures the modal backdrop and route are preserved when transitioning to the digital import UI. (app/lib/widgets/add_book/add_book_choice_sheet.dart) [1] [2] [3]
  • Updated the digital import option to trigger an in-place state change rather than popping and pushing a new modal, maintaining a seamless user experience. (app/lib/widgets/add_book/add_book_choice_sheet.dart)

ImportBookSheet reusability and testability:

  • Added a test-only constructor ImportBookSheet.withInitialResult to allow deterministic rendering of the import success state in widget tests. The import sheet now accepts initial state and result parameters for flexible instantiation. (app/lib/widgets/add_book/import_book_sheet.dart) [1] [2]
  • Refactored the import sheet's build logic so both modal entry and in-place transitions share the same scrollable content and state management. (app/lib/widgets/add_book/import_book_sheet.dart)

UI polish and accessibility:

  • Applied explicit StadiumBorder (pill-shaped) styles to both the "Pick different file" (OutlinedButton) and "Add to library" (FilledButton) actions in the import success UI, ensuring visual consistency and accessibility. Also improved their disabled-state color handling and added a progress indicator for the commit action. (app/lib/widgets/add_book/import_book_sheet.dart)

Testing and regression coverage:

  • Added and extended widget tests to verify: (1) the modal backdrop remains unchanged during the digital import transition, (2) the import success state actions render correctly and have matching pill shapes, and (3) committing actions show progress and proper disabled states. (app/test/widgets/add_book/add_book_sheets_test.dart) [1] [2]
  • Introduced a navigator observer and test fixture to track modal transitions and validate UI continuity. (app/test/widgets/add_book/add_book_sheets_test.dart)

Documentation and implementation plans:

  • Added detailed implementation plans documenting the backdrop continuity and import action button shape improvements, including step-by-step tasks, rationale, and verification instructions. (docs/superpowers/plans/2026-07-14-add-book-backdrop-continuity.md, docs/superpowers/plans/2026-07-14-import-action-button-shapes.md) [1] [2]

Copilot AI review requested due to automatic review settings July 14, 2026 19:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Eoic
Eoic merged commit 40a6b03 into master Jul 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants