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-13999] show estimated tax for taxable countries #12245

Merged

Conversation

jonashendrickx
Copy link
Member

🎟️ Tracking

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

📔 Objective

  • Use Stripe for the sales tax estimation using the customer's tax id, postal code and country.
  • Display any errors returned by the backend
  • Restore and display any previously saved tax information or billing information.
  • Supports the AC-2476-deprecate-stripe-sources-api feature flag in both enabled/disabled state.
  • Removed duplicate sections related to updating tax information or billing information
  • Ability to enter tax information for consumers in individual plans.

📸 Screenshots

Bot postal code & country fields are required. Note that the checkbox to include a tax id is removed.

image

It also listens for additional fields, such as plan, billing interval, additional storage, additional seats, machine accounts, etc.

image

Tax id codes are validated by our backend using regular expressions to resolve the tax id type based on the selected country:

image

Error messages by Stripe are also handled now, example is not available.

image

⏰ 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

eliykat
eliykat previously approved these changes Dec 19, 2024
Copy link
Member

@eliykat eliykat left a comment

Choose a reason for hiding this comment

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

Feedback is non-blocking because I'm not a code owner, but worth checking I think.

Comment on lines 65 to 72
validate = (): boolean => {
this.formGroup.markAllAsTouched();
return this.formGroup.valid;
};
validate(): boolean {
if (this.formGroup.dirty) {
this.formGroup.markAllAsTouched();
return this.formGroup.valid;
} else {
return this.formGroup.valid;
}
}
Copy link
Member

Choose a reason for hiding this comment

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

🤔 I don't think component library forms require these kinds of workarounds (markAllAsTouched). You should just be able to check the formgroup's valid state. Maybe double check whether it's necessary and ask the design team.

@github-actions github-actions bot temporarily deployed to Web Vault - EU QA Cloud December 20, 2024 17:06 Inactive
@github-actions github-actions bot temporarily deployed to Web Vault - US QA Cloud December 23, 2024 15:56 Inactive
@github-actions github-actions bot temporarily deployed to Web Vault - US QA Cloud December 30, 2024 04:13 Inactive
@github-actions github-actions bot temporarily deployed to Web Vault - US QA Cloud December 30, 2024 16:47 Inactive
@jonashendrickx jonashendrickx requested review from a team and jrmccannon December 31, 2024 05:35
@jonashendrickx jonashendrickx removed the needs-qa Marks a PR as requiring QA approval label Dec 31, 2024
@jonashendrickx jonashendrickx requested review from a team January 2, 2025 19:17
@jonashendrickx jonashendrickx merged commit c724b0d into main Jan 2, 2025
73 of 75 checks passed
@jonashendrickx jonashendrickx deleted the PM-13999-Show-estimated-tax-for-taxable-countries branch January 2, 2025 19:28
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.

6 participants