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

[BITAU-131] Add Popup to QR Code Scan to Add Code to Bitwarden #177

Conversation

brant-livefront
Copy link
Collaborator

🎟️ Tracking

BITAU-131

📔 Objective

The main objective of this PR is to add the ability to save QR code scans in the Bitwarden PM app when they originate from the Authenticator app. There's a couple of pieces in support of this:

  • A new dialog that appears the first time and asks the user if they would like to save the code locally or send it to Bitwarden
  • A second new dialog that appears (only the first time) asking if they'd like to set whatever option they have chosen as their default.
  • A new pair of app settings
    • defaultSaveOption - this records where the user wants to save codes by default (locally, in Bitwarden, or ask each time)
    • hasSeenDefaultSaveOptionPrompt - this tells us if they've seen the dialog asking them to set their default. We only show it once. After that, everything is controlled by the defaultSaveOption.
  • A new row in Settings to allow the user to change their defaultSaveOption.

Dialog flow

  • If the user has seen the dialog about setting their default, we always respect their preference
    • This means we either immediately process the code (locally or sending it to the PM app), or we show the dialog and follow their choice from there.
  • If they have not seen the dialog:
    • First we show them the dialog asking where they'd like to save the code (over the QR scan view)
    • Second, we show them another dialog asking them if they'd like to make that their default (over the Item List view)
    • Finally, we save their choice and take action on their code (either saving locally or sending it to the PM app)

Testing notes

  • As with the other PRs, make sure you have both the PM and Auth feature flags enabled
  • Make sure you're using an otpauth:// style QR code
  • Make sure you've already enabled sync for at least one account in the PM app.

📸 Screenshots

IMG_3332
IMG_3334
IMG_3333
Simulator Screenshot - iPhone 15 Pro - 2024-10-25 at 12 04 26
Simulator Screenshot - iPhone 15 Pro - 2024-10-25 at 12 04 24

⏰ 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

codecov bot commented Oct 29, 2024

Codecov Report

Attention: Patch coverage is 79.56989% with 38 lines in your changes missing coverage. Please review.

Project coverage is 67.24%. Comparing base (e50d624) to head (2937ba0).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...d/UI/Platform/Settings/Settings/SettingsView.swift 30.18% 37 Missing ⚠️
...UI/Vault/ItemList/ItemList/ItemListProcessor.swift 98.73% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #177      +/-   ##
==========================================
+ Coverage   67.09%   67.24%   +0.14%     
==========================================
  Files         211      213       +2     
  Lines        9300     9473     +173     
==========================================
+ Hits         6240     6370     +130     
- Misses       3060     3103      +43     

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

Base automatically changed from brant/BITAU-130-add-option-to-manual-key-entry-for-adding-to-bitwarden to main November 6, 2024 22:06
Copy link
Contributor

github-actions bot commented Nov 6, 2024

Logo
Checkmarx One – Scan Summary & Details802c6eda-af6c-4d64-a71c-e15e65b63391

No New Or Fixed Issues Found

@brant-livefront brant-livefront merged commit 5a699f3 into main Nov 7, 2024
9 checks passed
@brant-livefront brant-livefront deleted the brant/BITAU-131-add-popup-to-qr-code-scan-to-add-code-to-bitwarden branch November 7, 2024 15:06
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.

4 participants