-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[PM-29608] [PM-29609] Premium subscription redesign cards #18145
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
base: main
Are you sure you want to change the base?
[PM-29608] [PM-29609] Premium subscription redesign cards #18145
Conversation
- Remove unused test file
- Introduce new Discount union type - Introduce Maybe type helper for T | null | undefined - Use Discount type in the discount-badge.component - Update the user-subscription.component to pass Discount type into the discount-badge.component - Update spec, stories and mdx
- Support changeDetection: ChangeDetectionStrategy.OnPush - Update spec and mdx files
- Introduce new Cart type - Use Cart type as main input in cart-summary.component - Support optional custom header template in cart-summary.component - Support optional cart-level Discount type in cart-summary.component - Update upgrade-payment.component to pass in new Cart type to cart-summary.component - Update spec file, stories and mdx file
- Remove unused test file - Update jest.config.js - Add test.setup.ts
- Add BitwardenSubscription type - Add subscription-card.component - Add translations - Add spec file, stories and MDX file
- Add standalone Storage type - Add storage-card.component - Add spec file, stories and MDX file
- Add additional-options-card.component - Add spec file, stories and MDX file
…on-redesign-cards
|
Great job! No new security vulnerabilities introduced in this pull request |
…on-redesign-cards
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #18145 +/- ##
==========================================
+ Coverage 42.27% 42.30% +0.03%
==========================================
Files 3601 3608 +7
Lines 104594 104747 +153
Branches 15790 15811 +21
==========================================
+ Hits 44215 44316 +101
- Misses 58502 58554 +52
Partials 1877 1877 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…on-redesign-cards
…on-redesign-cards
…on-redesign-cards
…on-redesign-cards
…on-redesign-cards
vleague2
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UIF file is good!
…on-redesign-cards
kdenney
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good; nice job! I have a few questions and one recommendation.
| "message": "Storage full" | ||
| }, | ||
| "storageUsedDescription": { | ||
| "message": "You have used $USED$ out of $AVAILABLE$ GB of your encrypted file storage." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ Does this message (and the next one below) require the "placeholders" property to be defined so that they get replaced properly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch - resolved in latest commit.
libs/pricing/src/components/cart-summary/cart-summary.component.html
Outdated
Show resolved
Hide resolved
libs/pricing/src/components/cart-summary/cart-summary.component.ts
Outdated
Show resolved
Hide resolved
libs/subscription/src/components/additional-options-card/additional-options-card.component.ts
Show resolved
Hide resolved
46bf792

🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-29609
https://bitwarden.atlassian.net/browse/PM-29608
📔 Objective
This PR does some refactoring of existing @bitwarden/pricing components as well as introduces 3 new components in the @bitwarden/subscription library.
@bitwarden/pricing
cart-summary.componentCarttype rather than separate inputs for each portion of the cart. This prepares us for this component's usage on the redesigned premium subscription page where we'll fetch an entire cart from the backend.upgrade-payment.componentby changing input to theCarttype with the same data passed in.headertemplate that can be passed into the component in the case we're rendering the subscription page.Discountdisplaydiscount-badge.componentDiscountinput, which is a union type of "amount-off" and "percent-off" discounts.user-subscription.componentby changing the input to theDiscounttype with the same data passed in.pricing-card.component@bitwarden/subscription
subscription-card.componentBitwardenSubscriptiontype which will be fetched from the backend and used to render this card.BitwardenSubscriptioninput and includes a spec file, stories and MDX file.storage-card.componentStoragetype which will be fetched from the backend and used to render this card.Storageinput and includes a spec file, stories and MDX file.additional-options-card.component📸 Screenshots
⏰ Reminders before review
🦮 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