Conversation
bd90b6e to
f24741a
Compare
66d42cc to
f487fae
Compare
56dc183 to
a1ae46d
Compare
f5546e4 to
56c4b76
Compare
StaberindeZA
left a comment
There was a problem hiding this comment.
Still need to test, but wanted to leave some initial feedback comments in the mean time.
| const [upcomingInvoice, eligibility] = await Promise.all([ | ||
| this.invoiceManager.previewUpcoming({ | ||
| priceId: price.id, | ||
| currency, |
There was a problem hiding this comment.
Isn't currency a required field for SP3? How are none default currency values determined, i.e. EUR etc?
| ? eligibility.fromOfferingConfigId | ||
| : undefined, | ||
| fromPrice: 'fromPrice' in eligibility ? eligibility.fromPrice : undefined, | ||
| fromPrice: 'fromPrice' in eligibility ? currentPrice : undefined, |
There was a problem hiding this comment.
nit. why the different names from vs current?
| interval: string; | ||
| listAmount: number; | ||
| } | ||
| | undefined; |
There was a problem hiding this comment.
currentPrice should always be available in an upgrade state, so undefined doesn't seem like a valid type.
Same applies to currentPurchaseDetails
| import circledConfirm from '@fxa/shared/assets/images/circled-confirm-clouds.svg'; | ||
|
|
||
| const getComponentTitle = (cartState: CartState) => { | ||
| const getComponentTitle = (cartState: CartState | CartEligibilityStatus) => { |
There was a problem hiding this comment.
CartState and CartEligibilityStatus should be separate input params
152d736 to
bc157b4
Compare
| export type UpgradeCartDTO = ResultCart & { | ||
| eligibilityStatus: CartEligibilityStatus.UPGRADE; | ||
| fromOfferingConfigId: string; | ||
| fromPrice: FromPrice; | ||
| }; |
There was a problem hiding this comment.
I'd rather us avoid creating fragmented typings around each intermediate state of the cart based on eligibility, and stick to state-based types only.
I worry about situations down the road where we have fragmented types, with each DTO type having slightly differing member properties, and functions that require a specific DTO when you don't have that specific DTO variant.
There was a problem hiding this comment.
Thank you for the quick chat. I'm happy to drop this commit, and follow this PR with the implementation we discussed.
7f2c20b to
4990113
Compare
| upgrade-purchase-details-new-total-label = New total | ||
| upgrade-purchase-details-prorated-upgrade = Prorated Upgrade | ||
|
|
||
| # $productName (String) - Name of the upgraded product (e.g. Mozilla VPN) |
There was a problem hiding this comment.
This comment either needs to be a group comment, or repeated for each string. Otherwise this comment will only appear for the first string below (-daily) but none of the others (-weekly etc.).
Also as I look at this again, the context about what (Daily) is referring to might not be clear- could you indicate in a comment what Daily / Weekly/ Monthly / Yearly is referring to?
StaberindeZA
left a comment
There was a problem hiding this comment.
r+. Thank you for the changes and leading the various discussions.
This pull request
PurchaseDetailscomponent and removesDetailscomponentstartpageIssue that this pull request solves
Closes: FXA-7588
Checklist
Put an
xin the boxes that applyScreenshots (Optional)
Previous Upgrade page