Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4493649

Browse files
refactor(site): Add bottom spacing to the dashboard layout (#6084)
1 parent 4827d9e commit 4493649

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

site/src/components/Dashboard/DashboardLayout.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { updateCheckMachine } from "xServices/updateCheck/updateCheckXService"
1212
import { usePermissions } from "hooks/usePermissions"
1313
import { UpdateCheckResponse } from "api/typesGenerated"
1414
import { DashboardProvider } from "./DashboardProvider"
15+
import { dashboardContentBottomPadding } from "theme/constants"
1516

1617
export const DashboardLayout: FC = () => {
1718
const styles = useStyles()
@@ -71,5 +72,6 @@ const useStyles = makeStyles((theme) => ({
7172
},
7273
siteContent: {
7374
flex: 1,
75+
paddingBottom: dashboardContentBottomPadding, // Add bottom space since we don't use a footer
7476
},
7577
}))

site/src/components/TemplateVersionEditor/TemplateVersionEditor.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { AvatarData } from "components/AvatarData/AvatarData"
1616
import { TemplateResourcesTable } from "components/TemplateResourcesTable/TemplateResourcesTable"
1717
import { WorkspaceBuildLogs } from "components/WorkspaceBuildLogs/WorkspaceBuildLogs"
1818
import { FC, useCallback, useEffect, useRef, useState } from "react"
19-
import { navHeight } from "theme/constants"
19+
import { dashboardContentBottomPadding, navHeight } from "theme/constants"
2020
import { TemplateVersionFiles } from "util/templateVersion"
2121
import {
2222
CreateFileDialog,
@@ -403,6 +403,7 @@ const useStyles = makeStyles<
403403
flex: 1,
404404
display: "flex",
405405
flexDirection: "column",
406+
marginBottom: -dashboardContentBottomPadding, // Remove dashboard bottom padding
406407
},
407408
topbar: {
408409
padding: theme.spacing(2),

site/src/theme/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ export const containerWidth = 1380
88
export const containerWidthMedium = 1080
99
export const sidePadding = 24
1010
export const CardPadding = 20
11+
export const dashboardContentBottomPadding = 8 * 6

0 commit comments

Comments
 (0)