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

enhancement: UI for multiple totp elements #12404

Conversation

dan-livefront
Copy link
Collaborator

@dan-livefront dan-livefront commented Dec 13, 2024

🎟️ Tracking

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

📔 Objective

When there are multiple totp inline menu elements rendered for the same login, display the username for that login

Changes:

  • Add multipleTotpElements method, I took the approach of filtering ciphers that have both totp codes and are a totpField, if the length is greater than 1 return true
  • Utilize multipleTotpElements method to set a condition which will render and display the username
  • Updated the subtitleElement name to totpCodeSpan since it will potentially not be a subtitle
  • Added test for the case where there are multiple totp elements

📸 Screenshots

Screenshot 2024-12-13 at 3 53 08 PM

⏰ 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

@dan-livefront dan-livefront self-assigned this Dec 13, 2024
Copy link
Contributor

github-actions bot commented Dec 13, 2024

Logo
Checkmarx One – Scan Summary & Details6d902925-84fb-4698-885c-c6b7a06c5154

New Issues

Severity Issue Source File / Package Checkmarx Insight
MEDIUM Client_Privacy_Violation /apps/browser/src/autofill/overlay/inline-menu/pages/list/autofill-inline-menu-list.ts: 130 Attack Vector
MEDIUM Client_Privacy_Violation /apps/browser/src/autofill/overlay/inline-menu/pages/list/autofill-inline-menu-list.ts: 86 Attack Vector
MEDIUM Client_Privacy_Violation /apps/browser/src/autofill/overlay/inline-menu/pages/list/autofill-inline-menu-list.ts: 38 Attack Vector
MEDIUM Client_Privacy_Violation /apps/browser/src/autofill/overlay/inline-menu/pages/list/autofill-inline-menu-list.ts: 1253 Attack Vector
MEDIUM Client_Privacy_Violation /apps/browser/src/autofill/overlay/inline-menu/pages/list/autofill-inline-menu-list.ts: 1166 Attack Vector
MEDIUM Client_Privacy_Violation /apps/browser/src/autofill/overlay/inline-menu/pages/list/autofill-inline-menu-list.ts: 1166 Attack Vector
MEDIUM Client_Privacy_Violation /bitwarden_license/bit-web/src/app/tools/access-intelligence/password-health.component.html: 40 Attack Vector
MEDIUM Client_Privacy_Violation /bitwarden_license/bit-web/src/app/tools/access-intelligence/password-health.component.html: 50 Attack Vector

Fixed Issues

Severity Issue Source File / Package
MEDIUM Client_Privacy_Violation /apps/browser/src/autofill/overlay/inline-menu/pages/list/autofill-inline-menu-list.ts: 1166
MEDIUM Client_Privacy_Violation /bitwarden_license/bit-web/src/app/tools/access-intelligence/password-health.component.html: 40
MEDIUM Client_Privacy_Violation /bitwarden_license/bit-web/src/app/tools/access-intelligence/password-health.component.html: 50
MEDIUM Client_Privacy_Violation /apps/browser/src/autofill/overlay/inline-menu/pages/list/autofill-inline-menu-list.ts: 130
MEDIUM Client_Privacy_Violation /apps/browser/src/autofill/overlay/inline-menu/pages/list/autofill-inline-menu-list.ts: 86
MEDIUM Client_Privacy_Violation /apps/browser/src/autofill/overlay/inline-menu/pages/list/autofill-inline-menu-list.ts: 38

Copy link

codecov bot commented Dec 13, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 33.50%. Comparing base (a4db527) to head (bdd11dc).
Report is 46 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...nline-menu/pages/list/autofill-inline-menu-list.ts 83.33% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #12404   +/-   ##
=======================================
  Coverage   33.50%   33.50%           
=======================================
  Files        2916     2917    +1     
  Lines       91158    91168   +10     
  Branches    17351    17349    -2     
=======================================
+ Hits        30540    30546    +6     
- Misses      58211    58221   +10     
+ Partials     2407     2401    -6     

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

@dan-livefront dan-livefront marked this pull request as ready for review December 16, 2024 18:17
@dan-livefront dan-livefront requested a review from a team as a code owner December 16, 2024 18:17
danielleflinn
danielleflinn previously approved these changes Dec 16, 2024
@dan-livefront
Copy link
Collaborator Author

jprusik
jprusik previously approved these changes Dec 18, 2024
Copy link
Contributor

@jprusik jprusik left a comment

Choose a reason for hiding this comment

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

One non-blocking nit, otherwise LGTM (I smoke-tested as well). Thank you!

…ill-inline-menu-list.ts

Co-authored-by: Jonathan Prusik <jprusik@users.noreply.github.com>
@dan-livefront dan-livefront dismissed stale reviews from jprusik and danielleflinn via bdd11dc December 18, 2024 22:17
@dan-livefront dan-livefront merged commit cc06e1e into main Dec 20, 2024
27 checks passed
@dan-livefront dan-livefront deleted the PM-15437-Inline-autofill-TOTP-UI-for-multiple-matching-logins branch December 20, 2024 16:33
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