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

feat: [M3-7579] - Design Tokens (CDS 2.0) #10022

Merged
Merged
Show file tree
Hide file tree
Changes from 44 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
62481fd
Add design tokens
jaalah Nov 13, 2023
9c4d3c7
Updates to status colors
jaalah Nov 13, 2023
21df7ea
Saving...
jaalah Nov 15, 2023
bfaaf04
Saving...
jaalah Nov 16, 2023
27c0a58
Version 14
jaalah Nov 21, 2023
cacf334
Update latest from upstream/develop
jaalah Dec 27, 2023
945d4fa
Update version to v1.0.0
jaalah Dec 27, 2023
489b955
Added changeset: Added Design Tokens (CDS 2.0)
jaalah Dec 27, 2023
5440011
Update to latest version
jaalah Dec 28, 2023
55cb2c8
Revert
jaalah Dec 28, 2023
a3eebdf
Bump version
jaalah Jan 1, 2024
d4c864c
Updates to chip palette and update endpoint palette to use darker err…
jaalah Jan 3, 2024
dad32d6
Remove unnecessary background color for notice story
jaalah Jan 3, 2024
4c60b7c
Update textfields, borders and outlines
jaalah Jan 4, 2024
1abe630
Fix dark mode button
jaalah Jan 9, 2024
d4f5e92
Revert input token changes
jaalah Jan 9, 2024
4761a79
Get latest
jaalah Jan 17, 2024
45adc44
Revert border tokens and fix marketplace background
jaalah Jan 17, 2024
97c83f4
Fix darkmode
jaalah Feb 13, 2024
88dbcec
Update to latest
jaalah Apr 12, 2024
3a8667f
Dark mode tokens
jaalah May 2, 2024
660786d
More dark mode fixes
jaalah May 2, 2024
2da5933
Update MuiFormHelperText dark mode color
abailly-akamai May 2, 2024
0a9af0e
Get latest
jaalah May 2, 2024
6c30f4b
Yarn lock
jaalah May 2, 2024
2311ebe
Merge branch 'feature/design-tokens-cds-v2' of github.com:jaalah-akam…
jaalah May 2, 2024
9deb93c
fix units
abailly-akamai May 3, 2024
72c7b09
Fix disabled buttons
abailly-akamai May 3, 2024
85eb7d8
Saving
jaalah May 6, 2024
12886b9
Merge branch 'feature/design-tokens-cds-v2' of github.com:jaalah-akam…
jaalah May 6, 2024
8e5268f
Saving...
jaalah May 13, 2024
8393e42
Adjust billing paper
jaalah May 17, 2024
3feb61f
Work in progress
jaalah May 21, 2024
f006eed
More style updates
jaalah May 31, 2024
256b8df
Minor
jaalah Jun 3, 2024
7bba247
Add feature flag
jaalah Jun 4, 2024
4ca76cf
More updates
jaalah Jun 4, 2024
816566e
Merge latest from dev
jaalah Jun 4, 2024
c2b649b
Modal close
jaalah Jun 4, 2024
efa6628
Nearing the end
jaalah Jun 6, 2024
9d1f0b6
Fix merge conflicts
jaalah Jun 14, 2024
0908a39
update snapshots
abailly-akamai Jun 17, 2024
0013870
Snaclbar and placeholder update
abailly-akamai Jun 17, 2024
680c68e
Tefield updates dark theme
abailly-akamai Jun 18, 2024
bf597dc
Update to menu items
jaalah Jun 18, 2024
72ffaea
react select placeholder
abailly-akamai Jun 20, 2024
45d7432
feedback @dwiley-akamai
abailly-akamai Jun 21, 2024
347c06f
feedback
abailly-akamai Jun 21, 2024
dea0ed3
Revert nav hover colors back to Linode green
jaalah Jun 24, 2024
f7ac08f
Merge branch 'feature/design-tokens-cds-v2' of github.com:jaalah-akam…
jaalah Jun 24, 2024
936b181
last feedback bit
abailly-akamai Jun 24, 2024
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
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-10022-added-1703703204947.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Added
---

Added Design Tokens (CDS 2.0) ([#10022](https://github.com/linode/manager/pull/10022))
1 change: 1 addition & 0 deletions packages/manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"@emotion/styled": "^11.11.0",
"@hookform/resolvers": "2.9.11",
"@linode/api-v4": "*",
"@linode/design-language-system": "^2.3.0",
"@linode/validation": "*",
"@lukemorales/query-key-factory": "^1.3.4",
"@mui/icons-material": "^5.14.7",
Expand Down
21 changes: 6 additions & 15 deletions packages/manager/src/components/ActionMenu/ActionMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ export const ActionMenu = React.memo((props: ActionMenuProps) => {

const sxTooltipIcon = {
'& :hover': {
color: '#4d99f1',
color: theme.color.white,
},
'&& .MuiSvgIcon-root': {
fill: theme.color.disabledText,
fill: theme.color.white,
height: '20px',
width: '20px',
},
Expand All @@ -89,12 +89,12 @@ export const ActionMenu = React.memo((props: ActionMenuProps) => {
<IconButton
sx={(theme) => ({
':hover': {
backgroundColor: theme.palette.primary.main,
color: '#fff',
backgroundColor: theme.color.buttonPrimaryHover,
color: theme.color.white,
},
backgroundColor: open ? theme.palette.primary.main : undefined,
backgroundColor: open ? theme.color.buttonPrimaryHover : undefined,
borderRadius: 'unset',
color: open ? '#fff' : theme.textColors.linkActiveLight,
color: open ? theme.color.white : theme.textColors.linkActiveLight,
height: '100%',
minWidth: '40px',
padding: '10px',
Expand Down Expand Up @@ -147,15 +147,6 @@ export const ActionMenu = React.memo((props: ActionMenuProps) => {
a.onClick();
}
}}
sx={{
'&:hover': {
background: '#226dc3',
},
background: '#3683dc',
borderBottom: '1px solid #5294e0',
color: '#fff',
padding: '10px 10px 10px 16px',
}}
data-qa-action-menu-item={a.title}
data-testid={a.title}
disabled={a.disabled}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('BetaChip', () => {
const { getByTestId } = renderWithTheme(<BetaChip color="primary" />);
const betaChip = getByTestId('betaChip');
expect(betaChip).toBeInTheDocument();
expect(betaChip).toHaveStyle('background-color: #3683dc');
expect(betaChip).toHaveStyle('background-color: rgb(16, 138, 214)');
});

it('triggers an onClick callback', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ import { Typography } from 'src/components/Typography';

export const StyledTypography = styled(Typography, {
label: 'StyledTypography',
})(({ theme }) => ({
})(({}) => ({
'&:hover': {
textDecoration: 'underline',
},
color: theme.textColors.tableHeader,
fontSize: '1.125rem',
lineHeight: 'normal',
textTransform: 'capitalize',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ export const StyledActionButton = styled(Button, {
})(({ theme, ...props }) => ({
...(!props.disabled && {
'&:hover': {
backgroundColor: theme.palette.primary.main,
color: theme.name === 'dark' ? theme.color.black : theme.color.white,
backgroundColor: theme.color.buttonPrimaryHover,
color: theme.color.white,
},
}),
background: 'transparent',
color: theme.textColors.linkActiveLight,
fontFamily: latoWeb.normal,
fontSize: '14px',
lineHeight: '16px',
Expand Down
17 changes: 1 addition & 16 deletions packages/manager/src/components/Button/StyledLinkButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,5 @@ import { styled } from '@mui/material/styles';
export const StyledLinkButton = styled('button', {
label: 'StyledLinkButton',
})(({ theme }) => ({
'&:disabled': {
color: theme.palette.text.disabled,
cursor: 'not-allowed',
},
'&:hover:not(:disabled)': {
backgroundColor: 'transparent',
color: theme.palette.primary.main,
textDecoration: 'underline',
},
background: 'none',
border: 'none',
color: theme.textColors.linkActiveLight,
cursor: 'pointer',
font: 'inherit',
minWidth: 0,
padding: 0,
...theme.applyLinkStyles,
}));
7 changes: 4 additions & 3 deletions packages/manager/src/components/Button/StyledTagButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ export const StyledTagButton = styled(Button, {
}),
...(!props.disabled && {
'&:hover, &:focus': {
backgroundColor: theme.color.tagButton,
backgroundColor: theme.color.tagButtonBg,
border: 'none',
color: theme.color.tagButtonText,
},
backgroundColor: theme.color.tagButton,
color: theme.textColors.linkActiveLight,
backgroundColor: theme.color.tagButtonBg,
color: theme.color.tagButtonText,
}),
}));

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import Paper from '@mui/material/Paper';
import TableContainer from '@mui/material/TableContainer';
import * as React from 'react';

import { Table } from 'src/components/Table';
Expand All @@ -25,25 +23,23 @@ export const CollapsibleTable = (props: Props) => {
const { TableItems, TableRowEmpty, TableRowHead } = props;

return (
<TableContainer component={Paper}>
<Table aria-label="collapsible table">
<TableHead data-qa-table-row="collapsible-table-headers-row">
{TableRowHead}
</TableHead>
<TableBody>
{TableItems.length === 0 && TableRowEmpty}
{TableItems.map((item) => {
return (
<CollapsibleRow
InnerTable={item.InnerTable}
OuterTableCells={item.OuterTableCells}
key={item.id}
label={item.label}
/>
);
})}
</TableBody>
</Table>
</TableContainer>
<Table aria-label="collapsible table">
<TableHead data-qa-table-row="collapsible-table-headers-row">
{TableRowHead}
</TableHead>
<TableBody>
{TableItems.length === 0 && TableRowEmpty}
{TableItems.map((item) => {
return (
<CollapsibleRow
InnerTable={item.InnerTable}
OuterTableCells={item.OuterTableCells}
key={item.id}
label={item.label}
/>
);
})}
</TableBody>
</Table>
);
};
132 changes: 0 additions & 132 deletions packages/manager/src/components/ColorPalette/ColorPalette.test.tsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// eslint-disable-next-line no-restricted-imports
import { useTheme } from '@mui/material';
import Grid from '@mui/material/Unstable_Grid2';
import { Theme } from '@mui/material/styles';
import * as React from 'react';
import { makeStyles } from 'tss-react/mui';

import { Typography } from 'src/components/Typography';

import type { Theme } from '@mui/material/styles';

interface Color {
alias: string;
color: string;
Expand Down Expand Up @@ -45,7 +45,7 @@ const useStyles = makeStyles()((theme: Theme) => ({
/**
* Add a new color to the palette, especially another tint of gray or blue, only after exhausting the option of using an existing color.
*
* - Colors used in light mode are located in `foundations/light.ts
* - Colors used in light mode are located in `foundations/light.ts`
* - Colors used in dark mode are located in `foundations/dark.ts`
*
* If a color does not exist in the current palette and is only used once, consider applying the color conditionally:
Expand Down Expand Up @@ -102,7 +102,7 @@ export const ColorPalette = () => {
{ alias: 'theme.color.drawerBackdrop', color: theme.color.drawerBackdrop },
{ alias: 'theme.color.label', color: theme.color.label },
{ alias: 'theme.color.disabledText', color: theme.color.disabledText },
{ alias: 'theme.color.tagButton', color: theme.color.tagButton },
{ alias: 'theme.color.tagButton', color: theme.color.tagButtonBg },
{ alias: 'theme.color.tagIcon', color: theme.color.tagIcon },
];

Expand Down
7 changes: 0 additions & 7 deletions packages/manager/src/components/Divider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ const StyledDivider = styled(_Divider, {
'dark',
]),
})<DividerProps>(({ theme, ...props }) => ({
borderColor: props.dark
? theme.color.border2
: props.light
? theme.name === 'light'
? '#e3e5e8'
: '#2e3238'
: '',
marginBottom: props.spacingBottom,
marginTop: props.spacingTop,
}));
5 changes: 1 addition & 4 deletions packages/manager/src/components/DocsLink/DocsLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,10 @@ export const DocsLink = (props: DocsLinkProps) => {
const StyledDocsLink = styled(Link, {
label: 'StyledDocsLink',
})(({ theme }) => ({
...theme.applyLinkStyles,
'& svg': {
marginRight: theme.spacing(),
},
'&:hover': {
color: theme.textColors.linkActiveLight,
textDecoration: 'underline',
},
alignItems: 'center',
display: 'flex',
fontFamily: theme.font.normal,
Expand Down
Loading
Loading