Skip to content
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

[PM-13029] Add copy button items to more fields #1063

Merged
merged 9 commits into from
Oct 28, 2024

Conversation

aj-rosado
Copy link
Contributor

🎟️ Tracking

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

📔 Objective

Added copy button to itemview Identity and note fields

📸 Screenshots

notes with copy button identity with copy buttons

⏰ 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

Copy link
Contributor

github-actions bot commented Oct 21, 2024

Logo
Checkmarx One – Scan Summary & Detailsbf4bc5bf-bd8b-4db4-81f0-92984cda8e75

No New Or Fixed Issues Found

@fedemkr fedemkr changed the title [PM-13029] add copy button items to more fields [PM-13029] Add copy button items to more fields Oct 21, 2024
Comment on lines 67 to 68
action: @escaping () -> Void,
accessibilityIdentifier: String = "") {
Copy link
Member

Choose a reason for hiding this comment

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

🎨 Invert the order of this so the action can be called using trailing closures.

Comment on lines 84 to 85
action: @escaping () async -> Void,
accessibilityIdentifier: String = "") {
Copy link
Member

Choose a reason for hiding this comment

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

🎨 Invert the order of this so the action can be called using trailing closures.

Comment on lines 130 to 131
copyButtonAction: @escaping () -> Void,
copyButtonAccessibilityIdentifier: String
Copy link
Member

Choose a reason for hiding this comment

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

🎨 Invert the order of this so the copyButtonAction can be called using trailing closures, if needed.

valueAccessibilityIdentifier: "IdentitySsnEntry"
value: socialSecurityNumber,
valueAccessibilityIdentifier: "IdentitySsnEntry",
copyButtonAction: { store.send(.copyPressed(value: socialSecurityNumber, field: .socialSecurityNumber)) },
Copy link
Member

Choose a reason for hiding this comment

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

⛏️ Line length > 120.

value: socialSecurityNumber,
valueAccessibilityIdentifier: "IdentitySsnEntry",
copyButtonAction: { store.send(.copyPressed(value: socialSecurityNumber, field: .socialSecurityNumber)) },
copyButtonAccessibilityIdentifier: "IdentityCopySocialSecurityNumberButton"
Copy link
Member

Choose a reason for hiding this comment

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

🎨 As the value accessibility identifier we're using IdentitySsnEntry with "Social security number" as "Ssn", so unless QA automation folks think differently we should maintain the same approach here as well => "IdentityCopySsnButton".

Comment on lines 70 to 89
title: Localizations.email,
title: email,
Copy link
Member

Choose a reason for hiding this comment

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

⚠️ I believe the title should be the localized string email. Was there a product change for this?

Comment on lines 130 to 131
/// The identity address field.
case notes
Copy link
Member

Choose a reason for hiding this comment

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

⛏️ It seems the comment is wrong.

Copy link

codecov bot commented Oct 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.39%. Comparing base (cee1ad4) to head (ac1823b).
Report is 15 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1063      +/-   ##
==========================================
+ Coverage   89.37%   89.39%   +0.02%     
==========================================
  Files         672      672              
  Lines       42364    42455      +91     
==========================================
+ Hits        37861    37954      +93     
+ Misses       4503     4501       -2     

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

# Conflicts:
#	BitwardenShared/UI/Vault/VaultItem/ViewItem/ViewItemDetailsView.swift
#	BitwardenShared/UI/Vault/VaultItem/ViewItem/__Snapshots__/ViewItemViewTests/test_snapshot_identity_withAllValues_largeText.1.png
#	BitwardenShared/UI/Vault/VaultItem/ViewItem/__Snapshots__/ViewItemViewTests/test_snapshot_login_disabledViewPassword.1.png
#	BitwardenShared/UI/Vault/VaultItem/ViewItem/__Snapshots__/ViewItemViewTests/test_snapshot_login_hiddenTotp.1.png
#	BitwardenShared/UI/Vault/VaultItem/ViewItem/__Snapshots__/ViewItemViewTests/test_snapshot_login_withAllValues.1.png
#	BitwardenShared/UI/Vault/VaultItem/ViewItem/__Snapshots__/ViewItemViewTests/test_snapshot_login_withAllValues_exceptTotp_noPremium.1.png
#	BitwardenShared/UI/Vault/VaultItem/ViewItem/__Snapshots__/ViewItemViewTests/test_snapshot_login_withAllValues_noPremium.1.png
#	BitwardenShared/UI/Vault/VaultItem/ViewItem/__Snapshots__/ViewItemViewTests/test_snapshot_previews_login.1.png
#	BitwardenShared/UI/Vault/VaultItem/ViewItem/__Snapshots__/ViewItemViewTests/test_snapshot_previews_login_dark.1.png
Copy link
Member

@fedemkr fedemkr left a comment

Choose a reason for hiding this comment

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

⛏️ Check automatic PR files annotations to fix warnings and also add missing tests.

Copy link
Member

@fedemkr fedemkr left a comment

Choose a reason for hiding this comment

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

Looks good 🎉

@aj-rosado aj-rosado merged commit ca586ba into main Oct 28, 2024
9 checks passed
@aj-rosado aj-rosado deleted the PM-13029/add-copy-button-items branch October 28, 2024 11:21
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.

2 participants