Skip to content

Commit 8fb6c2d

Browse files
authored
fix: [M3-7138] - Fix Create Volume Drawer static pricing copy and misplaced helper text (#9683)
* Fix Create Volume Drawer static pricing copy and misplaced helper text * Added changeset: Misplaced helper text and static copy in Linode Create Volume drawer * Update variable name to be more clear
1 parent d6bafe8 commit 8fb6c2d

File tree

4 files changed

+25
-13
lines changed

4 files changed

+25
-13
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@linode/manager": Fixed
3+
---
4+
5+
Misplaced helper text and static copy in Linode Create Volume drawer ([#9683](https://github.com/linode/manager/pull/9683))

packages/manager/src/features/Volumes/VolumeCreate/CreateVolumeForm.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,9 @@ const CreateVolumeForm: React.FC<CombinedProps> = (props) => {
281281
>
282282
{dcSpecificPricing ? (
283283
<span>
284-
A single Volume can range from 10 to 10240 GB in size. Up
285-
to eight Volumes can be attached to a single Linode.
286-
Select a region to see cost per GB.
284+
A single Volume can range from 10 to {MAX_VOLUME_SIZE} GB
285+
in size. Up to to eight Volumes can be attached to a
286+
single Linode. Select a region to see cost per GB.
287287
</span>
288288
) : (
289289
<span>

packages/manager/src/features/Volumes/VolumeDrawer/CreateVolumeForLinodeForm.tsx

+12-3
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,18 @@ const CreateVolumeForm: React.FC<CombinedProps> = (props) => {
197197
data-qa-volume-size-help
198198
variant="body1"
199199
>
200-
A single Volume can range from 10 to {MAX_VOLUME_SIZE} gigabytes
201-
in size and costs $0.10/GB per month. Up to eight volumes can be
202-
attached to a single Linode.
200+
{flags.dcSpecificPricing ? (
201+
<span>
202+
A single Volume can range from 10 to {MAX_VOLUME_SIZE} GB in
203+
size. Up to eight Volumes can be attached to a single Linode.
204+
</span>
205+
) : (
206+
<span>
207+
A single Volume can range from 10 to {MAX_VOLUME_SIZE} GB in
208+
size and costs $0.10/GB per month. <br />
209+
Up to eight volumes can be attached to a single Linode.
210+
</span>
211+
)}
203212
</Typography>
204213

205214
<LabelField

packages/manager/src/features/Volumes/VolumeDrawer/SizeField.tsx

+5-7
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,15 @@ const SizeField: React.FC<CombinedProps> = (props) => {
7777
size: value,
7878
});
7979

80-
const legacyHelperText = (
80+
const priceDisplayText = (
8181
<FormHelperText>
82-
{resize || isFromLinode ? (
83-
'The size of the new volume in GB.'
84-
) : (
82+
{resize || isFromLinode ? null : (
8583
<span className={classes.createVolumeText}>${price}/month</span>
8684
)}
8785
</FormHelperText>
8886
);
8987

90-
const dynamicPricingHelperText = !resize && (
88+
const dynamicPricingHelperText = !resize && !isFromLinode && (
9189
<Box marginLeft={'10px'} marginTop={'4px'}>
9290
<Typography>Select a region to see cost per month.</Typography>
9391
</Box>
@@ -115,9 +113,9 @@ const SizeField: React.FC<CombinedProps> = (props) => {
115113
<div className={classes.priceDisplay}>
116114
{dcSpecificPricing
117115
? hasSelectedRegion
118-
? legacyHelperText
116+
? priceDisplayText
119117
: dynamicPricingHelperText
120-
: legacyHelperText}
118+
: priceDisplayText}
121119
</div>
122120
</>
123121
);

0 commit comments

Comments
 (0)