Skip to content

Conversation

@SaintPatrck
Copy link
Contributor

@SaintPatrck SaintPatrck commented Oct 13, 2025

🎟️ Tracking

PM-26803

📔 Objective

This commit introduces an empty state for the "Review Export" screen, which is displayed when there are no vault items available for export. This can occur if the vault is empty or if the item types are not supported for export.

When this empty state is shown, the user is presented with two options:

  • "Select a different account": This navigates the user back to the account selection screen.
  • "Cancel": This cancels the export process and completes the flow with a cancellation result.

Specific changes:

  • Updated ReviewExportViewModel to introduce a ViewState sealed class with Content and NoItems states. The view model now determines which state to show based on whether there are items to export.
  • Modified ReviewExportScreen to display a BitwardenEmptyContent composable when the state is NoItems.
  • Added a "Select a different account" button to the empty state, which triggers navigation back to the account selection screen.
  • Updated the "Cancel" button's behavior to complete the export with an ImportCredentialsCancellationException result.
  • Added new string resources for the empty state's title, text, and button labels.
  • Expanded ReviewExportViewModelTest and ReviewExportScreenTest to cover the new empty state and navigation logic.

📸 Screenshots

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@github-actions
Copy link
Contributor

github-actions bot commented Oct 13, 2025

Logo
Checkmarx One – Scan Summary & Detailsa49ad017-fa66-47a4-9e29-ffadf14e1213

Great job! No new security vulnerabilities introduced in this pull request

@codecov
Copy link

codecov bot commented Oct 13, 2025

Codecov Report

❌ Patch coverage is 89.83051% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.59%. Comparing base (912eba1) to head (a199d66).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
.../exportitems/reviewexport/ReviewExportViewModel.kt 81.48% 2 Missing and 3 partials ⚠️
...ure/exportitems/reviewexport/ReviewExportScreen.kt 96.55% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6023   +/-   ##
=======================================
  Coverage   84.59%   84.59%           
=======================================
  Files         722      722           
  Lines       54897    54958   +61     
  Branches     7581     7592   +11     
=======================================
+ Hits        46440    46494   +54     
- Misses       5800     5801    +1     
- Partials     2657     2663    +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This commit enhances the `BitwardenEmptyContent` composable to support optional primary and secondary action buttons.

A new data class, `BitwardenButtonData`, is introduced to encapsulate the data required for rendering a button, including its label, click action, and test tag.

The `BitwardenEmptyContent` composable has been updated to accept optional `BitwardenButtonData` for a primary (filled) and a secondary (outlined) button. When provided, these buttons are displayed below the main content text. The preview for this component has also been updated to demonstrate the new button functionality.
@SaintPatrck SaintPatrck force-pushed the PM-26803/review-export_empty-state branch from 5c8802e to 0e791ac Compare October 14, 2025 13:29
This commit introduces an empty state for the "Review Export" screen, which is displayed when there are no vault items available for export. This can occur if the vault is empty or if the item types are not supported for export.

When this empty state is shown, the user is presented with two options:
- "Select a different account": This navigates the user back to the account selection screen.
- "Cancel": This cancels the export process and completes the flow with a cancellation result.

Specific changes:
- Updated `ReviewExportViewModel` to introduce a `ViewState` sealed class with `Content` and `NoItems` states. The view model now determines which state to show based on whether there are items to export.
- Modified `ReviewExportScreen` to display a `BitwardenEmptyContent` composable when the state is `NoItems`.
- Added a "Select a different account" button to the empty state, which triggers navigation back to the account selection screen.
- Updated the "Cancel" button's behavior to complete the export with an `ImportCredentialsCancellationException` result.
- Added new string resources for the empty state's title, text, and button labels.
- Expanded `ReviewExportViewModelTest` and `ReviewExportScreenTest` to cover the new empty state and navigation logic.
@SaintPatrck SaintPatrck force-pushed the PM-26803/review-export_empty-state branch from 0e791ac to a199d66 Compare October 14, 2025 14:52
@SaintPatrck SaintPatrck added this pull request to the merge queue Oct 14, 2025
Merged via the queue into main with commit af737b3 Oct 14, 2025
9 checks passed
@SaintPatrck SaintPatrck deleted the PM-26803/review-export_empty-state branch October 14, 2025 20:41
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.

3 participants