[PM-38153] feat: Add Passport add/edit screens#2763
Conversation
57081fb to
6c00a53
Compare
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed the Passport add/edit screens implementation, including the new Code Review DetailsNo findings. The change is consistent with established patterns:
The minor nits (docs, TODO reference, formatter extraction) were already raised and resolved in existing review threads. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## vault/pm-38152-ios-passport-vault-list #2763 +/- ##
==========================================================================
+ Coverage 86.94% 86.96% +0.01%
==========================================================================
Files 1896 1901 +5
Lines 180095 180903 +808
==========================================================================
+ Hits 156592 157318 +726
- Misses 23503 23585 +82 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Adds the add/edit SwiftUI surface for Passport items: 13 fields in the Figma order, with passport number and national identification number as hidden fields with reveal toggles, and date of birth, issue date, and expiration date rendered read-only (long localized display, raw ISO round-trip) pending the shared DateFieldPicker (PM-38360). Exposes Passport in the add-item picker gated behind the newItemTypes flag, injects ConfigService into VaultRepository for that gating, wires the state to SDK PassportView round-trip, and shows the add-item FAB on the Passports group screen.
Wire passport through both response-model BitwardenSdk.Cipher inits so a synced passport's fields survive sync-to-store and populate the edit form.
6c00a53 to
51079e5
Compare
|
Warning @SaintPatrck Uploading code coverage report failed. Please check the "Upload to codecov.io" step of Process Test Reports job for more details. |
|
Warning @SaintPatrck Uploading code coverage report failed. Please check the "Upload to codecov.io" step of Process Test Reports job for more details. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2763 +/- ##
==========================================
- Coverage 87.93% 87.01% -0.92%
==========================================
Files 1728 1920 +192
Lines 168727 182989 +14262
==========================================
+ Hits 148365 159236 +10871
- Misses 20362 23753 +3391 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…ssport-add-edit # Conflicts: # BitwardenResources/Localizations/en.lproj/Localizable.strings # BitwardenShared/Core/Vault/Models/Enum/CipherType.swift # BitwardenShared/Core/Vault/Models/Enum/CipherTypeTests.swift # BitwardenShared/UI/Vault/Vault/VaultGroup/VaultGroupState.swift # BitwardenShared/UI/Vault/VaultItem/CipherItemStateTests.swift
fedemkr
left a comment
There was a problem hiding this comment.
Looks good, just one really small ⛏️
| ? addEditState.driversLicenseItemState.driversLicenseView | ||
| : nil, | ||
| passport: passport, // TODO: PM-32805 | ||
| passport: (addEditState.type == .passport) ? addEditState.passportItemState.passportView : nil, |
There was a problem hiding this comment.
⛏️ No need for the parenthesis here.
| passport: (addEditState.type == .passport) ? addEditState.passportItemState.passportView : nil, | |
| passport: addEditState.type == .passport ? addEditState.passportItemState.passportView : nil, |
There was a problem hiding this comment.
@fedemkr This follows the pattern used by surrounding types; login, identity, card, etc.. Unless there's a strong argument for passport being different I think we should maintain consistency. If we don't want the unnecessary parenthesis, we can open a follow-up PR to remove them for all the types above.
There was a problem hiding this comment.
Interesting, I hadn't noticed that. Yes, I'll create a tech-debt task for it ♻️, thanks for spotting it Patrick!
There was a problem hiding this comment.
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-38153
📔 Objective
Adds the add/edit screen for Passport vault items: all passport fields in design order, with passport number and national identification number as hidden fields with reveal toggles, and date of birth, issue date, and expiration date shown as read-only localized dates. Passport is available in the add-item picker behind the
newItemTypesfeature flag and round-trips through the SDK on save.📸 Screenshots
Edit passport
Add passport