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-8161] Payment optional trial MVP #10872

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

Conversation

cyprain-okeke
Copy link
Contributor

@cyprain-okeke cyprain-okeke commented Sep 3, 2024

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-8163
https://bitwarden.atlassian.net/browse/PM-8164
https://bitwarden.atlassian.net/browse/PM-8165
https://bitwarden.atlassian.net/browse/PM-8445

📔 Objective

The goal is to implement a feature flag that makes the payment step of the trial flow optional, display a visual indicator showing remaining trial time, allow the addition of payment details before the trial ends, and enhance the UI for organisation’s that are disabled due to failed or non-payment.

📸 Screenshots

Screen.Recording.2024-09-04.at.19.36.06.mov
Screen.Recording.2024-09-04.at.19.51.01.mov
Screen.Recording.2024-09-04.at.19.54.02.mov
Screen.Recording.2024-09-04.at.20.31.07.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 Sep 3, 2024

Logo
Checkmarx One – Scan Summary & Detailscaa0f93d-f9ea-44ac-a7fb-b16aa3a0087a

New Issues

Severity Issue Source File / Package Checkmarx Insight
LOW Client_DOM_Open_Redirect /apps/web/src/app/billing/organizations/payment-method/organization-payment-method.component.ts: 173 Attack Vector
LOW Client_DOM_Open_Redirect /apps/web/src/app/billing/shared/payment-method.component.ts: 145 Attack Vector
LOW Client_DOM_Open_Redirect /apps/web/src/app/billing/organizations/payment-method/organization-payment-method.component.ts: 143 Attack Vector
LOW Client_DOM_Open_Redirect /apps/web/src/app/billing/shared/payment-method.component.ts: 171 Attack Vector

Copy link
Contributor

@mzieniukbw mzieniukbw left a comment

Choose a reason for hiding this comment

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

There is room for improvement from Secrets Manager side of things, which could apply to different areas too (since there is a lot of repeating logic).

Questions:

  1. On the last video, which showcases a scenario of when the trial ended and a payment is successfully, subscribing the org to a plan - the icon on the organization suggests the organization is still disabled, while it just got re-enabled. Are we missing some state data refresh on a subscription added / org enabled ?(Observables chained). Or maybe you are supposed to logout and login to see the changes ?
  2. Can customer start SM trial during the 7 day PM trial ?
  3. Is self-hosted affected ? I.E. Trial ends, no payment made, but customer is already on self-hosted, does the license expire on the same time ?

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.

I have reviewed the changes that touched on the vault code and provided some suggestions in the comments, I also included some questions in the comments

@cyprain-okeke cyprain-okeke requested a review from a team as a code owner September 23, 2024 12:41
Copy link
Contributor

@mzieniukbw mzieniukbw left a comment

Choose a reason for hiding this comment

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

The SM free trial is still broken and prone to race conditions on org change. Have a look at my suggestions.

mzieniukbw
mzieniukbw previously approved these changes Oct 2, 2024
Copy link
Contributor

@mzieniukbw mzieniukbw left a comment

Choose a reason for hiding this comment

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

LGTM for SM changes.
Please make sure to update QA notes for SM and include regression testing during QA.

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.

These are just some little things I noticed

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.

Vault changes look good

Copy link
Contributor

@JaredSnider-Bitwarden JaredSnider-Bitwarden left a comment

Choose a reason for hiding this comment

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

Auth changes look good! Nice work and thank you for recording the scenarios!

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.

7 participants