-
Notifications
You must be signed in to change notification settings - Fork 366
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
feat: [M3-6968] Add DC specific pricing info to migration modal #9570
Conversation
1428de0
to
d3c9e21
Compare
cea5ee0
to
a279b20
Compare
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.
General functionality and styling is looking great!
- Feedback 🗣️
- Backups and hourly price does not look different between the two regions, does this need to be fixed?
- Volumes attached indentation is out of wack. (Out of scope but likely an easy fix to include here)
- UX Concern 😰
- We show a backups price even if the Linode does not have backups enabled. I am worried this might scare users into thinking they have backups enabled 😟 when they really don't have it enabled. Is this a valid concern? Should we hide the backups price if it is not enabled? Should we somehow show that backups are not enabled?
439895f
to
e3e0674
Compare
@bnussman-akamai thx! still in draft, but valid points all around
|
@abailly-akamai Pull in the latest
This is a good call out and was a UX oversight when I made the ticket. Thanks for bringing it up @bnussman-akamai. Agreed that we shouldn't show backup price if disabled. |
currentLinodeType && getLinodeRegionPrice(currentLinodeType, currentRegion); | ||
// TODO: DYNAMIC_PRICING we probably don't want to default to the current price in case something goes wrong, | ||
// resulting in misleading pricing. | ||
// we will need a way to handle an error for this case here and dynamicPricing.ts |
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.
@mjac0bs Should we make a ticket for this and reference it before we forget in how many places we need to handle this important case?
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.
Yes, good thought, I made M3-7063 to account for this. We should display some error in lieu of the price comparison when selectedRegionPrice can't be calculated.
I wanted to clarify what you meant by dynamicPricing.ts. We're returning basePrice when there's no increase in our map, the feature flag is off, or we don't have regionId. Are we concerned about the regionId somehow getting set incorrectly or an issue with LD?
@bnussman-akamai @mjac0bs this is ready for another look - thanks! |
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.
This is looking good with its various test scenarios! Just left a couple clarifying questions.
currentLinodeType && getLinodeRegionPrice(currentLinodeType, currentRegion); | ||
// TODO: DYNAMIC_PRICING we probably don't want to default to the current price in case something goes wrong, | ||
// resulting in misleading pricing. | ||
// we will need a way to handle an error for this case here and dynamicPricing.ts |
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.
Yes, good thought, I made M3-7063 to account for this. We should display some error in lieu of the price comparison when selectedRegionPrice can't be calculated.
I wanted to clarify what you meant by dynamicPricing.ts. We're returning basePrice when there's no increase in our map, the feature flag is off, or we don't have regionId. Are we concerned about the regionId somehow getting set incorrectly or an issue with LD?
* @param regionId The region to get the price for | ||
* @returns backup pricing information for this specific linode type in a region | ||
*/ | ||
export const getLinodeBackupPrice = ( |
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.
@mjac0bs thx will address this feedback but meanwhile, regarding #9570 (comment) and dynamic pricing, I am referring to this line: https://github.com/linode/manager/blob/develop/packages/manager/src/utilities/pricing/dynamicPricing.ts#L43 if |
* Add dynamic pricing backups util functions * Update Enable Backups drawer with dynamic pricing * Update Backups tab placeholder and confirmation dialog with dynamic pricing * Update mocks for now * Revert mock updates after rebase * Add test for backup price util function * Add DC-specific pricing to Linode Create flow * Update cached regions file to include Jakarta and Sao Paulo * Feature flag changes * Improve consistency with price variable names * Update tests * Renamed util function for consistency with #9570 * Added changeset: Add DC-specific pricing to Linode backups * Update backups drawer total cost util function to use FF * Address feedback: && over ternary * Address feedback: util and types * Missed a spot
…de#9570) * feat: [M3-6968] Initial commit - set up current data * feat: [M3-6968] UI for migration dynamic pricing * feat: [M3-6968] styling adjustment * feat: [M3-6968] with with prop forwarding * feat: [M3-6968] ad unit test * feat: [M3-6968] improve unit test * feat: [M3-6968] post rebase fix * feat: [M3-6968] fix test * Added changeset: DC Dynamic pricing information for migration flow * feat: [M3-6968] improve display logic based on fedback * feat: [M3-6968] save work * feat: [M3-6968] save work * feat: [M3-6968] test update * Update packages/manager/.changeset/pr-9570-changed-1692743440177.md Co-authored-by: Mariah Jacobs <114685994+mjac0bs@users.noreply.github.com> * Update packages/manager/.changeset/pr-9570-changed-1692743440177.md Co-authored-by: Mariah Jacobs <114685994+mjac0bs@users.noreply.github.com> * feat: [M3-6968] cleanup * feat: [M3-6968] fix hourly display and improve test * feat: [M3-6968] handle backups * feat: [M3-6968] test for backups * feat: [M3-6968] cleanup 1 * feat: [M3-6968] fix identation issue * feat: [M3-6968] fix identation issue * feat: [M3-6968] fix failing test * feat: [M3-6968] small feedback * feat: [M3-6968] fix test --------- Co-authored-by: Mariah Jacobs <114685994+mjac0bs@users.noreply.github.com>
) * Add dynamic pricing backups util functions * Update Enable Backups drawer with dynamic pricing * Update Backups tab placeholder and confirmation dialog with dynamic pricing * Update mocks for now * Revert mock updates after rebase * Add test for backup price util function * Add DC-specific pricing to Linode Create flow * Update cached regions file to include Jakarta and Sao Paulo * Feature flag changes * Improve consistency with price variable names * Update tests * Renamed util function for consistency with linode#9570 * Added changeset: Add DC-specific pricing to Linode backups * Update backups drawer total cost util function to use FF * Address feedback: && over ternary * Address feedback: util and types * Missed a spot
Description 📝
Adds a price comparison when trying to migrate a linode and selecting a region with an DC increase.
Per the mockups, we're looking at aligning the old region a new region data in a row, as well as an optional pricing dataset underneath if the migration is set towards a DC with a price increase
Preview 📷
How to test 🧪
br-gru
&id-cgk
)Sao Paulo br-gru
)Sao Paulo br-gru
)