Skip to content

chore(site): remove paperLight background value #10857

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

Merged
merged 10 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from 6 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
4 changes: 0 additions & 4 deletions site/src/@types/mui.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ declare module "@mui/material/styles" {
experimental: NewTheme;
}

interface TypeBackground {
paperLight: string;
}

interface Palette {
neutral: PaletteColor;
}
Expand Down
1 change: 0 additions & 1 deletion site/src/components/Dashboard/Navbar/NavbarView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ export const NavbarView: FC<NavbarViewProps> = ({
<nav
css={(theme) => ({
height: navHeight,
background: theme.palette.background.paper,
borderBottom: `1px solid ${theme.palette.divider}`,
})}
>
Expand Down
3 changes: 1 addition & 2 deletions site/src/components/DeploySettingsLayout/Fieldset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export const Fieldset: FC<FieldsetProps> = (props) => {
css={{
borderRadius: 8,
border: `1px solid ${theme.palette.divider}`,
background: theme.palette.background.paper,
marginTop: 32,
}}
onSubmit={onSubmit}
Expand Down Expand Up @@ -63,7 +62,7 @@ export const Fieldset: FC<FieldsetProps> = (props) => {
css={[
theme.typography.body2 as CSSObject,
{
background: theme.palette.background.paperLight,
background: theme.palette.background.paper,
padding: "16px 24px",
display: "flex",
alignItems: "center",
Expand Down
8 changes: 2 additions & 6 deletions site/src/components/DeploySettingsLayout/Option.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,7 @@ interface OptionConfigProps extends BoxProps {
export const OptionConfig = (props: OptionConfigProps) => {
const { source, sx, ...attrs } = props;
const theme = useTheme();
const borderColor = source
? theme.palette.primary.main
: theme.palette.divider;
const borderColor = source ? undefined : theme.palette.divider;

return (
<Box
Expand All @@ -139,9 +137,7 @@ export const OptionConfig = (props: OptionConfigProps) => {
fontFamily: MONOSPACE_FONT_FAMILY,
fontWeight: 600,
backgroundColor: (theme) =>
source
? theme.palette.primary.dark
: theme.palette.background.paperLight,
source ? theme.palette.primary.dark : theme.palette.background.paper,
display: "inline-flex",
alignItems: "center",
borderRadius: 0.25,
Expand Down
3 changes: 1 addition & 2 deletions site/src/components/ErrorBoundary/RuntimeErrorState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ const styles = {
}),

stack: (theme) => ({
backgroundColor: theme.palette.background.paper,
border: `1px solid ${theme.palette.divider}`,
borderRadius: 4,
marginTop: 64,
Expand All @@ -174,7 +173,7 @@ const styles = {
fontWeight: 600,
letterSpacing: 1,
padding: "8px 8px 8px 16px",
backgroundColor: theme.palette.background.paperLight,
backgroundColor: theme.palette.background.paper,
borderBottom: `1px solid ${theme.palette.divider}`,
color: theme.palette.text.secondary,
display: "flex",
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/Filter/filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const BaseSkeleton = (props: SkeletonProps) => {
height={36}
{...props}
sx={{
bgcolor: (theme) => theme.palette.background.paperLight,
bgcolor: (theme) => theme.palette.background.paper,
borderRadius: "6px",
...props.sx,
}}
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/Markdown/Markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ const markdownStyles: Interpolation<Theme> = (theme: Theme) => ({
},

"& .prismjs": {
background: theme.palette.background.paperLight,
background: theme.palette.background.paper,
borderRadius: 8,
padding: "16px 24px",
overflowX: "auto",
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/PageHeader/FullWidthPageHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const FullWidthPageHeader: FC<
{
...(theme.typography.body2 as CSSObject),
padding: 24,
background: theme.palette.background.paper,
background: theme.palette.background.default,
borderBottom: `1px solid ${theme.palette.divider}`,
display: "flex",
alignItems: "center",
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/Resources/AgentRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ const useAgentLogs = (

const styles = {
agentRow: (theme) => ({
backgroundColor: theme.palette.background.paperLight,
backgroundColor: theme.palette.background.paper,
fontSize: 16,
borderLeft: `2px solid ${theme.palette.text.secondary}`,

Expand Down
2 changes: 1 addition & 1 deletion site/src/components/Resources/AgentRowPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const AgentRowPreview: FC<AgentRowPreviewProps> = ({
const styles = {
agentRow: (theme) => ({
padding: "16px 32px",
backgroundColor: theme.palette.background.paperLight,
backgroundColor: theme.palette.background.paper,
fontSize: 16,
position: "relative",

Expand Down
1 change: 0 additions & 1 deletion site/src/components/Resources/ResourceCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { SensitiveValue } from "./SensitiveValue";

const styles = {
resourceCard: (theme) => ({
background: theme.palette.background.paper,
borderRadius: 8,
border: `1px solid ${theme.palette.divider}`,

Expand Down
4 changes: 2 additions & 2 deletions site/src/components/SyntaxHighlighter/coderTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,9 @@ export const coderTheme = (theme: Theme): editor.IStandaloneThemeData => ({
],
colors: {
"editor.foreground": theme.palette.text.primary,
"editor.background": theme.palette.background.paper,
"editor.background": theme.palette.background.default,
"editor.selectionBackground": theme.palette.action.hover,
"editor.lineHighlightBackground": theme.palette.background.paperLight,
"editor.lineHighlightBackground": theme.palette.background.paper,

"editorCursor.foreground": "#f8f8f0",
"editorWhitespace.foreground": "#3B3A32",
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/TemplateFiles/TemplateFiles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ const styles = {
}),

codeWrapper: (theme) => ({
background: theme.palette.background.paperLight,
background: theme.palette.background.paper,
}),

files: (theme) => ({
Expand Down
4 changes: 1 addition & 3 deletions site/src/components/Timeline/TimelineDateRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ export const TimelineDateRow: FC<TimelineDateRow> = ({ date }) => {
return (
<TableRow
css={css`
background: ${theme.palette.background.paper};

&:not(:first-of-type) td {
border-top: 1px solid ${theme.palette.divider};
}
Expand All @@ -24,7 +22,7 @@ export const TimelineDateRow: FC<TimelineDateRow> = ({ date }) => {
<TableCell
css={{
padding: `8px 32px !important`,
background: `${theme.palette.background.paperLight} !important`,
background: `${theme.palette.background.paper} !important`,
fontSize: 12,
position: "relative",
color: theme.palette.text.secondary,
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/WorkspaceBuildLogs/Logs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const styles = {
},

"&.debug": {
backgroundColor: theme.palette.background.paperLight,
backgroundColor: theme.palette.background.paper,
},

"&.warn": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const FailureTooltip: FC<TooltipProps> = ({ children, ...tooltipProps }) => {
const popper = useClassName(
(css, theme) => css`
& .${tooltipClasses.tooltip} {
background-color: ${theme.palette.background.paperLight};
background-color: ${theme.palette.background.paper};
border: 1px solid ${theme.palette.divider};
font-size: 12px;
padding: 8px 10px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ const styles = {
color: theme.palette.text.secondary,

"&:hover .rdrStaticRangeLabel": {
background: theme.palette.background.paperLight,
background: theme.palette.background.paper,
color: theme.palette.text.primary,
},

Expand All @@ -175,7 +175,7 @@ const styles = {
},

"& .rdrCalendarWrapper": {
backgroundColor: theme.palette.background.paperLight,
backgroundColor: theme.palette.background.paper,
},

"& .rdrDateDisplayItem": {
Expand All @@ -188,7 +188,7 @@ const styles = {

"&.rdrDateDisplayItemActive": {
borderColor: theme.palette.text.primary,
backgroundColor: theme.palette.background.paperLight,
backgroundColor: theme.palette.background.paper,

"& input": {
color: theme.palette.text.primary,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ const styles = {
},

active: (theme) => ({
backgroundColor: theme.palette.background.paperLight,
backgroundColor: theme.palette.background.paper,
}),

versionCell: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,6 @@ const styles = {
alignItems: "center",
justifyContent: "space-between",
height: topbarHeight,
background: theme.palette.background.paper,
}),
topbarSides: {
display: "flex",
Expand All @@ -486,7 +485,6 @@ const styles = {
},
sidebar: (theme) => ({
minWidth: 256,
backgroundColor: theme.palette.background.paper,
borderRight: `1px solid ${theme.palette.divider}`,
}),
sidebarTitle: (theme) => ({
Expand Down
2 changes: 1 addition & 1 deletion site/src/pages/TerminalPage/TerminalAlerts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const TerminalAlert = (props: AlertProps) => {
borderWidth: 0,
borderBottomWidth: 1,
borderBottomColor: (theme) => theme.palette.divider,
backgroundColor: (theme) => theme.palette.background.paperLight,
backgroundColor: (theme) => theme.palette.background.paper,
borderLeft: (theme) =>
`3px solid ${theme.palette[props.severity!].light}`,
marginBottom: 1,
Expand Down
2 changes: 1 addition & 1 deletion site/src/pages/TerminalPage/TerminalPageAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export default ({
borderWidth: 0,
borderBottomWidth: 1,
borderBottomColor: (theme) => theme.palette.divider,
backgroundColor: (theme) => theme.palette.background.paperLight,
backgroundColor: (theme) => theme.palette.background.paper,
borderLeft: (theme) => `3px solid ${theme.palette[severity].light}`,
marginBottom: 1,
}}
Expand Down
2 changes: 1 addition & 1 deletion site/src/pages/UsersPage/UsersTable/EditRolesButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ const classNames = {
paper: (css, theme) => css`
width: 360px;
margin-top: 8px;
background: ${theme.palette.background.paperLight};
background: ${theme.palette.background.paper};
`,
} satisfies Record<string, ClassName>;

Expand Down
6 changes: 3 additions & 3 deletions site/src/pages/UsersPage/UsersTable/UserRoleCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function UserRoleCell({
css={{
backgroundColor: hasOwnerRole
? theme.palette.info.dark
: theme.palette.background.paperLight,
: theme.palette.background.paper,
borderColor: hasOwnerRole
? theme.palette.info.light
: theme.palette.divider,
Expand All @@ -102,7 +102,7 @@ function OverflowRolePill({ roles }: OverflowRolePillProps) {
<Pill
text={`+${roles.length} more`}
css={{
backgroundColor: theme.palette.background.paperLight,
backgroundColor: theme.palette.background.paper,
borderColor: theme.palette.divider,
}}
/>
Expand Down Expand Up @@ -136,7 +136,7 @@ function OverflowRolePill({ roles }: OverflowRolePillProps) {
key={role.name}
text={role.display_name || role.name}
css={{
backgroundColor: theme.palette.background.paperLight,
backgroundColor: theme.palette.background.paper,
borderColor: theme.palette.divider,
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ const styles = {
workspaceInfo: (theme) => ({
display: "flex",
justifyContent: "space-between",
backgroundColor: theme.palette.background.paperLight,
border: `1px solid ${theme.palette.divider}`,
backgroundColor: theme.palette.divider,
borderRadius: 6,
padding: 16,
marginBottom: 20,
Expand Down
2 changes: 1 addition & 1 deletion site/src/pages/WorkspacesPage/WorkspacesEmpty.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export const WorkspacesEmpty = (props: {
color: "inherit",

"&:hover": {
backgroundColor: theme.palette.background.paperLight,
backgroundColor: theme.palette.background.paper,
},
})}
>
Expand Down
4 changes: 1 addition & 3 deletions site/src/theme/mui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export let dark = createTheme({
background: {
default: colors.gray[17],
paper: colors.gray[16],
paperLight: colors.gray[14],
},
text: {
primary: colors.gray[1],
Expand Down Expand Up @@ -244,7 +243,6 @@ dark = createTheme(dark, {
root: ({ theme }) => ({
borderCollapse: "unset",
border: "none",
background: dark.palette.background.paper,
boxShadow: `0 0 0 1px ${dark.palette.background.default} inset`,
overflow: "hidden",

Expand All @@ -266,7 +264,7 @@ dark = createTheme(dark, {
fontSize: 14,
color: dark.palette.text.secondary,
fontWeight: 600,
background: dark.palette.background.paperLight,
background: dark.palette.background.paper,
},
root: {
fontSize: 16,
Expand Down