Skip to content

Commit

Permalink
chore: [M3-7042] - DC-Specific Pricing Copy and Link Cleanup (#9670)
Browse files Browse the repository at this point in the history
* Copy and link clean up

* Add one more copy change

* Add changeset

* Add back a word deleted by linting

* Address feedback: hypenate Data Center-Specific

* Address feedback: fix casing
  • Loading branch information
mjac0bs authored Sep 13, 2023
1 parent c2cf937 commit e2ce232
Show file tree
Hide file tree
Showing 18 changed files with 31 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Upcoming Features
---

Standardize "region" and "data center" copy for DC-specific pricing ([#9670](https://github.com/linode/manager/pull/9670))
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe('clone linode', () => {

const newLinodeLabel = `${linodePayload.label}-clone`;

// TODO Remove feature flag mocks once DC pricing is live.
// TODO: DC Pricing - M3-7073: Remove feature flag mocks once DC pricing is live.
mockAppendFeatureFlags({
dcSpecificPricing: makeFeatureFlagData(false),
}).as('getFeatureFlags');
Expand Down Expand Up @@ -156,11 +156,11 @@ describe('clone linode', () => {
'@getLinodeTypes',
]);

// TODO Move these assertions to end-to-end test once `dcSpecificPricing` flag goes away.
// TODO Remove this assertion when DC-specific pricing notice goes away.
// TODO: DC Pricing - M3-7073: Move these assertions to end-to-end test once `dcSpecificPricing` flag goes away.
// TODO: DC Pricing - M3-7086: Remove this assertion when DC-specific pricing notice goes away.
cy.findByText(dcPricingRegionNotice, { exact: false }).should('be.visible');

// TODO Uncomment docs link assertion when docs links are added.
// TODO: DC Pricing - M3-7086: Uncomment docs link assertion when docs links are added.
// cy.findByText(dcPricingDocsLabel)
// .should('be.visible')
// .should('have.attr', 'href', dcPricingDocsUrl);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { linodeTypeFactory } from '@src/factories';

/** Notice shown to users when selecting a region. */
export const dcPricingRegionNotice =
'Prices for plans, products, and services may vary based on Region.';
'Prices for plans, products, and services may vary based on region.';

/** Notice shown to users when selecting a region with a different price structure. */
export const dcPricingRegionDifferenceNotice =
Expand Down
2 changes: 1 addition & 1 deletion packages/manager/src/components/DynamicPriceNotice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const DynamicPriceNotice = (props: NoticeProps) => {
return (
<Notice spacingBottom={0} spacingTop={12} variant="info" {...props}>
<Typography fontWeight="bold">
Prices for plans, products, and services may vary based on Region.{' '}
Prices for plans, products, and services may vary based on region.{' '}
<Link to="https://www.linode.com/pricing">Learn more.</Link>
</Typography>
</Notice>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { isLinodeTypeDifferentPriceInSelectedRegion } from 'src/utilities/pricin
import { getQueryParamsFromQueryString } from 'src/utilities/queryParams';

import { Box } from '../Box';
import { DocsLink } from '../DocsLink/DocsLink';
// import { DocsLink } from '../DocsLink/DocsLink'; //TODO: DC Pricing - M3-7086: Uncomment this once pricing info notice is removed
import { Link } from '../Link';

interface SelectRegionPanelProps {
Expand Down Expand Up @@ -85,12 +85,13 @@ export const SelectRegionPanel = (props: SelectRegionPanelProps) => {
<Typography data-qa-tp="Region" variant="h2">
Region
</Typography>
{flags.dcSpecificPricing && (
{/* TODO: DC Pricing - M3-7086: Uncomment this once pricing info notice is removed */}
{/* {flags.dcSpecificPricing && (
<DocsLink
href="https://www.linode.com/pricing"
label="How Data Center Pricing Works"
/>
)}
)} */}
</Box>
<RegionHelperText
hidePricingNotice={showSelectedRegionHasDifferentPriceWarning}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const TransferDisplayDialog = React.memo(
sx={{ marginBottom: theme.spacing(2), marginTop: theme.spacing(3) }}
/>
{/**
* Region-specific Transfer Pool Display
* DC-specific Transfer Pool Display
*/}
{regionTransferPools.length > 0 && (
<>
Expand All @@ -79,7 +79,7 @@ export const TransferDisplayDialog = React.memo(
fontFamily={theme.font.bold}
marginBottom={theme.spacing()}
>
Datacenter-specific Network Transfer Pools
Data Center-Specific Network Transfer Pools
</Typography>
<Typography
marginBottom={theme.spacing()}
Expand Down
2 changes: 1 addition & 1 deletion packages/manager/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export const allowedHTMLAttr = ['href', 'lang', 'title', 'align'];
export const MBpsIntraDC = 200;

/**
* MBps rate for inter DC migrations (AKA Cross-Datacenter migrations )
* MBps rate for inter DC migrations (AKA Cross-Data-Center migrations )
*/
export const MBpsInterDC = 7.5;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const HAControlPlane = (props: HAControlPlaneProps) => {
label={`Yes, enable HA control plane. ${
highAvailabilityPrice
? `(${displayPrice(highAvailabilityPrice)}/month)`
: '(Select a Region to view price information.)'
: '(Select a region to view price information.)'
}`}
control={<Radio data-testid="ha-radio-button-yes" />}
name="yes"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export const Details = (props: Props) => {
)}

<Typography>
Current Datacenter: {region?.label ?? thisLinodeRegion}
Current Data Center: {region?.label ?? thisLinodeRegion}
</Typography>

{/* Show the estimated clone time if we're able to submit the form. */}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export const getMonthlyAndHourlyNodePricing = (
};

export const CROSS_DATA_CENTER_CLONE_WARNING =
'Cloning a Powered Off instance across Data Centers may cause long periods of down time.';
'Cloning a powered off instance across data centers may cause long periods of down time.';

/**
* Unicode to ASCII (encode data to Base64)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ const IPSharingPanel = (props: Props) => {
IP Sharing allows a Linode to share an IP address assignment
(one or more additional IP addresses). This can be used to allow
one Linode to begin serving requests should another become
unresponsive. Only IPs in the same datacenter are offered for
unresponsive. Only IPs in the same data center are offered for
sharing.
</Typography>
</Grid>
Expand All @@ -348,7 +348,7 @@ const IPSharingPanel = (props: Props) => {
marginTop: theme.spacing(2),
}}
>
You have no other Linodes in this Linode&rsquo;s datacenter
You have no other Linodes in this Linode&rsquo;s data center
with which to share IPs.
</Typography>
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,8 @@ const LinodeNetworkingIPTransferPanel = (props: Props) => {
marginTop: theme.spacing(2),
}}
>
You have no other linodes in this Linode&rsquo;s datacenter with
which to transfer IPs.
You have no other linodes in this Linode&rsquo;s data center
with which to transfer IPs.
</Typography>
) : (
<Grid container spacing={2} sx={{ width: '100%' }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export const MigrateLinode = React.memo((props: Props) => {
</Typography>
{/*
commenting out for now because we need further clarification from
stakeholders about whether or not we want to prevent multiple cross-datacenter migrations.
stakeholders about whether or not we want to prevent multiple cross-data-center migrations.
*/}
{/* <MigrationImminentNotice
linodeID={props.linodeID}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ const interceptNotification = (

// Outage interception
if (notification.type === 'outage') {
/** this is an outage to one of the datacenters */
/** this is an outage to one of the data centers */
if (
notification.type === 'outage' &&
notification.entity?.type === 'region'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ const CreateVolumeForm: React.FC<CombinedProps> = (props) => {
<span>
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.
Select a region to see cost per GB.
</span>
) : (
<span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const SizeField: React.FC<CombinedProps> = (props) => {

const dynamicPricingHelperText = !resize && (
<Box marginLeft={'10px'} marginTop={'4px'}>
<Typography>Select a Region to see cost per month.</Typography>
<Typography>Select a region to see cost per month.</Typography>
</Box>
);

Expand Down
2 changes: 1 addition & 1 deletion packages/manager/src/utilities/pricing/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ export const LKE_HA_PRICE = 60;
export const PLAN_SELECTION_NO_REGION_SELECTED_MESSAGE =
'Select a region to view plans and prices.';
export const LKE_CREATE_CLUSTER_CHECKOUT_MESSAGE =
'Select a Region, HA choice, and add a Node Pool to view pricing and create a cluster.';
'Select a region, HA choice, and add a Node Pool to view pricing and create a cluster.';
2 changes: 1 addition & 1 deletion packages/manager/src/utilities/pricing/dynamicPricing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const priceIncreaseMap = {
* flags: { dcSpecificPricing: true },
* regionId: 'us-east',
* });
* @returns a datacenter specific price
* @returns a data center specific price
*/
export const getDCSpecificPrice = ({
basePrice,
Expand Down

0 comments on commit e2ce232

Please sign in to comment.