Skip to content

refactor(site): Redesign the agent row #7226

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 8 commits into from
Apr 20, 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
12 changes: 10 additions & 2 deletions site/src/components/AppLink/AppLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ export const AppLink: FC<AppLinkProps> = ({

const button = (
<Button
size="small"
startIcon={icon}
endIcon={isPrivateApp ? undefined : <ShareIcon app={app} />}
className={styles.button}
Expand Down Expand Up @@ -136,9 +135,18 @@ const useStyles = makeStyles((theme) => ({
button: {
whiteSpace: "nowrap",
backgroundColor: theme.palette.background.default,
padding: theme.spacing(0, 3),
height: 44,
borderRadius: 6,

"&:hover": {
backgroundColor: `${theme.palette.background.default} !important`,
backgroundColor: `${theme.palette.background.paper} !important`,
},

"& .MuiButton-startIcon": {
width: 16,
height: 16,
marginRight: theme.spacing(1.5),
},
},

Expand Down
12 changes: 8 additions & 4 deletions site/src/components/Logs/Logs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const Logs: FC<React.PropsWithChildren<LogsProps>> = ({
? idx + 1
: dayjs(line.time).format(`HH:mm:ss.SSS`)}
</span>
<span className={styles.space}>&nbsp;&nbsp;&nbsp;&nbsp;</span>
<span className={styles.space} />
</>
)}
<span>{line.output}</span>
Expand Down Expand Up @@ -76,7 +76,7 @@ export const LogLine: FC<{
<span className={styles.time}>
{number ? number : dayjs(line.time).format(`HH:mm:ss.SSS`)}
</span>
<span className={styles.space}>&nbsp;&nbsp;&nbsp;&nbsp;</span>
<span className={styles.space} />
</>
)}
<span
Expand All @@ -96,7 +96,6 @@ const useStyles = makeStyles<
>((theme) => ({
root: {
minHeight: 156,
fontSize: 13,
padding: theme.spacing(2, 0),
borderRadius: theme.shape.borderRadius,
overflowX: "auto",
Expand All @@ -107,12 +106,14 @@ const useStyles = makeStyles<
},
line: {
wordBreak: "break-all",
display: "flex",
fontSize: 14,
color: theme.palette.text.primary,
fontFamily: MONOSPACE_FONT_FAMILY,
height: ({ lineNumbers }) => (lineNumbers ? logLineHeight : "auto"),
// Whitespace is significant in terminal output for alignment
whiteSpace: "pre",
padding: theme.spacing(0, 3),
padding: theme.spacing(0, 4),

"&.error": {
backgroundColor: theme.palette.error.dark,
Expand All @@ -128,6 +129,9 @@ const useStyles = makeStyles<
},
space: {
userSelect: "none",
width: theme.spacing(3),
display: "block",
flexShrink: 0,
},
time: {
userSelect: "none",
Expand Down
14 changes: 6 additions & 8 deletions site/src/components/PortForwardButton/PortForwardButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Link from "@material-ui/core/Link"
import Popover from "@material-ui/core/Popover"
import { makeStyles } from "@material-ui/core/styles"
import TextField from "@material-ui/core/TextField"
import OpenInNewOutlined from "@material-ui/icons/OpenInNewOutlined"
import { Stack } from "components/Stack/Stack"
import { useRef, useState, Fragment } from "react"
import { colors } from "theme/colors"
Expand Down Expand Up @@ -149,8 +148,8 @@ export const PortForwardButton: React.FC<PortForwardButtonProps> = (props) => {
return (
<>
<Button
variant="outlined"
className={styles.button}
startIcon={<OpenInNewOutlined />}
size="small"
ref={anchorRef}
onClick={() => {
Expand Down Expand Up @@ -211,11 +210,10 @@ const useStyles = makeStyles((theme) => ({
},

button: {
whiteSpace: "nowrap",
backgroundColor: theme.palette.background.default,

"&:hover": {
backgroundColor: `${theme.palette.background.default} !important`,
},
fontSize: 12,
fontWeight: 500,
height: theme.spacing(4),
minHeight: theme.spacing(4),
borderRadius: 4,
},
}))
Loading