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-16807] Update text and behavior for show id/card vault settings #12808

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

evan-livefront
Copy link
Collaborator

🎟️ Tracking

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

📔 Objective

  • To change the default setting for IDs and Cards in vault suggestions to be turned off
  • For ID/Card to added to autofill suggestions when a relevant form is on the page
  • For ID/Card to always show when vault setting is enabled

⏰ 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 Jan 10, 2025

Logo
Checkmarx One – Scan Summary & Details564c02f1-716c-47d8-8eee-33842fe13639

New Issues

Severity Issue Source File / Package Checkmarx Insight
MEDIUM Client_Privacy_Violation /apps/browser/src/vault/popup/settings/trash-list-items-container/trash-list-items-container.component.ts: 51 Attack Vector
MEDIUM Client_Privacy_Violation /apps/browser/src/vault/popup/settings/trash-list-items-container/trash-list-items-container.component.ts: 56 Attack Vector
MEDIUM Client_Privacy_Violation /apps/browser/src/vault/popup/settings/trash-list-items-container/trash-list-items-container.component.ts: 56 Attack Vector
MEDIUM Client_Privacy_Violation /apps/browser/src/vault/popup/settings/trash-list-items-container/trash-list-items-container.component.ts: 56 Attack Vector
MEDIUM Client_Privacy_Violation /apps/browser/src/vault/popup/settings/trash-list-items-container/trash-list-items-container.component.ts: 51 Attack Vector
MEDIUM Client_Privacy_Violation /apps/browser/src/vault/popup/settings/trash-list-items-container/trash-list-items-container.component.ts: 51 Attack Vector
MEDIUM Client_Privacy_Violation /apps/cli/src/commands/get.command.ts: 162 Attack Vector
MEDIUM Client_Privacy_Violation /apps/cli/src/vault/models/cipher.response.ts: 34 Attack Vector

Fixed Issues

Severity Issue Source File / Package
MEDIUM Client_Privacy_Violation /apps/browser/src/vault/popup/settings/trash-list-items-container/trash-list-items-container.component.html: 6
MEDIUM Client_Privacy_Violation /apps/cli/src/commands/get.command.ts: 331

Copy link

codecov bot commented Jan 10, 2025

Codecov Report

Attention: Patch coverage is 33.33333% with 4 lines in your changes missing coverage. Please review.

Project coverage is 34.14%. Comparing base (b8f57f3) to head (93cbd2e).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
.../src/autofill/popup/settings/autofill.component.ts 0.00% 2 Missing ⚠️
.../services/vault-settings/vault-settings.service.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #12808   +/-   ##
=======================================
  Coverage   34.13%   34.14%           
=======================================
  Files        2936     2936           
  Lines       90433    90433           
  Branches    16989    16989           
=======================================
+ Hits        30869    30874    +5     
+ Misses      57107    57100    -7     
- Partials     2457     2459    +2     

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

@danielleflinn
Copy link
Member

@evan-livefront From a design perspective the local build looks good.

One thing that I was hoping we could do–which may not have been clear in the issue description–is migrate existing users using the current settings to this new setting in the following manner:

  • If users have the current settings "on" and are seeing cards/ids appear when we detect them to be relevant
    • then the new setting is "on" for this user and they see cards/ids always appear in Autofill Suggestions

The build from this PR doesn't seem to be working this way, however that could be a limitation of my testing set up. If this isn't included in the implementation, is it possible to do while keeping the default setting for new installs "off"?

cc: @jprusik

@evan-livefront
Copy link
Collaborator Author

@evan-livefront From a design perspective the local build looks good.

One thing that I was hoping we could do–which may not have been clear in the issue description–is migrate existing users using the current settings to this new setting in the following manner:

  • If users have the current settings "on" and are seeing cards/ids appear when we detect them to be relevant

    • then the new setting is "on" for this user and they see cards/ids always appear in Autofill Suggestions

The build from this PR doesn't seem to be working this way, however that could be a limitation of my testing set up. If this isn't included in the implementation, is it possible to do while keeping the default setting for new installs "off"?

cc: @jprusik

So unless i'm mistaken, this setting should remain on if they currently have it on. Is that different from what you are describing here?

@danielleflinn
Copy link
Member

@evan-livefront yes, if it is "on" today it should remain "on"; but I wasn't seeing that behavior when testing locally so I just wanted to confirm that is how you implemented it in the code

@evan-livefront
Copy link
Collaborator Author

@evan-livefront yes, if it is "on" today it should remain "on"; but I wasn't seeing that behavior when testing locally so I just wanted to confirm that is how you implemented it in the code

I'll look into that. It should maintain the setting they currently have and that what I saw when I tested but maybe I was doing something differently. Were you reinstalling the extension from scratch?

@danielleflinn
Copy link
Member

@evan-livefront sorry for the back and forth on this-it is working as expected now though, Jon help me figure out what was up with my local testing process. Thanks for your patience!

@jprusik
Copy link
Contributor

jprusik commented Jan 13, 2025

I also smoke-tested and it LGTM

To put the changes another way, we're going from:
"Never show cards or identities in suggestions if the relevant option is not enabled"
"Sometimes show cards or identities in suggestions (when relevant field is detected on the page) if the relevant option is enabled"

to:
"Sometimes show cards or identities in suggestions (when relevant field is detected on the page) if the relevant option is not enabled"
"Always show cards or identities in suggestions if the relevant option is enabled"

Additionally, the default is for each settings input to be off, though if the user previously selected it, it will remain selected (and the user will get the updated/changed experience for the setting).

Copy link
Member

@gbubemismith gbubemismith left a comment

Choose a reason for hiding this comment

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

Everything looks good. I just left a question for @djsmith85

@@ -986,17 +986,17 @@
"addLoginNotificationDescAlt": {
"message": "Ask to add an item if one isn't found in your vault. Applies to all logged in accounts."
},
"showCardsInVaultView": {
"message": "Show cards as Autofill suggestions on Vault view"
"showCardsInVaultViewV2": {
Copy link
Member

Choose a reason for hiding this comment

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

@djsmith85 do we need new keys for this or can it just be renamed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The messages are immutable so a new key is required.

@jprusik did mention that once the old one has been removed it could reused again though so I don't know if it's possible (or desired) to change these, let the change propagate, and then change it back to the original? I had talked with him about this a bit and settled on this current versioning and deleting the old, unused key.

Copy link
Contributor

@jprusik jprusik Jan 13, 2025

Choose a reason for hiding this comment

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

Yeah, unfortunately we cannot simply update the copy for a given key, as that will mess with our translation automations at this time. We can safely delete keys (automation will remove corresponding translations on merge), or add new keys.

This change is effectively a removal of the old key and addition of a new one.

once the old one has been removed it could reused again

Yes, though I don't think it's worthwhile to bother with for now, and am not eager to test the robustness of the current automations around this. V2 is a good signpost of what has happened here imo.

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