[PR #4430] [MERGED] [PM-13349] Hide edit button unless item is in at least one non-readOnly collection #4941

Closed
opened 2025-11-26 23:51:49 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/4430
Author: @mpbw2
Created: 12/6/2024
Status: Merged
Merged: 1/6/2025
Merged by: @mpbw2

Base: mainHead: pm-13349/prevent-edit-readonly-collection


📝 Commits (10+)

  • 5c8a055 [PM-13349] Hide edit button unless item is in at least one non-readOnly collection
  • 142aa40 Merge branch 'main' into pm-13349/prevent-edit-readonly-collection
  • 7ea0952 use SDK provided state instead
  • f7a5a49 Merge branch 'main' into pm-13349/prevent-edit-readonly-collection
  • 6544775 Revert "use SDK provided state instead"
  • 4d76e26 retain view testability while using SDK state
  • 6252784 Merge branch 'main' into pm-13349/prevent-edit-readonly-collection
  • 23e4a9e fix test
  • ac2d022 Merge branch 'main' into pm-13349/prevent-edit-readonly-collection
  • f566b45 update tests from main

📊 Changes

7 files changed (+162 additions, -22 deletions)

View changed files

📝 app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemViewModel.kt (+11 -1)
📝 app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/model/VaultItemStateData.kt (+2 -0)
📝 app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/util/CipherViewExtensions.kt (+2 -0)
📝 app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemScreenTest.kt (+2 -0)
📝 app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemViewModelTest.kt (+130 -21)
📝 app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/item/util/CipherViewExtensionsTest.kt (+13 -0)
📝 app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/item/util/VaultItemTestUtil.kt (+2 -0)

📄 Description

Hide edit button unless item is in at least one non-readOnly collection

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-13349

📔 Objective

Hide the edit button (FAB) if an item is in a readOnly collection, or in the case of multiple collections at least one has to be non-readOnly or the button remains hidden.

📸 Screenshots

Item view from within non-readOnly (editable) collection:

Screenshot 2024-12-06 at 4 33 20 PM

Item view from within readOnly (non-editable) collection:

Screenshot 2024-12-06 at 4 32 54 PM

Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation 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/4430 **Author:** [@mpbw2](https://github.com/mpbw2) **Created:** 12/6/2024 **Status:** ✅ Merged **Merged:** 1/6/2025 **Merged by:** [@mpbw2](https://github.com/mpbw2) **Base:** `main` ← **Head:** `pm-13349/prevent-edit-readonly-collection` --- ### 📝 Commits (10+) - [`5c8a055`](https://github.com/bitwarden/android/commit/5c8a055975b111274b53b37021ee7ba62734b507) [PM-13349] Hide edit button unless item is in at least one non-readOnly collection - [`142aa40`](https://github.com/bitwarden/android/commit/142aa401129478d01bff9648e03244ff3d172751) Merge branch 'main' into pm-13349/prevent-edit-readonly-collection - [`7ea0952`](https://github.com/bitwarden/android/commit/7ea095236c2ca5e665ff34299a1e07b39a796eba) use SDK provided state instead - [`f7a5a49`](https://github.com/bitwarden/android/commit/f7a5a49e6240b2401e34808ce340e884b087cea8) Merge branch 'main' into pm-13349/prevent-edit-readonly-collection - [`6544775`](https://github.com/bitwarden/android/commit/65447750ea1958b663ce43760e068fcb8a7eee02) Revert "use SDK provided state instead" - [`4d76e26`](https://github.com/bitwarden/android/commit/4d76e26729e50ab29b012cfc717250fb275b606f) retain view testability while using SDK state - [`6252784`](https://github.com/bitwarden/android/commit/62527847aaab9b5a5daf30d245d227dbd40c24c8) Merge branch 'main' into pm-13349/prevent-edit-readonly-collection - [`23e4a9e`](https://github.com/bitwarden/android/commit/23e4a9e5c07be3e05df16c9659d49524723da399) fix test - [`ac2d022`](https://github.com/bitwarden/android/commit/ac2d02214cbae3844ad35355d4d79796e4fc4df5) Merge branch 'main' into pm-13349/prevent-edit-readonly-collection - [`f566b45`](https://github.com/bitwarden/android/commit/f566b45b6385069f7370249d5e480edaade58961) update tests from main ### 📊 Changes **7 files changed** (+162 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemViewModel.kt` (+11 -1) 📝 `app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/model/VaultItemStateData.kt` (+2 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/util/CipherViewExtensions.kt` (+2 -0) 📝 `app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemScreenTest.kt` (+2 -0) 📝 `app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemViewModelTest.kt` (+130 -21) 📝 `app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/item/util/CipherViewExtensionsTest.kt` (+13 -0) 📝 `app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/item/util/VaultItemTestUtil.kt` (+2 -0) </details> ### 📄 Description Hide edit button unless item is in at least one non-readOnly collection ## 🎟️ Tracking https://bitwarden.atlassian.net/browse/PM-13349 ## 📔 Objective Hide the edit button (FAB) if an item is in a readOnly collection, or in the case of multiple collections at least one has to be non-readOnly or the button remains hidden. ## 📸 Screenshots Item view from within non-readOnly (editable) collection: ![Screenshot 2024-12-06 at 4 33 20 PM](https://github.com/user-attachments/assets/decfb185-dbe5-4b7f-a2ca-7025739a5089) Item view from within readOnly (non-editable) collection: ![Screenshot 2024-12-06 at 4 32 54 PM](https://github.com/user-attachments/assets/00b3f995-4fdd-49e9-8819-72dbd0c82acf) ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation 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 2025-11-26 23:51:49 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#4941