diff --git a/site/src/app.tsx b/site/src/app.tsx index 4b47895aa4bff..cd055cc7567ca 100644 --- a/site/src/app.tsx +++ b/site/src/app.tsx @@ -15,6 +15,7 @@ const queryClient = new QueryClient({ queries: { retry: false, cacheTime: 0, + refetchOnWindowFocus: false, }, }, }) diff --git a/site/src/components/DeploySettingsLayout/Fieldset.tsx b/site/src/components/DeploySettingsLayout/Fieldset.tsx index ea13402982f64..d70d759f1a857 100644 --- a/site/src/components/DeploySettingsLayout/Fieldset.tsx +++ b/site/src/components/DeploySettingsLayout/Fieldset.tsx @@ -39,7 +39,7 @@ const useStyles = makeStyles((theme) => ({ }, title: { ...theme.typography.h5, - fontWeight: "bold", + fontWeight: 600, }, body: { ...theme.typography.body2, diff --git a/site/src/components/Dialogs/Dialog.tsx b/site/src/components/Dialogs/Dialog.tsx index f90868e5a2b61..cbdf4e5655159 100644 --- a/site/src/components/Dialogs/Dialog.tsx +++ b/site/src/components/Dialogs/Dialog.tsx @@ -89,11 +89,16 @@ const useButtonStyles = makeStyles((theme) => ({ backgroundColor: colors.red[10], borderColor: colors.red[9], color: theme.palette.text.primary, - "&:hover": { + + "&:hover:not(:disabled)": { backgroundColor: colors.red[9], + borderColor: colors.red[9], }, + "&.Mui-disabled": { - opacity: 0.5, + backgroundColor: colors.red[15], + borderColor: colors.red[15], + color: colors.red[9], }, }, }, diff --git a/site/src/components/DropdownButton/ActionCtas.tsx b/site/src/components/DropdownButton/ActionCtas.tsx index 8be23778a6a85..cc5e48da0b94e 100644 --- a/site/src/components/DropdownButton/ActionCtas.tsx +++ b/site/src/components/DropdownButton/ActionCtas.tsx @@ -26,6 +26,7 @@ export const UpdateButton: FC> = ({ return ( ) @@ -167,6 +170,7 @@ export const ActionLoadingButton: FC> = ({ return ( @@ -178,8 +182,13 @@ const useStyles = makeStyles((theme) => ({ // Set fixed width for the action buttons so they will not change the size // during the transitions width: theme.spacing(20), - border: "none", borderRadius: `${theme.shape.borderRadius}px 0px 0px ${theme.shape.borderRadius}px`, + // This is used to show the hover effect + marginRight: -1, + position: "relative", + "&:hover": { + zIndex: 1, + }, }, cancelButton: { "&.MuiButton-root": { diff --git a/site/src/components/DropdownButton/DropdownButton.tsx b/site/src/components/DropdownButton/DropdownButton.tsx index c4067f9293ecc..d1659be56837c 100644 --- a/site/src/components/DropdownButton/DropdownButton.tsx +++ b/site/src/components/DropdownButton/DropdownButton.tsx @@ -41,6 +41,7 @@ export const DropdownButton: FC = ({ <> {/* popover toggle button */} } diff --git a/site/src/components/LicenseBanner/LicenseBannerView.tsx b/site/src/components/LicenseBanner/LicenseBannerView.tsx index 792bc191a0a2a..6032553e8bc3d 100644 --- a/site/src/components/LicenseBanner/LicenseBannerView.tsx +++ b/site/src/components/LicenseBanner/LicenseBannerView.tsx @@ -93,7 +93,7 @@ const useStyles = makeStyles((theme) => ({ link: { color: "inherit", textDecoration: "none", - fontWeight: "bold", + fontWeight: 600, }, list: { padding: theme.spacing(1), diff --git a/site/src/components/NavbarView/NavbarView.tsx b/site/src/components/NavbarView/NavbarView.tsx index 11c3b41f5f30d..44123fa0100f4 100644 --- a/site/src/components/NavbarView/NavbarView.tsx +++ b/site/src/components/NavbarView/NavbarView.tsx @@ -239,7 +239,7 @@ const useStyles = makeStyles((theme) => ({ // NavLink adds this class when the current route matches. "&.active": { color: theme.palette.text.primary, - fontWeight: "bold", + fontWeight: 500, }, [theme.breakpoints.up("md")]: { diff --git a/site/src/components/Pill/Pill.tsx b/site/src/components/Pill/Pill.tsx index fe27c49539828..b0e1041c0c9f6 100644 --- a/site/src/components/Pill/Pill.tsx +++ b/site/src/components/Pill/Pill.tsx @@ -9,15 +9,17 @@ export interface PillProps { text: string type?: PaletteIndex lightBorder?: boolean + title?: string } export const Pill: FC = (props) => { - const { className, icon, text = false } = props + const { className, icon, text = false, title } = props const styles = useStyles(props) return (
{icon &&
{icon}
} {text} diff --git a/site/src/components/SearchBarWithFilter/SearchBarWithFilter.tsx b/site/src/components/SearchBarWithFilter/SearchBarWithFilter.tsx index 31267a5e93245..4d73496ecf6c2 100644 --- a/site/src/components/SearchBarWithFilter/SearchBarWithFilter.tsx +++ b/site/src/components/SearchBarWithFilter/SearchBarWithFilter.tsx @@ -77,6 +77,7 @@ export const SearchBarWithFilter: React.FC< {presetFilters && presetFilters.length > 0 && ( ) diff --git a/site/src/components/TemplateVersionEditor/FileTreeView.tsx b/site/src/components/TemplateVersionEditor/FileTreeView.tsx index ba5b2236795c8..b0b7f41fb57b1 100644 --- a/site/src/components/TemplateVersionEditor/FileTreeView.tsx +++ b/site/src/components/TemplateVersionEditor/FileTreeView.tsx @@ -8,6 +8,7 @@ import MenuItem from "@material-ui/core/MenuItem" import { FC, useState } from "react" import { FileTree } from "util/filetree" import { DockerIcon } from "components/Icons/DockerIcon" +import { colors } from "theme/colors" const sortFileTree = (fileTree: FileTree) => (a: string, b: string) => { const contentA = fileTree[a] @@ -98,7 +99,6 @@ export const FileTreeView: FC<{ defaultCollapseIcon={} defaultExpandIcon={} aria-label="Files" - className={styles.fileTree} > {Object.keys(fileTree) .sort(sortFileTree(fileTree)) @@ -156,23 +156,22 @@ export const FileTreeView: FC<{ } const useStyles = makeStyles((theme) => ({ - fileTree: {}, fileTreeItem: { overflow: "hidden", userSelect: "none", - "&:focus": { - "& > .MuiTreeItem-content": { - background: "rgba(255, 255, 255, 0.1)", - }, + "&:focus:not(.active) > .MuiTreeItem-content": { + background: theme.palette.action.hover, + color: theme.palette.text.primary, }, - "& > .MuiTreeItem-content:hover": { - background: theme.palette.background.paperLight, + + "&:not(:focus):not(.active) > .MuiTreeItem-content:hover": { + background: theme.palette.action.hover, color: theme.palette.text.primary, }, "& > .MuiTreeItem-content": { - padding: "1px 16px", + padding: theme.spacing(0.25, 2), color: theme.palette.text.secondary, "& svg": { @@ -182,16 +181,25 @@ const useStyles = makeStyles((theme) => ({ "& > .MuiTreeItem-label": { marginLeft: 4, - fontSize: 14, + fontSize: 13, color: "inherit", }, }, "&.active": { - background: theme.palette.background.paper, - "& > .MuiTreeItem-content": { color: theme.palette.text.primary, + background: colors.gray[13], + pointerEvents: "none", + }, + }, + + "& .MuiTreeItem-group": { + marginLeft: 0, + + // We need to find a better way to recursive padding here + "& .MuiTreeItem-content": { + paddingLeft: theme.spacing(5), }, }, }, diff --git a/site/src/components/TemplateVersionEditor/MonacoEditor.tsx b/site/src/components/TemplateVersionEditor/MonacoEditor.tsx index 405a71885c24c..a64b26b7112f4 100644 --- a/site/src/components/TemplateVersionEditor/MonacoEditor.tsx +++ b/site/src/components/TemplateVersionEditor/MonacoEditor.tsx @@ -122,7 +122,7 @@ export const MonacoEditor: FC<{ ], colors: { "editor.foreground": hslToHex(theme.palette.text.primary), - "editor.background": hslToHex(theme.palette.background.paper), + "editor.background": hslToHex(theme.palette.background.default), }, }) editor.updateOptions({ diff --git a/site/src/components/TemplateVersionEditor/TemplateVersionEditor.tsx b/site/src/components/TemplateVersionEditor/TemplateVersionEditor.tsx index 1f7990099ed32..0ef80162ae375 100644 --- a/site/src/components/TemplateVersionEditor/TemplateVersionEditor.tsx +++ b/site/src/components/TemplateVersionEditor/TemplateVersionEditor.tsx @@ -2,9 +2,9 @@ import Button from "@material-ui/core/Button" import IconButton from "@material-ui/core/IconButton" import { makeStyles, Theme } from "@material-ui/core/styles" import Tooltip from "@material-ui/core/Tooltip" -import CreateIcon from "@material-ui/icons/AddBox" +import CreateIcon from "@material-ui/icons/AddOutlined" import BuildIcon from "@material-ui/icons/BuildOutlined" -import PreviewIcon from "@material-ui/icons/Visibility" +import PreviewIcon from "@material-ui/icons/VisibilityOutlined" import { ProvisionerJobLog, Template, @@ -50,7 +50,7 @@ export interface TemplateVersionEditorProps { onUpdate: () => void } -const topbarHeight = navHeight +const topbarHeight = 80 const findInitialFile = (fileTree: FileTree): string | undefined => { let initialFile: string | undefined @@ -161,28 +161,26 @@ export const TemplateVersionEditor: FC = ({ ) } /> -
Used By: {template.active_user_count} developers
- Build Status:
- = ({ ? "Something" : "" } + size="small" + disabled={dirty || disableUpdate} + onClick={onUpdate} > - - - - + Publish version +
- Template Editor + Template files
- props.showBuildLogs ? "0.6fr 0.4fr" : "1fr 0fr", + props.showBuildLogs ? "1fr 1fr" : "1fr 0fr", height: `calc(100vh - ${navHeight + topbarHeight}px)`, overflow: "hidden", }, @@ -464,6 +458,8 @@ const useStyles = makeStyles< overflowY: "auto", }, panel: { + padding: theme.spacing(1), + "&.hidden": { display: "none", }, @@ -482,26 +478,42 @@ const useStyles = makeStyles< }, tab: { cursor: "pointer", - padding: "8px 12px", - fontSize: 14, + padding: theme.spacing(1.5), + fontSize: 10, + textTransform: "uppercase", + letterSpacing: "0.5px", + fontWeight: 600, background: "transparent", fontFamily: "inherit", border: 0, - color: theme.palette.text.hint, + color: theme.palette.text.secondary, transition: "150ms ease all", display: "flex", gap: 8, alignItems: "center", justifyContent: "center", + position: "relative", "& svg": { - maxWidth: 16, - maxHeight: 16, + maxWidth: 12, + maxHeight: 12, }, "&.active": { - color: "white", - background: theme.palette.background.paperLight, + color: theme.palette.text.primary, + "&:after": { + content: '""', + display: "block", + width: "100%", + height: 1, + backgroundColor: theme.palette.text.primary, + bottom: -1, + position: "absolute", + }, + }, + + "&:hover": { + color: theme.palette.text.primary, }, }, tabBar: { diff --git a/site/src/components/TemplateVersionEditor/TemplateVersionStatusBadge.tsx b/site/src/components/TemplateVersionEditor/TemplateVersionStatusBadge.tsx index 5dc4c5872cb21..f336ee65ef529 100644 --- a/site/src/components/TemplateVersionEditor/TemplateVersionStatusBadge.tsx +++ b/site/src/components/TemplateVersionEditor/TemplateVersionStatusBadge.tsx @@ -1,7 +1,6 @@ import { TemplateVersion } from "api/typesGenerated" import { FC, ReactNode } from "react" import { PaletteIndex } from "theme/palettes" - import CircularProgress from "@material-ui/core/CircularProgress" import ErrorIcon from "@material-ui/icons/ErrorOutline" import CheckIcon from "@material-ui/icons/CheckOutlined" @@ -11,7 +10,14 @@ export const TemplateVersionStatusBadge: FC<{ version: TemplateVersion }> = ({ version }) => { const { text, icon, type } = getStatus(version) - return + return ( + + ) } const LoadingIcon: FC = () => { diff --git a/site/src/components/UsersLayout/UsersLayout.tsx b/site/src/components/UsersLayout/UsersLayout.tsx index b7cd81aa5367e..7cf2f5d37f6d2 100644 --- a/site/src/components/UsersLayout/UsersLayout.tsx +++ b/site/src/components/UsersLayout/UsersLayout.tsx @@ -37,6 +37,7 @@ export const UsersLayout: FC = () => { {canCreateUser && authMethods.context.authMethods?.password.enabled && ( + )} diff --git a/site/src/components/WorkspaceActionButton/WorkspaceActionButton.tsx b/site/src/components/WorkspaceActionButton/WorkspaceActionButton.tsx index 1cfbd0c17b482..594cd23b75adf 100644 --- a/site/src/components/WorkspaceActionButton/WorkspaceActionButton.tsx +++ b/site/src/components/WorkspaceActionButton/WorkspaceActionButton.tsx @@ -14,6 +14,7 @@ export const WorkspaceActionButton: FC< > = ({ label, icon, onClick, className, ariaLabel }) => { return ( + + ) : undefined } diff --git a/site/src/pages/TemplatesPage/TemplatesPageView.tsx b/site/src/pages/TemplatesPage/TemplatesPageView.tsx index 762339ad5898c..d953dbe6119e0 100644 --- a/site/src/pages/TemplatesPage/TemplatesPageView.tsx +++ b/site/src/pages/TemplatesPage/TemplatesPageView.tsx @@ -151,7 +151,11 @@ export const TemplatesPageView: FC< -