From c6c711ced6a4cf867d476c91441b51a448cbee45 Mon Sep 17 00:00:00 2001 From: mjac0bs Date: Thu, 14 Sep 2023 15:11:40 -0700 Subject: [PATCH 1/3] Fix Create Volume Drawer static pricing copy and misplaced helper text --- .../Volumes/VolumeCreate/CreateVolumeForm.tsx | 6 +++--- .../VolumeDrawer/CreateVolumeForLinodeForm.tsx | 15 ++++++++++++--- .../features/Volumes/VolumeDrawer/SizeField.tsx | 6 ++---- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/packages/manager/src/features/Volumes/VolumeCreate/CreateVolumeForm.tsx b/packages/manager/src/features/Volumes/VolumeCreate/CreateVolumeForm.tsx index 655cd4a78ec..5dd5866f0be 100644 --- a/packages/manager/src/features/Volumes/VolumeCreate/CreateVolumeForm.tsx +++ b/packages/manager/src/features/Volumes/VolumeCreate/CreateVolumeForm.tsx @@ -281,9 +281,9 @@ const CreateVolumeForm: React.FC = (props) => { > {dcSpecificPricing ? ( - A single Volume can range from 10 to 10240 GB in size. Up - to eight Volumes can be attached to a single Linode. - Select a region to see cost per GB. + A single Volume can range from 10 to {MAX_VOLUME_SIZE} GB + in size. Up to to eight Volumes can be attached to a + single Linode. Select a region to see cost per GB. ) : ( diff --git a/packages/manager/src/features/Volumes/VolumeDrawer/CreateVolumeForLinodeForm.tsx b/packages/manager/src/features/Volumes/VolumeDrawer/CreateVolumeForLinodeForm.tsx index 72a1b47215b..85c92ba014a 100644 --- a/packages/manager/src/features/Volumes/VolumeDrawer/CreateVolumeForLinodeForm.tsx +++ b/packages/manager/src/features/Volumes/VolumeDrawer/CreateVolumeForLinodeForm.tsx @@ -197,9 +197,18 @@ const CreateVolumeForm: React.FC = (props) => { data-qa-volume-size-help variant="body1" > - A single Volume can range from 10 to {MAX_VOLUME_SIZE} gigabytes - in size and costs $0.10/GB per month. Up to eight volumes can be - attached to a single Linode. + {flags.dcSpecificPricing ? ( + + A single Volume can range from 10 to {MAX_VOLUME_SIZE} GB in + size. Up to eight Volumes can be attached to a single Linode. + + ) : ( + + A single Volume can range from 10 to {MAX_VOLUME_SIZE} GB in + size and costs $0.10/GB per month.
+ Up to eight volumes can be attached to a single Linode. +
+ )} = (props) => { const legacyHelperText = ( - {resize || isFromLinode ? ( - 'The size of the new volume in GB.' - ) : ( + {resize || isFromLinode ? null : ( ${price}/month )} ); - const dynamicPricingHelperText = !resize && ( + const dynamicPricingHelperText = !resize && !isFromLinode && ( Select a region to see cost per month. From c4435420380f4e8b34bdea340a67307167030aca Mon Sep 17 00:00:00 2001 From: mjac0bs Date: Thu, 14 Sep 2023 15:47:05 -0700 Subject: [PATCH 2/3] Added changeset: Misplaced helper text and static copy in Linode Create Volume drawer --- packages/manager/.changeset/pr-9683-fixed-1694731625764.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 packages/manager/.changeset/pr-9683-fixed-1694731625764.md diff --git a/packages/manager/.changeset/pr-9683-fixed-1694731625764.md b/packages/manager/.changeset/pr-9683-fixed-1694731625764.md new file mode 100644 index 00000000000..96277b8f765 --- /dev/null +++ b/packages/manager/.changeset/pr-9683-fixed-1694731625764.md @@ -0,0 +1,5 @@ +--- +"@linode/manager": Fixed +--- + +Misplaced helper text and static copy in Linode Create Volume drawer ([#9683](https://github.com/linode/manager/pull/9683)) From 46783b81c555f996f10c7fbc9255b007dd708d10 Mon Sep 17 00:00:00 2001 From: mjac0bs Date: Thu, 14 Sep 2023 16:12:28 -0700 Subject: [PATCH 3/3] Update variable name to be more clear --- .../manager/src/features/Volumes/VolumeDrawer/SizeField.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/manager/src/features/Volumes/VolumeDrawer/SizeField.tsx b/packages/manager/src/features/Volumes/VolumeDrawer/SizeField.tsx index 0fabcc73e28..74c8b321534 100644 --- a/packages/manager/src/features/Volumes/VolumeDrawer/SizeField.tsx +++ b/packages/manager/src/features/Volumes/VolumeDrawer/SizeField.tsx @@ -77,7 +77,7 @@ const SizeField: React.FC = (props) => { size: value, }); - const legacyHelperText = ( + const priceDisplayText = ( {resize || isFromLinode ? null : ( ${price}/month @@ -113,9 +113,9 @@ const SizeField: React.FC = (props) => {
{dcSpecificPricing ? hasSelectedRegion - ? legacyHelperText + ? priceDisplayText : dynamicPricingHelperText - : legacyHelperText} + : priceDisplayText}
);