-
Notifications
You must be signed in to change notification settings - Fork 365
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upcoming: [M3-7724] - Linode plan table updates for Edge regions (#10255
) ## Description 📝 API work for Edge plans will not be ready for Beta. So, we need to hardcode the plans ourselves until then. ## Changes 🔄 List any change relevant to the reviewer. - Edge regions will only display dedicated plans minus the 256gb and 516gb plans - Edge region price is $0 for Beta and a warning explanation notice is displayed ## How to test 🧪 ### Prerequisites (How to setup test environment) - Ensure you have the right customer tag for testing new dcs (reach out for more info) ### Verification steps (How to verify changes) - Go to `/linodes/create` and select an Edge region - You should not see the tab control, only the Dedicated Linode Plan Table minus the 256gb and 516gb plans - The summary section should reflect the $0 price - Core regions should still display the same plans as prod
- Loading branch information
1 parent
48bf7e4
commit 0830c44
Showing
5 changed files
with
165 additions
and
4 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
packages/manager/.changeset/pr-10255-upcoming-features-1709738933221.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@linode/manager": Upcoming Features | ||
--- | ||
|
||
Linode plan table updates for Edge regions ([#10255](https://github.com/linode/manager/pull/10255)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
packages/manager/src/features/components/PlansPanel/EdgePlanTable.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import { styled } from '@mui/material/styles'; | ||
import { SxProps } from '@mui/system'; | ||
import React from 'react'; | ||
|
||
import { Box } from 'src/components/Box'; | ||
import { Notice } from 'src/components/Notice/Notice'; | ||
import { Paper } from 'src/components/Paper'; | ||
import { Typography } from 'src/components/Typography'; | ||
|
||
interface EdgePlanTableProps { | ||
copy?: string; | ||
docsLink?: JSX.Element; | ||
error?: JSX.Element | string; | ||
header: string; | ||
innerClass?: string; | ||
renderTable: () => React.JSX.Element; | ||
rootClass?: string; | ||
sx?: SxProps; | ||
} | ||
|
||
export const EdgePlanTable = React.memo((props: EdgePlanTableProps) => { | ||
const { | ||
copy, | ||
docsLink, | ||
error, | ||
header, | ||
innerClass, | ||
renderTable, | ||
rootClass, | ||
sx, | ||
} = props; | ||
|
||
return ( | ||
<Paper | ||
className={rootClass} | ||
data-qa-tp={header} | ||
sx={{ flexGrow: 1, ...sx }} | ||
> | ||
<div className={innerClass}> | ||
<Box sx={{ display: 'flex', justifyContent: 'space-between' }}> | ||
{header && ( | ||
<Typography data-qa-tp-title variant="h2"> | ||
{header} | ||
</Typography> | ||
)} | ||
{docsLink} | ||
</Box> | ||
{error && ( | ||
<Notice spacingBottom={0} spacingTop={12} variant="error"> | ||
{error} | ||
</Notice> | ||
)} | ||
{copy && <StyledTypography data-qa-tp-copy>{copy}</StyledTypography>} | ||
{renderTable()} | ||
</div> | ||
</Paper> | ||
); | ||
}); | ||
|
||
const StyledTypography = styled(Typography)(({ theme }) => ({ | ||
fontSize: '0.875rem', | ||
marginTop: theme.spacing(1), | ||
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters