[PR #6023] [MERGED] [PM-26803] Show empty state when no items are available for export #36746

Closed
opened 2026-04-21 03:53:36 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/6023
Author: @SaintPatrck
Created: 10/13/2025
Status: Merged
Merged: 10/14/2025
Merged by: @SaintPatrck

Base: mainHead: PM-26803/review-export_empty-state


📝 Commits (2)

  • ce5fa9f Add optional buttons to BitwardenEmptyContent
  • a199d66 [PM-26803] Show empty state when no items are available for export

📊 Changes

10 files changed (+385 additions, -74 deletions)

View changed files

📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/exportitems/reviewexport/ReviewExportNavigation.kt (+2 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/exportitems/reviewexport/ReviewExportScreen.kt (+90 -31)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/exportitems/reviewexport/ReviewExportViewModel.kt (+62 -10)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/exportitems/reviewexport/handlers/ReviewExportHandlers.kt (+4 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/exportitems/selectaccount/SelectAccountNavigation.kt (+10 -0)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/exportitems/reviewexport/ReviewExportScreenTest.kt (+48 -2)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/exportitems/reviewexport/ReviewExportViewModelTest.kt (+87 -31)
ui/src/main/kotlin/com/bitwarden/ui/platform/components/button/model/BitwardenButtonData.kt (+16 -0)
📝 ui/src/main/kotlin/com/bitwarden/ui/platform/components/content/BitwardenEmptyContent.kt (+63 -0)
📝 ui/src/main/res/values/strings.xml (+3 -0)

📄 Description

🎟️ 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

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/6023 **Author:** [@SaintPatrck](https://github.com/SaintPatrck) **Created:** 10/13/2025 **Status:** ✅ Merged **Merged:** 10/14/2025 **Merged by:** [@SaintPatrck](https://github.com/SaintPatrck) **Base:** `main` ← **Head:** `PM-26803/review-export_empty-state` --- ### 📝 Commits (2) - [`ce5fa9f`](https://github.com/bitwarden/android/commit/ce5fa9f510e5330d56cf3b7c14cba28bf208dd52) Add optional buttons to BitwardenEmptyContent - [`a199d66`](https://github.com/bitwarden/android/commit/a199d668d91b4a06bfdf331689c6f7f61c4bcaf5) [PM-26803] Show empty state when no items are available for export ### 📊 Changes **10 files changed** (+385 additions, -74 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/exportitems/reviewexport/ReviewExportNavigation.kt` (+2 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/exportitems/reviewexport/ReviewExportScreen.kt` (+90 -31) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/exportitems/reviewexport/ReviewExportViewModel.kt` (+62 -10) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/exportitems/reviewexport/handlers/ReviewExportHandlers.kt` (+4 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/exportitems/selectaccount/SelectAccountNavigation.kt` (+10 -0) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/exportitems/reviewexport/ReviewExportScreenTest.kt` (+48 -2) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/exportitems/reviewexport/ReviewExportViewModelTest.kt` (+87 -31) ➕ `ui/src/main/kotlin/com/bitwarden/ui/platform/components/button/model/BitwardenButtonData.kt` (+16 -0) 📝 `ui/src/main/kotlin/com/bitwarden/ui/platform/components/content/BitwardenEmptyContent.kt` (+63 -0) 📝 `ui/src/main/res/values/strings.xml` (+3 -0) </details> ### 📄 Description ## 🎟️ 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 <img width="365" src="https://github.com/user-attachments/assets/ae056c77-9da3-407f-91c5-11bd1a873267" /> ## ⏰ 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 <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-21 03:53:36 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#36746