8000 [PM-10403] Added SSH key cipher item view by fedemkr · Pull Request #921 · bitwarden/ios · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[PM-10403] Added SSH key cipher item view #921

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Oct 3, 2024
Merged

Conversation

fedemkr
Copy link
Member
@fedemkr fedemkr commented Sep 12, 2024

🎟️ Tracking

PM-10403

📔 Objective

Add new SSH key cipher item type view and use it in the cipher item view and edition.

Note: This is not the complete feature as it needs the SSH key item to be added to the SDK to completely work. But added the new behavior in all places possible before the SDK update.

📸 Screenshots

View SSH Key cipher item

View SSH Key cipher item

Edit SSH Key cipher item

Edit SSH Key cipher item

⏰ 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

@fedemkr fedemkr marked this pull request as draft September 12, 2024 18:40
Copy link
codecov bot commented Sep 12, 2024

Codecov Report

Attention: Patch coverage is 97.57282% with 5 lines in your changes missing coverage. Please review.

Project coverage is 89.10%. Comparing base (5fc811a) to head (ca2164b).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...red/Core/Vault/Extensions/BitwardenSdk+Vault.swift 33.33% 2 Missing ⚠️
...red/UI/Vault/VaultItem/ViewItem/ViewItemView.swift 94.59% 2 Missing ⚠️
...t/VaultItem/AddEditItem/AddEditItemProcessor.swift 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #921      +/-   ##
==========================================
+ Coverage   89.05%   89.10%   +0.04%     
==========================================
  Files         654      656       +2     
  Lines       41057    41261     +204     
==========================================
+ Hits        36562    36764     +202     
- Misses       4495     4497       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…git push operation"

This reverts commit 5de479516e28654bd0613ecd0eecc48b4b03ac1f.
Copy link
Contributor
github-actions bot commented Sep 12, 2024

Logo
Checkmarx One – Scan Summary & Details60d86ec0-5307-4673-86fb-5876e2f36903

No New Or Fixed Issues Found

Copy link
Contributor
@KatherineInCode KatherineInCode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻 Seems very reasonable so far!

@@ -137,7 +137,7 @@ struct AddEditItemView: View {
BitwardenMenuField(
title: Localizations.type,
accessibilityIdentifier: "ItemTypePicker",
options: CipherType.allCases,
options: CipherType.allCases.filter { $0 != .sshKey },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 Instead of filtering here, could we possibly put a property on CipherType to enumerate all the types that are addable by the mobile app? Just a thought, especially in case we add more types down the line that need to be filtered out in this sort of situation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense, I'll make the change.

// MARK: - SSHKeyItemState

/// The state for an SSH key item.
struct SSHKeyItemState: Equatable, Sendable {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎨 We are super inconsistent about it in the codebase, but I personally prefer to treat acronyms as words in and of themselves when doing casing, because it makes things a little easier to read (even though control-arrow movement now seems to handle it correctly in Xcode). So I would call this SshKeyItemState. Again, we're inconsistent and there are good arguments either way, so probably a moot point.

// TODO: PM-10401 create state when SDK is updated
SSHKeyItemState(
isPrivateKeyVisible: false,
privateKey: "TestPrivateKey",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 Should these be "Test" or just empty?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The user can't trigger this flow so I'm fine with any content. Maybe "Test" or "TODO" make more sense to explicitly indicate something is needed to be changed there yet.

@fedemkr fedemkr marked this pull request as ready for review September 18, 2024 18:14
…TestHelpers/Alert+TestHelpers.swift

Co-authored-by: Katherine Bertelsen <kbertelsen@bitwarden.com>
8000
KatherineInCode
KatherineInCode previously approved these changes Oct 1, 2024
@fedemkr fedemkr merged commit cab739d into main Oct 3, 2024
8 of 9 checks passed
@fedemkr fedemkr deleted the pm-10403/new-cipher-type-3 branch October 3, 2024 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0