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

Merged
merged 135 commits into from
Nov 11, 2024

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
https://bitwarden.atlassian.net/browse/PM-13784
https://bitwarden.atlassian.net/browse/PM-13785

📔 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 & Detailsa98433d4-0348-410d-8957-b5510fe8b7fe

New Issues

Severity Issue Source File / Package Checkmarx Insight
LOW Client_DOM_Open_Redirect /apps/web/src/app/billing/shared/payment-method.component.ts: 147 Attack Vector
LOW Client_DOM_Open_Redirect /apps/web/src/app/billing/shared/payment-method.component.ts: 173 Attack Vector
LOW Client_JQuery_Deprecated_Symbols /apps/cli/src/service-container/service-container.ts: 876 Attack Vector

Fixed Issues

Severity Issue Source File / Package
MEDIUM Client_Privacy_Violation /apps/web/src/app/tools/risk-insights/password-health-members.component.html: 55
MEDIUM Client_Privacy_Violation /apps/web/src/app/tools/risk-insights/password-health-members.component.html: 50
MEDIUM Client_Privacy_Violation /apps/web/src/app/tools/risk-insights/password-health-members.component.html: 45
MEDIUM Client_Privacy_Violation /apps/web/src/app/tools/risk-insights/password-health-members.component.html: 50
MEDIUM Client_Privacy_Violation /apps/web/src/app/tools/risk-insights/password-health-members-uri.component.html: 40
MEDIUM Client_Privacy_Violation /apps/web/src/app/tools/risk-insights/password-health-members-uri.component.html: 35
MEDIUM Client_Privacy_Violation /apps/web/src/app/tools/risk-insights/password-health-members-uri.component.html: 40
MEDIUM Client_Privacy_Violation /apps/web/src/app/tools/risk-insights/password-health-members-uri.component.html: 45
MEDIUM Client_Privacy_Violation /apps/web/src/app/tools/risk-insights/password-health.component.html: 40
MEDIUM Client_Privacy_Violation /apps/web/src/app/tools/risk-insights/password-health.component.html: 50
MEDIUM Client_Privacy_Violation /apps/web/src/app/tools/risk-insights/password-health.component.html: 45
MEDIUM Client_Privacy_Violation /apps/web/src/app/tools/risk-insights/password-health.component.html: 45
MEDIUM Client_Privacy_Violation /libs/tools/generator/components/src/username-generator.component.html: 3

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.

vleague2
vleague2 previously approved these changes Nov 5, 2024
@github-actions github-actions bot temporarily deployed to Web Vault - EU QA Cloud November 11, 2024 13:21 Inactive
@cyprain-okeke cyprain-okeke merged commit f593269 into main Nov 11, 2024
69 checks passed
@cyprain-okeke cyprain-okeke deleted the pm-8161-payment-optional-trial-mvp branch November 11, 2024 16:05
jaasen-livefront pushed a commit that referenced this pull request Nov 12, 2024
* Initial comment

* Add changes for the create org with payment method

* Add the secrets manager trail flow

* Add the banners

* Add changes for the Disabled Org

* Add banner to payment method page

* Refactoring changes

* Resolve the bug on tha payment method

* Resolve lint error

* Resolve Pr comments

* resolve the lint issue

* Resolve the lint wrong file issue

* Rename object properly

* Resolve pr comments from sm team

* Resolve the pr comments from sm team

* Fix the failing test

* Resolve some issue with vault

* Resolve the comments from sm team

* Resolve some pr comments from vault team

* Resolve pr comments from auth team

* Exported ValidOrgParams enum

* Removed unnecessary interpolation

* Corrected bit-banner id for trial

* Resolve pr comments from auth team

* Resolve pr comments from auth team

* Removed unnecessary method

* Made OrganizationCreateRequest a subtype of OrganizationNoPaymentMethodCreateRequest

* Resolve review changes from sm

* Resolve review changes from dm

* Resolve the pr comments from billing

* move the free-trial to core

* Move free-trial change to right file

* Revert changes on the free trial  page

* Resolve the comment on protected trial page

* Resolve the comment on protected trial page

* Revert the next async change

* resolve pr comment fro vault team

* resolve the default message comments

* remove unused method

* resolve email sending issue

* Fix the pop issue on payment method

* Fix some console errors

* Fix the pop refresh page

* move the trial services to billing folder

* resolve pr comments

* Resolve the import issues

* Move the observable up

* Resolve blank payment method for trialing org

* Changes to  disable icon is removed onsubmit

* Remove unused references

* add a missing a period at the end of it

* resolve the reload issue

* Resolve the disable icon issue

* Fix the admin access bug

* Resolve the lint issue

* Fix the message incorrect format

* Formatting fixed

* Resolve the access issue of other users role
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.

10 participants