Skip to content

chore(site): make info gray #14356

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 13 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from 9 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
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab

[*.{md,yaml,yml,tf,tfvars,nix}]
[*.{yaml,yml,tf,tfvars,nix}]
indent_style = space
indent_size = 2

Expand Down
12 changes: 6 additions & 6 deletions site/src/components/Badges/Badges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ export const EnterpriseBadge: FC = () => {
css={[
styles.badge,
(theme) => ({
backgroundColor: theme.roles.info.background,
border: `1px solid ${theme.roles.info.outline}`,
color: theme.roles.info.text,
backgroundColor: theme.roles.notice.background,
border: `1px solid ${theme.roles.notice.outline}`,
color: theme.roles.notice.text,
}),
]}
>
Expand All @@ -129,9 +129,9 @@ export const PremiumBadge: FC = () => {
css={[
styles.badge,
(theme) => ({
backgroundColor: theme.roles.info.background,
border: `1px solid ${theme.roles.info.outline}`,
color: theme.roles.info.text,
backgroundColor: theme.roles.notice.background,
border: `1px solid ${theme.roles.notice.outline}`,
color: theme.roles.notice.text,
}),
]}
>
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/BuildAvatar/BuildAvatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const BuildAvatar: FC<BuildAvatarProps> = ({ build, size }) => {
const theme = useTheme();
const { status, type } = getDisplayWorkspaceBuildStatus(theme, build);
const badgeType = useClassName(
(css, theme) => css({ backgroundColor: theme.palette[type].light }),
(css, theme) => css({ backgroundColor: theme.roles[type].fill.solid }),
[type],
);

Expand Down
6 changes: 3 additions & 3 deletions site/src/components/Logs/LogLine.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ const styles = {
},

"&.debug": {
backgroundColor: theme.roles.info.background,
color: theme.roles.info.text,
backgroundColor: theme.roles.notice.background,
color: theme.roles.notice.text,

"& .dashed-line": {
backgroundColor: theme.roles.info.outline,
backgroundColor: theme.roles.notice.outline,
},
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const WorkspaceBuildData = ({ build }: { build: WorkspaceBuild }) => {
css={{
width: 16,
height: 16,
color: theme.palette[statusType].light,
color: theme.roles[statusType].fill.solid,
}}
/>
<div css={{ overflow: "hidden" }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ const AddOrganizationMember: FC<AddOrganizationMemberProps> = ({

const styles = {
role: (theme) => ({
backgroundColor: theme.roles.info.background,
borderColor: theme.roles.info.outline,
backgroundColor: theme.roles.notice.background,
borderColor: theme.roles.notice.outline,
}),
globalRole: (theme) => ({
backgroundColor: theme.roles.inactive.background,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ const styles = {
borderColor: theme.roles.active.outline,
}),
ownerRoleBadge: (theme) => ({
backgroundColor: theme.roles.info.background,
borderColor: theme.roles.info.outline,
backgroundColor: theme.roles.notice.background,
borderColor: theme.roles.notice.outline,
}),
roleBadge: (theme) => ({
backgroundColor: theme.experimental.l2.background,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ const TemplateUsagePanel: FC<TemplateUsagePanelProps> = ({
const totalInSeconds =
validUsage?.reduce((total, usage) => total + usage.seconds, 0) ?? 1;
const usageColors = chroma
.scale([theme.roles.success.fill.solid, theme.roles.notice.fill.solid])
.scale([theme.roles.success.fill.solid, theme.roles.warning.fill.solid])
.mode("lch")
.colors(validUsage?.length ?? 0);
// The API returns a row for each app, even if the user didn't use it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,25 @@ export const getStatus = (
switch (version.job.status) {
case "running":
return {
type: "info",
type: "active",
text: "Running",
icon: <PillSpinner />,
};
case "pending":
return {
type: "info",
type: "active",
text: getPendingStatusLabel(version.job),
icon: <QueuedIcon />,
};
case "canceling":
return {
type: "warning",
type: "inactive",
text: "Canceling",
icon: <PillSpinner />,
};
case "canceled":
return {
type: "warning",
type: "inactive",
text: "Canceled",
icon: <ErrorIcon />,
};
Expand Down
4 changes: 2 additions & 2 deletions site/src/pages/UsersPage/UsersFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ export const useStatusFilterMenu = ({
{
value: "dormant",
label: "Dormant",
startIcon: <StatusIndicator color="notice" />,
startIcon: <StatusIndicator color="warning" />,
},
{
value: "suspended",
label: "Suspended",
startIcon: <StatusIndicator color="warning" />,
startIcon: <StatusIndicator color="inactive" />,
},
];
return useFilterMenu({
Expand Down
2 changes: 1 addition & 1 deletion site/src/pages/WorkspacesPage/WorkspacesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export const WorkspacesTable: FC<WorkspacesTableProps> = ({
{workspace.latest_build.status === "running" &&
!workspace.health.healthy && (
<InfoTooltip
type="notice"
type="warning"
title="Workspace is unhealthy"
message="Your workspace is running but some agents are unhealthy."
/>
Expand Down
20 changes: 10 additions & 10 deletions site/src/theme/dark/roles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,6 @@ export default {
},
},
notice: {
background: colors.yellow[950],
outline: colors.yellow[200],
text: colors.yellow[50],
fill: {
solid: colors.yellow[500],
outline: colors.yellow[500],
text: colors.white,
},
},
info: {
background: colors.blue[950],
outline: colors.blue[400],
text: colors.blue[50],
Expand All @@ -72,6 +62,16 @@ export default {
text: colors.white,
},
},
info: {
background: colors.zinc[950],
outline: colors.zinc[400],
text: colors.zinc[50],
fill: {
solid: colors.zinc[500],
outline: colors.zinc[600],
text: colors.white,
},
},
success: {
background: colors.green[950],
outline: colors.green[500],
Expand Down
40 changes: 20 additions & 20 deletions site/src/theme/darkBlue/roles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import colors from "../tailwindColors";
export default {
danger: {
background: colors.orange[950],
outline: colors.orange[600],
outline: colors.orange[500],
text: colors.orange[50],
fill: {
solid: colors.orange[500],
Expand Down Expand Up @@ -34,11 +34,11 @@ export default {
},
error: {
background: colors.red[950],
outline: colors.red[500],
outline: colors.red[600],
text: colors.red[50],
fill: {
solid: colors.red[600],
outline: colors.red[600],
solid: colors.red[400],
outline: colors.red[400],
text: colors.white,
},
},
Expand All @@ -53,16 +53,6 @@ export default {
},
},
notice: {
background: colors.yellow[950],
outline: colors.yellow[200],
text: colors.yellow[50],
fill: {
solid: colors.yellow[500],
outline: colors.yellow[500],
text: colors.white,
},
},
info: {
background: colors.blue[950],
outline: colors.blue[400],
text: colors.blue[50],
Expand All @@ -72,6 +62,16 @@ export default {
text: colors.white,
},
},
info: {
background: colors.gray[950],
outline: colors.gray[400],
text: colors.gray[50],
fill: {
solid: colors.gray[500],
outline: colors.gray[600],
text: colors.white,
},
},
Comment on lines +65 to +74
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that Tailwind technically saturates their colors so the problem won't be as pronounced, but is gray on blue going to look washed out?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think they look fine, and we can always tweak it going forward.

success: {
background: colors.green[950],
outline: colors.green[500],
Expand Down Expand Up @@ -108,7 +108,7 @@ export default {
text: colors.sky[50],
fill: {
solid: colors.sky[600],
outline: colors.sky[600],
outline: colors.sky[400],
text: colors.white,
},
disabled: {
Expand All @@ -133,12 +133,12 @@ export default {
},
},
inactive: {
background: colors.zinc[950],
outline: colors.zinc[500],
text: colors.zinc[50],
background: colors.gray[950],
outline: colors.gray[500],
text: colors.gray[50],
fill: {
solid: colors.zinc[400],
outline: colors.zinc[400],
solid: colors.gray[400],
outline: colors.gray[400],
text: colors.white,
},
},
Expand Down
34 changes: 17 additions & 17 deletions site/src/theme/light/mui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const muiTheme = createTheme({
},
divider: tw.zinc[200],
warning: {
light: tw.amber[500],
light: tw.amber[400],
main: tw.amber[800],
dark: tw.amber[950],
},
Expand Down Expand Up @@ -80,25 +80,25 @@ const muiTheme = createTheme({
...components,
MuiCssBaseline: {
styleOverrides: (theme) => `
html, body, #root, #storybook-root {
height: 100%;
}
html, body, #root, #storybook-root {
height: 100%;
}

button, input {
font-family: ${BODY_FONT_FAMILY};
}
button, input {
font-family: ${BODY_FONT_FAMILY};
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
-webkit-box-shadow: 0 0 0 100px ${theme.palette.background.default} inset !important;
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
-webkit-box-shadow: 0 0 0 100px ${theme.palette.background.default} inset !important;
}

::placeholder {
color: ${theme.palette.text.disabled};
}
`,
::placeholder {
color: ${theme.palette.text.disabled};
}
`,
},
MuiAvatar: {
styleOverrides: {
Expand Down
20 changes: 10 additions & 10 deletions site/src/theme/light/roles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,6 @@ export default {
},
},
notice: {
background: colors.yellow[50],
outline: colors.yellow[600],
text: colors.yellow[950],
fill: {
solid: colors.yellow[500],
outline: colors.yellow[500],
text: colors.white,
},
},
info: {
background: colors.blue[50],
outline: colors.blue[400],
text: colors.blue[950],
Expand All @@ -72,6 +62,16 @@ export default {
text: colors.white,
},
},
info: {
background: colors.zinc[50],
outline: colors.zinc[400],
text: colors.zinc[950],
fill: {
solid: colors.zinc[700],
outline: colors.zinc[600],
text: colors.white,
},
},
success: {
background: colors.green[50],
outline: colors.green[500],
Expand Down
6 changes: 3 additions & 3 deletions site/src/utils/workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ export const getDisplayWorkspaceBuildStatus = (
} as const;
case "pending":
return {
type: "secondary",
type: "inactive",
color: theme.roles.active.text,
status: DisplayWorkspaceBuildStatusLanguage.pending,
} as const;
case "running":
return {
type: "info",
type: "active",
color: theme.roles.active.text,
status: DisplayWorkspaceBuildStatusLanguage.running,
} as const;
Expand All @@ -68,7 +68,7 @@ export const getDisplayWorkspaceBuildStatus = (
} as const;
case "canceled":
return {
type: "secondary",
type: "inactive",
color: theme.roles.warning.text,
status: DisplayWorkspaceBuildStatusLanguage.canceled,
} as const;
Expand Down
Loading