Skip to content

fix(site): resize terminal when alert is dismissed #8368

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 3 commits into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix(site): resize terminal when alert is dismissed
  • Loading branch information
BrunoQuaresma committed Jul 7, 2023
commit c0af52e750072a97c015d55477ef6bfc558b83b8
1 change: 1 addition & 0 deletions site/src/pages/TerminalPage/TerminalPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ const useStyles = makeStyles((theme) => ({
overflow: "hidden",
backgroundColor: theme.palette.background.paper,
flex: 1,
fontSize: 14,
// These styles attempt to mimic the VS Code scrollbar.
"& .xterm": {
padding: 4,
Expand Down
13 changes: 11 additions & 2 deletions site/src/pages/TerminalPage/TerminalPageAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,19 @@ export default ({
alertType: TerminalPageAlertType
onDismiss: () => void
}) => {
const severity = mapAlertTypeToText[alertType].severity
return (
<Alert
severity={mapAlertTypeToText[alertType].severity}
sx={{ borderRadius: 0 }}
severity={severity}
sx={{
borderRadius: 0,
borderWidth: 0,
borderBottomWidth: 1,
borderBottomColor: (theme) => theme.palette.divider,
backgroundColor: (theme) => theme.palette.background.paperLight,
borderLeft: (theme) => `3px solid ${theme.palette[severity].light}`,
marginBottom: 1,
}}
onDismiss={onDismiss}
dismissible
actions={[
Expand Down