Skip to content
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

chore: Update Material UI and Emotion #9603

Merged
merged 3 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Tech Stories
---

Update Material UI and Emotion ([#9603](https://github.com/linode/manager/pull/9603))
10 changes: 5 additions & 5 deletions packages/manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
"url": "https://github.com/Linode/manager.git"
},
"dependencies": {
"@emotion/react": "^11.10.4",
"@emotion/styled": "^11.10.4",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@linode/api-v4": "*",
"@linode/validation": "*",
"@mui/icons-material": "^5.10.3",
"@mui/material": "^5.10.4",
"@mui/styles": "^5.10.3",
"@mui/icons-material": "^5.14.7",
"@mui/material": "^5.14.7",
"@mui/styles": "^5.14.7",
"@paypal/react-paypal-js": "^7.8.3",
"@reach/tabs": "^0.10.5",
"@sentry/react": "^7.57.0",
Expand Down
15 changes: 9 additions & 6 deletions packages/manager/src/components/ActionMenu/ActionMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,22 +107,25 @@ export const ActionMenu = React.memo((props: Props) => {
MenuListProps={{
'aria-labelledby': buttonId,
}}
PaperProps={{
sx: (theme) => ({
backgroundColor: theme.palette.primary.main,
boxShadow: 'none',
}),
}}
anchorOrigin={{
horizontal: 'right',
vertical: 'bottom',
}}
slotProps={{
paper: {
sx: (theme) => ({
backgroundColor: theme.palette.primary.main,
boxShadow: 'none',
}),
},
}}
transformOrigin={{
horizontal: 'right',
vertical: 'top',
}}
anchorEl={anchorEl}
data-qa-action-menu
disableScrollLock
id={menuId}
marginThreshold={0}
onClose={handleClose}
Expand Down
2 changes: 1 addition & 1 deletion packages/manager/src/components/Chip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface ChipProps extends _ChipProps {
/**
* Optional component to render instead of a span.
*/
component?: string;
component?: React.ElementType;
/**
* If true, the chip will inherit styles to allow for use in a table.
* @default false
Expand Down
2 changes: 1 addition & 1 deletion packages/manager/src/components/Tag/Tag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export interface TagProps extends ChipProps {
asSuggestion?: boolean;
closeMenu?: any;
colorVariant: Variants;
component?: string;
component?: React.ElementType;
label: string;
maxLength?: number;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,12 @@ export const AddNewMenu = () => {
MenuListProps={{
'aria-labelledby': 'create-menu',
}}
PaperProps={{
// UX requested a drop shadow that didn't affect the button.
// If we revise our theme's shadows, we could consider removing
sx: { boxShadow: '0 2px 3px 3px rgba(0, 0, 0, 0.1)' },
slotProps={{
paper: {
// UX requested a drop shadow that didn't affect the button.
// If we revise our theme's shadows, we could consider removing
sx: { boxShadow: '0 2px 3px 3px rgba(0, 0, 0, 0.1)' },
},
}}
sx={{
'& hr': {
Expand Down
32 changes: 23 additions & 9 deletions packages/manager/src/features/TopMenu/UserMenu/UserMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,16 +166,18 @@ export const UserMenu = React.memo(() => {
</Button>
</Tooltip>
<Popover
PaperProps={{
sx: {
paddingX: 2.5,
paddingY: 2,
},
}}
anchorOrigin={{
horizontal: 'right',
vertical: 'bottom',
}}
slotProps={{
paper: {
sx: {
paddingX: 2.5,
paddingY: 2,
},
},
}}
anchorEl={anchorEl}
id={id}
marginThreshold={0}
Expand All @@ -192,11 +194,23 @@ export const UserMenu = React.memo(() => {
<Box>
<Heading>My Profile</Heading>
<Divider color="#9ea4ae" />
<Grid container rowSpacing={1.5}>
<Grid direction="column" wrap="nowrap" xs={6}>
<Grid container>
<Grid
container
direction="column"
rowGap={1}
wrap="nowrap"
xs={6}
>
{profileLinks.slice(0, 4).map(renderLink)}
</Grid>
<Grid direction="column" wrap="nowrap" xs={6}>
<Grid
container
direction="column"
rowGap={1}
wrap="nowrap"
xs={6}
>
{profileLinks.slice(4).map(renderLink)}
</Grid>
</Grid>
Expand Down
7 changes: 0 additions & 7 deletions packages/manager/src/foundations/themes/light.ts
Original file line number Diff line number Diff line change
Expand Up @@ -838,13 +838,6 @@ export const lightTheme: ThemeOptions = {
},
},
MuiMenu: {
defaultProps: {
slotProps: {
backdrop: {
invisible: true,
},
},
},
styleOverrides: {
paper: {
'& .selectMenuList': {
Expand Down
Loading