[PR #5863] [CLOSED] [PM-25643] Add image attachment preview feature #36602

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

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/5863
Author: @amrg101
Created: 9/10/2025
Status: Closed

Base: mainHead: main


📝 Commits (4)

  • fee56a5 Add image attachment preview
  • 2ed8425 Merge branch 'main' into main
  • e55b8ec Add image attachment preview
  • bc0641a Merge remote-tracking branch 'origin/main'

📊 Changes

13 files changed (+278 additions, -8 deletions)

View changed files

📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemAttachmentContent.kt (+18 -1)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemCardContent.kt (+2 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemIdentityContent.kt (+2 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemLoginContent.kt (+3 -1)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemScreen.kt (+13 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemSecureNoteContent.kt (+2 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemSshKeyContent.kt (+2 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemViewModel.kt (+71 -5)
app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/component/AttachmentPreviewDialog.kt (+135 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/handlers/VaultCommonItemTypeHandlers.kt (+4 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/util/CipherViewExtensions.kt (+14 -1)
ui/src/main/res/drawable/ic_preview.xml (+11 -0)
📝 ui/src/main/res/values/strings.xml (+1 -0)

📄 Description

🎟️ Tracking

https://community.bitwarden.com/t/view-attachments-without-downloading/52/19

📔 Objective

Viewing image attachments is a hassle since you have to download, save, and open them in another app.
This adds a built-in preview for images, Ideally, we’d have a full file manager that supports all types, but since images are the ones most often needing quick viewing, I think this is okay for now.

The implementation:

  • Downloads the file temporarily.
  • Loads and displays the image with zoom and pan support.
  • Automatically deletes the file once it has been loaded.

📸 Screenshots

https://github.com/user-attachments/assets/0c2cb40c-b7f2-44a1-b278-de5ea0092889

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/5863 **Author:** [@amrg101](https://github.com/amrg101) **Created:** 9/10/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (4) - [`fee56a5`](https://github.com/bitwarden/android/commit/fee56a5d9550982c3d0257ea177d27c74225e34f) Add image attachment preview - [`2ed8425`](https://github.com/bitwarden/android/commit/2ed8425b770409fcaa617cc736db2fbba9a0f9c8) Merge branch 'main' into main - [`e55b8ec`](https://github.com/bitwarden/android/commit/e55b8ecdc0967f299e5fb986101db98aebae4740) Add image attachment preview - [`bc0641a`](https://github.com/bitwarden/android/commit/bc0641ae089650e76039390483f61792b31cdf45) Merge remote-tracking branch 'origin/main' ### 📊 Changes **13 files changed** (+278 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemAttachmentContent.kt` (+18 -1) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemCardContent.kt` (+2 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemIdentityContent.kt` (+2 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemLoginContent.kt` (+3 -1) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemScreen.kt` (+13 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemSecureNoteContent.kt` (+2 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemSshKeyContent.kt` (+2 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemViewModel.kt` (+71 -5) ➕ `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/component/AttachmentPreviewDialog.kt` (+135 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/handlers/VaultCommonItemTypeHandlers.kt` (+4 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/util/CipherViewExtensions.kt` (+14 -1) ➕ `ui/src/main/res/drawable/ic_preview.xml` (+11 -0) 📝 `ui/src/main/res/values/strings.xml` (+1 -0) </details> ### 📄 Description ## 🎟️ Tracking https://community.bitwarden.com/t/view-attachments-without-downloading/52/19 ## 📔 Objective Viewing image attachments is a hassle since you have to download, save, and open them in another app. This adds a built-in preview for images, Ideally, we’d have a full file manager that supports all types, but since images are the ones most often needing quick viewing, I think this is okay for now. The implementation: - Downloads the file temporarily. - Loads and displays the image with zoom and pan support. - Automatically deletes the file once it has been loaded. ## 📸 Screenshots https://github.com/user-attachments/assets/0c2cb40c-b7f2-44a1-b278-de5ea0092889 ## ⏰ 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:46:27 -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#36602