[PR #2192] [MERGED] [EC-615] Apple Watch MVP Cipher details UI #3418

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

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/2192
Author: @fedemkr
Created: 11/15/2022
Status: Merged
Merged: 11/15/2022
Merged by: @fedemkr

Base: feature/apple-watch-mvpHead: feature/EC-615-apple-watch-mvp-cipher-detail


📝 Commits (10+)

  • 031bf19 Merge branch 'master' into feature/apple-watch-mvp-data
  • e6d0760 [EC-585] Added foundation classes on the watch to handle CoreData and some fixes on the communication of the ciphers, also some helper classes to store in keychain and encrypt data
  • d5517a1 Merge branch 'master' into feature/apple-watch-mvp-data
  • d84396e Merge branch 'master' into feature/apple-watch-mvp-data
  • 3620cb2 Merge branch 'master' into feature/apple-watch-mvp-data
  • 180043f EC-585 Added keychain helper, encryption helpers and added data storage using CoreData configuring it appropiately. View and ViewModel are here only to test that the fetching/saving works but it's not the actual UI of the watch app. Also removed all the places where the automatic file signature was added by XCode
  • 86c74e3 Merge branch 'master' into feature/apple-watch-mvp-data
  • aa4d36a Merge branch 'feature/apple-watch-mvp' into feature/EC-585-apple-watch-mvp-data
  • c4315f3 EC-585 Fixed CipherServiceMock to implement protocol
  • fae7aef EC-585 Fixed DeviceActionService duplicated services

📊 Changes

26 files changed (+827 additions, -33 deletions)

View changed files

src/watchOS/bitwarden/bitwarden WatchKit Extension/Assets.xcassets/DefaultCipherIcon.imageset/Contents.json (+23 -0)
src/watchOS/bitwarden/bitwarden WatchKit Extension/Assets.xcassets/DefaultCipherIcon.imageset/globe 1.svg (+3 -0)
src/watchOS/bitwarden/bitwarden WatchKit Extension/Assets.xcassets/DefaultCipherIcon.imageset/globe 2.svg (+3 -0)
src/watchOS/bitwarden/bitwarden WatchKit Extension/Assets.xcassets/DefaultCipherIcon.imageset/globe.svg (+3 -0)
src/watchOS/bitwarden/bitwarden WatchKit Extension/Controls/CircularProgressView.swift (+39 -0)
src/watchOS/bitwarden/bitwarden WatchKit Extension/Controls/ImageView.swift (+112 -0)
📝 src/watchOS/bitwarden/bitwarden WatchKit Extension/Entities/BitwardenDB.xcdatamodeld/BitwardenDB.xcdatamodel/contents (+1 -0)
📝 src/watchOS/bitwarden/bitwarden WatchKit Extension/Entities/CipherEntity+CoreDataClass.swift (+3 -1)
📝 src/watchOS/bitwarden/bitwarden WatchKit Extension/Entities/CipherEntity+CoreDataProperties.swift (+8 -1)
src/watchOS/bitwarden/bitwarden WatchKit Extension/Helpers/IconImageHelper.swift (+38 -0)
📝 src/watchOS/bitwarden/bitwarden WatchKit Extension/Models/Cipher.swift (+5 -0)
src/watchOS/bitwarden/bitwarden WatchKit Extension/Models/Mocks/CipherMock.swift (+16 -0)
src/watchOS/bitwarden/bitwarden WatchKit Extension/Services/CryptoFunctionService.swift (+25 -0)
src/watchOS/bitwarden/bitwarden WatchKit Extension/Services/EnvironmentService.swift (+27 -0)
📝 src/watchOS/bitwarden/bitwarden WatchKit Extension/Services/Mocks/CipherServiceMock.swift (+4 -9)
src/watchOS/bitwarden/bitwarden WatchKit Extension/Services/TotpService.swift (+133 -0)
src/watchOS/bitwarden/bitwarden WatchKit Extension/Utilities/Base32.swift (+58 -0)
src/watchOS/bitwarden/bitwarden WatchKit Extension/Utilities/DateExtensions.swift (+8 -0)
src/watchOS/bitwarden/bitwarden WatchKit Extension/Utilities/StringExtensions.swift (+19 -0)
src/watchOS/bitwarden/bitwarden WatchKit Extension/Utilities/UInt64Extensions.swift (+9 -0)

...and 6 more files

📄 Description

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

Add the UI of the cipher details to the Apple Watch MVP and also add helpers and service for TOTP generation.

Code changes

  • CipherDetailsView: Implemented cipher details view
  • CipherDetailsViewModel: Implemented cipher details viewmodel
  • CipherListView: Added navigation to be able to tap on a row and go to its details
  • CircularProgressView: Custom view to show a customizable circular progress
  • ImageView: Custom image view to load, cache and display external image on watchOS < 8
  • CipherEntity...: Added loginUris
  • IconImageHelper: Helper to get the uri of the login icon from the cipher
  • CryptoFunctionService: Service to ease the using on crypto functions like hmac
  • EnvironmentService: Service that has environment stuff. For now I'm not using a StateService like in other apps to keep it simple and I just save everything on the keychain
  • TotpService: Service for totp generation and helpers to get stuff from totp uris
  • Base32: Helper to convert string to base32

Screenshots

https://user-images.githubusercontent.com/15682323/201776589-5b6f08d0-0fe3-4a77-8d47-1a9aed153719.mov

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team

🔄 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/2192 **Author:** [@fedemkr](https://github.com/fedemkr) **Created:** 11/15/2022 **Status:** ✅ Merged **Merged:** 11/15/2022 **Merged by:** [@fedemkr](https://github.com/fedemkr) **Base:** `feature/apple-watch-mvp` ← **Head:** `feature/EC-615-apple-watch-mvp-cipher-detail` --- ### 📝 Commits (10+) - [`031bf19`](https://github.com/bitwarden/android/commit/031bf199d8d043953149be4bf1c1b34f13e7a5e3) Merge branch 'master' into feature/apple-watch-mvp-data - [`e6d0760`](https://github.com/bitwarden/android/commit/e6d076013e287117900262b7f7c985b8ebb0a324) [EC-585] Added foundation classes on the watch to handle CoreData and some fixes on the communication of the ciphers, also some helper classes to store in keychain and encrypt data - [`d5517a1`](https://github.com/bitwarden/android/commit/d5517a1a83270ac0713f47f34902ae5cee591fa1) Merge branch 'master' into feature/apple-watch-mvp-data - [`d84396e`](https://github.com/bitwarden/android/commit/d84396ec9b2237991273c78373e946aeb56efbc7) Merge branch 'master' into feature/apple-watch-mvp-data - [`3620cb2`](https://github.com/bitwarden/android/commit/3620cb2afe03ad9e675e93a945e543171d996321) Merge branch 'master' into feature/apple-watch-mvp-data - [`180043f`](https://github.com/bitwarden/android/commit/180043fac098e80a4588f2b2b7b3888e41a0b5c6) EC-585 Added keychain helper, encryption helpers and added data storage using CoreData configuring it appropiately. View and ViewModel are here only to test that the fetching/saving works but it's not the actual UI of the watch app. Also removed all the places where the automatic file signature was added by XCode - [`86c74e3`](https://github.com/bitwarden/android/commit/86c74e3131e2a457b90542817eb700dadca7c73a) Merge branch 'master' into feature/apple-watch-mvp-data - [`aa4d36a`](https://github.com/bitwarden/android/commit/aa4d36aefb0902b51bf96a4dfebecdf5b490ec6b) Merge branch 'feature/apple-watch-mvp' into feature/EC-585-apple-watch-mvp-data - [`c4315f3`](https://github.com/bitwarden/android/commit/c4315f3644a8f0603976b4844751a6f590bb4861) EC-585 Fixed CipherServiceMock to implement protocol - [`fae7aef`](https://github.com/bitwarden/android/commit/fae7aef41f9f989c8635510083be25623d0fbb68) EC-585 Fixed DeviceActionService duplicated services ### 📊 Changes **26 files changed** (+827 additions, -33 deletions) <details> <summary>View changed files</summary> ➕ `src/watchOS/bitwarden/bitwarden WatchKit Extension/Assets.xcassets/DefaultCipherIcon.imageset/Contents.json` (+23 -0) ➕ `src/watchOS/bitwarden/bitwarden WatchKit Extension/Assets.xcassets/DefaultCipherIcon.imageset/globe 1.svg` (+3 -0) ➕ `src/watchOS/bitwarden/bitwarden WatchKit Extension/Assets.xcassets/DefaultCipherIcon.imageset/globe 2.svg` (+3 -0) ➕ `src/watchOS/bitwarden/bitwarden WatchKit Extension/Assets.xcassets/DefaultCipherIcon.imageset/globe.svg` (+3 -0) ➕ `src/watchOS/bitwarden/bitwarden WatchKit Extension/Controls/CircularProgressView.swift` (+39 -0) ➕ `src/watchOS/bitwarden/bitwarden WatchKit Extension/Controls/ImageView.swift` (+112 -0) 📝 `src/watchOS/bitwarden/bitwarden WatchKit Extension/Entities/BitwardenDB.xcdatamodeld/BitwardenDB.xcdatamodel/contents` (+1 -0) 📝 `src/watchOS/bitwarden/bitwarden WatchKit Extension/Entities/CipherEntity+CoreDataClass.swift` (+3 -1) 📝 `src/watchOS/bitwarden/bitwarden WatchKit Extension/Entities/CipherEntity+CoreDataProperties.swift` (+8 -1) ➕ `src/watchOS/bitwarden/bitwarden WatchKit Extension/Helpers/IconImageHelper.swift` (+38 -0) 📝 `src/watchOS/bitwarden/bitwarden WatchKit Extension/Models/Cipher.swift` (+5 -0) ➕ `src/watchOS/bitwarden/bitwarden WatchKit Extension/Models/Mocks/CipherMock.swift` (+16 -0) ➕ `src/watchOS/bitwarden/bitwarden WatchKit Extension/Services/CryptoFunctionService.swift` (+25 -0) ➕ `src/watchOS/bitwarden/bitwarden WatchKit Extension/Services/EnvironmentService.swift` (+27 -0) 📝 `src/watchOS/bitwarden/bitwarden WatchKit Extension/Services/Mocks/CipherServiceMock.swift` (+4 -9) ➕ `src/watchOS/bitwarden/bitwarden WatchKit Extension/Services/TotpService.swift` (+133 -0) ➕ `src/watchOS/bitwarden/bitwarden WatchKit Extension/Utilities/Base32.swift` (+58 -0) ➕ `src/watchOS/bitwarden/bitwarden WatchKit Extension/Utilities/DateExtensions.swift` (+8 -0) ➕ `src/watchOS/bitwarden/bitwarden WatchKit Extension/Utilities/StringExtensions.swift` (+19 -0) ➕ `src/watchOS/bitwarden/bitwarden WatchKit Extension/Utilities/UInt64Extensions.swift` (+9 -0) _...and 6 more files_ </details> ### 📄 Description ## Type of change - [ ] Bug fix - [X] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective <!--Describe what the purpose of this PR is. For example: what bug you're fixing or what new feature you're adding--> Add the UI of the cipher details to the Apple Watch MVP and also add helpers and service for TOTP generation. ## Code changes <!--Explain the changes you've made to each file or major component. This should help the reviewer understand your changes--> <!--Also refer to any related changes or PRs in other repositories--> * **CipherDetailsView:** Implemented cipher details view * **CipherDetailsViewModel:** Implemented cipher details viewmodel * **CipherListView:** Added navigation to be able to tap on a row and go to its details * **CircularProgressView:** Custom view to show a customizable circular progress * **ImageView:** Custom image view to load, cache and display external image on watchOS < 8 * **CipherEntity...:** Added `loginUris` * **IconImageHelper:** Helper to get the uri of the login icon from the cipher * **CryptoFunctionService:** Service to ease the using on crypto functions like hmac * **EnvironmentService:** Service that has environment stuff. For now I'm not using a `StateService` like in other apps to keep it simple and I just save everything on the keychain * **TotpService:** Service for totp generation and helpers to get stuff from totp uris * **Base32:** Helper to convert string to base32 ## Screenshots <!--Required for any UI changes. Delete if not applicable--> https://user-images.githubusercontent.com/15682323/201776589-5b6f08d0-0fe3-4a77-8d47-1a9aed153719.mov ## Before you submit - Please check for formatting errors (`dotnet format --verify-no-changes`) (required) - Please add **unit tests** where it makes sense to do so (encouraged but not required) - If this change requires a **documentation update** - notify the documentation team - If this change has particular **deployment requirements** - notify the DevOps team --- <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:32:28 -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#3418