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-15999] - use new generator components in desktop app #12639

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

Conversation

jaasen-livefront
Copy link
Collaborator

🎟️ Tracking

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

📔 Objective

This PR replaces the legacy credential generators with the new ones in the desktop app.

📸 Screenshots

Screen.Recording.2024-12-31.at.9.41.29.AM.mov

⏰ 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 Dec 31, 2024

Logo
Checkmarx One – Scan Summary & Details3a24f463-facb-408f-9dc4-bbe7549132f5

No New Or Fixed Issues Found

Copy link

codecov bot commented Dec 31, 2024

Codecov Report

Attention: Patch coverage is 0% with 34 lines in your changes missing coverage. Please review.

Project coverage is 33.72%. Comparing base (75f75dc) to head (1ce63ae).
Report is 30 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...app/vault/credential-generator-dialog.component.ts 0.00% 20 Missing ⚠️
...pps/desktop/src/vault/app/vault/vault.component.ts 0.00% 14 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12639      +/-   ##
==========================================
- Coverage   33.76%   33.72%   -0.05%     
==========================================
  Files        2912     2919       +7     
  Lines       90791    91026     +235     
  Branches    17177    17207      +30     
==========================================
+ Hits        30655    30696      +41     
- Misses      57743    57930     +187     
- Partials     2393     2400       +7     

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

@audreyality audreyality requested review from audreyality and removed request for djsmith85 January 2, 2025 14:31
audreyality

This comment was marked as resolved.

audreyality

This comment was marked as resolved.

@jaasen-livefront
Copy link
Collaborator Author

@audreyality Thanks for your feedback. Should be gtg now. ;)

@audreyality audreyality removed their request for review January 2, 2025 20:25
audreyality

This comment was marked as outdated.

@jaasen-livefront
Copy link
Collaborator Author

jaasen-livefront commented Jan 2, 2025

👍🏻 Tools feedback addressed.

🤔 there's a deleted comment indicating that the revised logic should "use the cipher-form-generator component introduced with #11350".

Thanks for pointing that out. I've updated the component to instead use the CipherFormGeneratorComponent instead of the individual generators.

Copy link
Member

@audreyality audreyality left a comment

Choose a reason for hiding this comment

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

📝 I'm going to hold off on further reviews until this is signed off by @bitwarden/team-vault-dev

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.

Looks good! I just added a suggestion and a question

);

if (isGeneratorSwapEnabled) {
this.dialogService.open(CredentialGeneratorComponent, {
Copy link
Member

Choose a reason for hiding this comment

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

🎨 (non-blocking): Our dialogue components usually have a static open method that takes the dialog service and params as an argument. I think we can do something similar to keep things consistent.

Copy link
Collaborator Author

@jaasen-livefront jaasen-livefront Jan 3, 2025

Choose a reason for hiding this comment

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

@gbubemismith Gotcha. I was considering this but wasn't sure whether or not to keep the component as-is to allow for re-use in non dialog contexts. I've updated it to follow the existing dialog component patterns. :)

}

// TODO: Remove this when new generator feature is enabled
Copy link
Member

Choose a reason for hiding this comment

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

❓ is there a ticket tracking this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@gbubemismith Totally agree, I don't like leaving TODOs without an accompanying ticket. I've found and referenced the ticket number.

@bitwarden bitwarden deleted a comment from jordan-bite Jan 3, 2025
@bitwarden bitwarden deleted a comment from jordan-bite Jan 3, 2025
@@ -21,10 +21,19 @@ export type CredentialGeneratorParams = {
type: "password" | "username";
};

export const openCredentialGeneratorDialog = (
Copy link
Member

Choose a reason for hiding this comment

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

we need this in the component

static open(dialogService: DialogService, params: CredentialGeneratorParams) {}

and then you reference the static method in the vault component like so

CredentialGeneratorDialogComponent.open()

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@gbubemismith Gotcha! I was looking at a slightly different implementation. Should be gtg now.

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.

Just one last change

@jaasen-livefront jaasen-livefront requested review from audreyality and removed request for nick-livefront January 3, 2025 21:54
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